Commit graph

274 commits

Author SHA1 Message Date
Mario Vavti
905cd1da5b do not allow/show acl button on photo edit if not owner 2015-06-15 13:04:16 +02:00
Mario Vavti
7c8b9397ae reverse file activity logic 2015-04-12 13:13:22 +02:00
friendica
bc22df9057 display a map for photos if allowed. Note: there is a bug in that if the map div starts with display:none one needs to reload the frame or zoom in or they end up at minimum resolution. Still trying to sort this out. 2015-03-16 22:06:03 -07:00
friendica
5b35f1e6c4 Change logic of "don't create a status post for this photo upload" and turn it into a bona-fide on/off toggle. This takes up one more vertical line, but we have it to spare, and the single button (while concise visually) provided no feedback of the current state, or indicate whether a second click toggled it. Some addons use this setting so addons will need to be pulled when this is pulled in order to remain in sync. 2015-03-10 15:43:15 -07:00
friendica
533f39debe bring back like/dislike summaries on photos 2015-02-16 17:01:13 -08:00
friendica
a1c4bbfa5c quick fix for photos page until calls to like_puller() are fixed 2015-02-16 01:22:11 -08:00
friendica
da2349bb6a provide relief to sites that are severely impacted by the slow ITEM_UNSEEN searches. This does not incorporate any other flag optimisations as that will require a major DB update and possibly involve significant downtime. This is just to bite off a little chunk now and provide some much needed relief. 2015-02-12 17:45:25 -08:00
friendica
e157371c39 remote_user => remote_channel 2015-01-28 20:58:59 -08:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
friendica
111bbe65d9 Merge branch 'moretagging' of git://github.com/pafcu/red into pafcu-moretagging
Conflicts:
	mod/profiles.php
2015-01-13 18:07:49 -08:00
Stefan Parviainen
93735df2c7 Allow tags in mail, many profile fields, and admin info 2015-01-13 17:54:40 +01:00
friendica
cdc52ba884 change deletion behaviour of linked photo items. Previously deleting the visible item in the conversation deleted the photo as well. Now photos must be deleted in the photos module. Deleting the linked item removes any attached conversation elements (likes, etc.) and sets the conversation item to hidden. This may create an issue in the future if we move the photo tags, title, or other photo elements to the linked item rather than the photo. Noting here so this can potentially be discovered and remembered at that time. 2015-01-12 16:27:27 -08:00
Stefan Parviainen
adc9564b5c Refactor mention code to make it more reusable 2015-01-12 20:01:07 +01:00
Stefan Parviainen
cb181993a8 Fix wrong require 2015-01-04 14:54:52 +01:00
Thomas Willingham
0130fb077f Cruft left over from stuff we don't have anymore. 2014-12-26 16:59:52 +00:00
friendica
50244f943d minor photo flag issue - and some more whitespace edits 2014-11-19 16:29:35 -08:00
friendica
3224848bad turn the "adult photo flagging" (which prevents a particularly flagged photo from showing up in your top level albums) into a feature so it doesn't clutter the normal photo edit form. This feature was a quick hack and needs more work; but it could be important to somebody. 2014-11-18 19:02:28 -08:00
Habeas Codice
4fa0df2927 another one 2014-11-17 16:01:17 -08:00
Habeas Codice
96427a23a3 Merge branch 'master' of https://github.com/habeascodice/red 2014-11-17 15:15:02 -08:00
Habeas Codice
bcaa32a83a fix boolean 2014-11-17 15:13:49 -08:00
marijus
8b1e83128a fix lost $sql_extra in recent sql query changes 2014-11-15 14:39:36 +01:00
Habeas Codice
ac27db22c1 Merge remote-tracking branch 'upstream/master'
Conflicts:
	boot.php
	include/dba/dba_driver.php
	include/diaspora.php
	include/follow.php
	include/session.php
	include/zot.php
	mod/photos.php
	mod/ping.php
2014-11-13 13:06:31 -08:00
Habeas Codice
1a5a5c7edb PostgreSQL support initial commit
There were 11 main types of changes:
- UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but
it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just
copied from Friendica. All of these instances, the LIMIT 1 was simply removed.
- Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit
integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice
to boot). Proper explicit boolean conversions were added. New queries should use proper conventions.
- MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_
func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There
were no true toggles (XOR). New queries should refrain from using XOR when not necessary.
- There are several fields which the schema has marked as NOT NULL, but the inserts don't specify
them. The reason this works is because mysql totally ignores the constraint and adds an empty text
default automatically. Again, non-compliant, obviously. In these cases a default of empty text was
added.
- Several statements rely on a non-standard MySQL feature
(http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html). These queries can all be rewritten
to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run
a zillion times faster, even on MySQL.
- A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG,
UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_
- INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes
around the value -- assist functions added in the dba_
- NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such
thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are
handled in Zot/item packets automagically by quoting all dates with dbescdate().
- char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the
code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works
better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype
for all text fields in the postgres schema. varchar was used in a couple of places where it actually
seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code
actually validates data, new bugs might come out from under the rug.
- postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted.
bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function
was added to handle this transparently.
- postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax.
Statements were updated to be standard.

These changes require corresponding changes in the coding standards. Please review those before
adding any code going forward.

Still on my TODO list:
- remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting
- Rewrite search queries for better results (both MySQL and Postgres)
2014-11-13 12:21:58 -08:00
friendica
b6ae56b069 Merge https://github.com/friendica/red into pending_merge 2014-11-07 05:16:14 -08:00
friendica
1cc1bc8e81 fix broken photo edits when adult flag is changed 2014-11-07 05:15:39 -08:00
marijus
2cfe0f1545 provide lockstate for photo edit 2014-11-07 12:13:38 +01:00
friendica
1fbd1a79c7 Provide a way to mark photos as adult and hide them from the default album view. Still need a button or setting to enable "unsafe viewing". This has no effect anywhere but in the album views. They can still be viewed by flipping through the individual photos with 'prev' and 'next'. We probably need a comprehensive strategy for how to deal with n-s-f-w photos in albums so consider this a band-aid which requires additional work and integration with other facilities which access these photos. It is entirely optional. 2014-11-06 17:27:28 -08:00
marijus
5e7e8d1089 provide a lockstate for photo uploads 2014-11-06 11:57:33 +01:00
marijus
287d5e0f10 if uploading a photo go away to album 2014-11-03 11:19:27 +01:00
marijus
2f85d12a6c if deleting a photo go away to album 2014-11-03 10:46:57 +01:00
marijus
dc5e05d334 even more photos work 2014-11-01 23:55:36 +01:00
marijus
5d151b9886 do not reload page for photo upload 2014-10-31 20:25:43 +01:00
marijus
2982212797 more work on photo upload 2014-10-31 14:33:41 +01:00
marijus
0ff4d9015b some work on photo upload 2014-10-30 14:10:55 +01:00
friendica
653305889c Merge https://github.com/friendica/red into pending_merge 2014-10-28 04:18:35 -07:00
friendica
36110831cb change photo tag bubble tip 2014-10-28 04:18:08 -07:00
marijus
ec8bab7784 change the way tagrm works to allow tag removal on the fly 2014-10-28 11:56:00 +01:00
marijus
d192bcad65 do not reload page for edit album and some minor cleanup 2014-10-27 21:31:54 +01:00
friendica
95de759766 a couple of photo tag issues 2014-10-26 21:37:59 -07:00
marijus
6497e78956 some work on photos like/dislike 2014-10-25 15:23:20 +02:00
marijus
11e8fe3085 more work on photos 2014-10-20 15:05:33 +02:00
friendica
bae3029c63 merge madness 2014-10-19 16:12:05 -07:00
marijus
997ec0911c $comments > $commentbox 2014-10-15 22:41:42 +02:00
marijus
04a254d94a some work on single photo view comments 2014-10-15 22:23:38 +02:00
marijus
dc23030dcb one more item_id > id 2014-10-15 21:17:07 +02:00
marijus
0c2d9edd83 it seems we do not have an key called item_id here so must be id only 2014-10-15 21:15:20 +02:00
marijus
55b75381ad it seems this is needed also to not allow editing profile photo album 2014-10-03 19:15:37 +02:00
marijus
df70c2c9b6 more work on photos 2014-10-02 21:04:50 +02:00
marijus
97c6ba77c7 some more work on photos 2014-09-28 23:14:49 +02:00
marijus
b948ab5955 some more work on photos - work in progress 2014-09-26 12:29:07 +02:00