aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
Commit message (Collapse)AuthorAgeFilesLines
* PostgreSQL support initial commitHabeas Codice2014-11-131-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* do not reload page for photo uploadmarijus2014-10-311-12/+8
|
* more work on photo uploadmarijus2014-10-311-7/+5
|
* some work on photo uploadmarijus2014-10-301-36/+13
|
* Merge https://github.com/friendica/red into pending_mergefriendica2014-10-281-1/+1
|\
| * change the way tagrm works to allow tag removal on the flymarijus2014-10-281-1/+1
| |
* | change photo tag bubble tipfriendica2014-10-281-1/+1
|/
* do not reload page for edit album and some minor cleanupmarijus2014-10-271-27/+21
|
* a couple of photo tag issuesfriendica2014-10-261-5/+11
|
* some work on photos like/dislikemarijus2014-10-251-3/+37
|
* more work on photosmarijus2014-10-201-10/+10
|
* merge madnessfriendica2014-10-191-2/+2
|
* $comments > $commentboxmarijus2014-10-151-1/+1
|
* some work on single photo view commentsmarijus2014-10-151-1/+2
|
* one more item_id > idmarijus2014-10-151-1/+1
|
* it seems we do not have an key called item_id here so must be id onlymarijus2014-10-151-1/+1
|
* it seems this is needed also to not allow editing profile photo albummarijus2014-10-031-2/+2
|
* more work on photosmarijus2014-10-021-65/+49
|
* some more work on photosmarijus2014-09-281-2/+2
|
* some more work on photos - work in progressmarijus2014-09-261-9/+12
|
* update jg to latest preview release and try once more to really justify the ↵marijus2014-09-201-11/+4
| | | | whole gallery
* set items/page back to 60marijus2014-09-111-2/+2
|
* content-complete must not be in photo-album-contentsmarijus2014-09-111-1/+4
|
* typomarijus2014-09-111-1/+1
|
* another day another concept - hope this works bettermarijus2014-09-111-6/+14
|
* wrap photo albums (albums and top level) in a div id=photo-album-contentsfriendica2014-09-081-1/+4
|
* for webpages, hide the mimetype selector unless in advanced mode. For pages ↵friendica2014-09-071-2/+2
| | | | that endless scroll and show blocky-block things, set the default items-per-page to 60. Why? It fits column-widths of 2,3,4,5,6,10,12,15, and 20 without leaving remaindered items dangling at the end. No other setting less than 100 has this much versatility.
* and more ajax workfriendica2014-09-061-2/+2
|
* ajax workfriendica2014-09-061-13/+52
|
* doc updatefriendica2014-08-151-0/+1
|
* pkcs1 to pkcs8 key conversion - this is a lot easier than parsing ASN.1 DER ↵friendica2014-08-141-0/+5
| | | | formats and rebuilding the darn things like we used to do. Check for illegal hex encoded album names in mod/photo so we don't throw php errors. Don't know where they come from but we get a lot of them.
* Add HTML5 datalist to edit photo album field.Klaus Weidenbach2014-06-221-0/+5
| | | | | | | This patch provides a datalist for the edit photo album field. This makes it easier to move a picture to another existing folder in the way that it provides a list of all available albums as values for the album field.
* oh this is nice... http://kmkeen.com/jshon - this is what we need to make ↵friendica2014-06-181-4/+2
| | | | shred -- well "shred". I also had to change the photos album list API a bit to fix any imagined and/or real parsing issues and also fixed shred so it can find its auxiliary files.
* only show jotnets when posting conversation itemsfriendica2014-06-141-1/+1
|
* photos upload - remove phantom duplicated blank album name from selection listfriendica2014-03-231-2/+1
|
* small changes to a couple of lookup functions which we need to use a bit morefriendica2014-02-201-1/+1
|
* shamelessly steal, and cut/paste from the settings page to get mod_photos ↵friendica2014-02-111-0/+4
| | | | edit permissions working - and it looks like we still have some other fancybox instances (yet another lightbox) which haven't yet been converted to colorbox and will need to be fixed. Way too many lightboxes.
* photo tagging somewhat working - but can't remove photo tags until we update ↵friendica2014-02-031-4/+22
| | | | tagrm
* photo tagging still broken - but at least don't create a new linked item ↵friendica2014-01-271-0/+4
| | | | every time a photo is edited.
* bring photo tagging back which hasn't worked since forking from Friendica - ↵friendica2014-01-191-180/+49
| | | | this is untested and displaying photo tags will now be broken as we're now storing tags with the item attached to the photo and not in the photo. But the point is we've eliminated the OStatus/SWAP0 forced spam crap and can start fresh.
* some minor cleanup on plinks for some very subtle permissions issuesfriendica2014-01-091-1/+8
|
* Pass hash and extension to the photo templates for plugins that requireThomas Willingham2014-01-081-0/+2
| | | | links we can't construct from what's already there.
* make storage limit service classes apply to accounts, not channels. Also ↵friendica2014-01-071-2/+2
| | | | include a css file that was missing from work yesterday.
* fix photos/upload album selectorfriendica2014-01-061-2/+11
|
* remove prettyphoto from core - this will affect the enhanced photo albums ↵friendica2013-12-261-14/+13
| | | | feature on the short term which has been disabled until we figure out how to make the setting per-theme instead of a core option. The library is still available in core (library/prettyphoto) currently but needs to be moved to theme js and loaded/accessed from there [for themes which use it]. Then the library will be removed. It appears that other lightboxes commonly use rel= to group photo albums. So we may provide a generic rel= tag in photo album templates so that the choice of lightbox or album viewer is not only a theme option but could also be accomplished with plugins.
* remove a couple of mysql reserved words from being used as table or row ↵friendica2013-12-221-9/+9
| | | | names. For this round we're getting 'group' and 'desc'. Warning: potentially destabilising as this touches a lot of code.
* more (somewhat minor) but important cleanup for mod_photos so visitors with ↵friendica2013-12-221-16/+12
| | | | the correct permissions to add photos can also remove them
* issue deleting photos (attached item remained undeleted and became visible, ↵friendica2013-12-221-1/+1
| | | | though the photo was gone)
* comanchificate mod_photosfriendica2013-12-191-12/+5
|
* prepare for Comanchification of mod_photosfriendica2013-12-131-1/+4
|