aboutsummaryrefslogtreecommitdiffstats
path: root/mod
Commit message (Collapse)AuthorAgeFilesLines
* PostgreSQL support initial commitHabeas Codice2014-11-1348-234/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* check that we have valid datafriendica2014-11-011-10/+16
|
* do not reload page for photo uploadmarijus2014-10-311-12/+8
|
* more work on photo uploadmarijus2014-10-311-7/+5
|
* Merge https://github.com/friendica/red into pending_mergefriendica2014-10-301-36/+13
|\
| * some work on photo uploadmarijus2014-10-301-36/+13
| |
* | What this checkin does is catch the case where a comment arrived and there's ↵friendica2014-10-302-2/+16
| | | | | | | | a missing top-level post to match it with. So we'll send a request back to the sender that you've never seen this thread and please send a fresh copy of the entire conversation to date. We could soon have posts in the matrix from different platforms from days gone by, which have been migrated into the modern world. We'll be polite and not deliver these to everybody. However, if someone comments on one of these antique threads we wouldn't be able to see it in our own matrix because we won't have a copy of the parent post. So this rectifies that situation. Be aware that item deletion may need to change to keep "hard deleted" items indefinitely so that they don't keep coming back. We'll have to null out the important data of the former item to accomplish the deletion aspect.
* | allow feed pagingfriendica2014-10-291-0/+3
|/
* if any privacy tags are created on a top level post, restrict the post; ↵friendica2014-10-281-1/+14
| | | | since it could have been quite sensitive. If there were errors processing the actual tag restrict the post to the profile owner. Also make the "privacy tag over-rides ACL" behaviour configurable. Default is that privacy tags over-ride the ACL.
* Merge https://github.com/friendica/red into pending_mergefriendica2014-10-282-28/+65
|\
| * change the way tagrm works to allow tag removal on the flymarijus2014-10-282-28/+65
| |
* | change photo tag bubble tipfriendica2014-10-281-1/+1
|/
* several unrelated things - auto_follow wasn't working for new accounts, ↵friendica2014-10-272-5/+6
| | | | error returned in private mention to a collection, and added auto-completion to photo tags; though it only matches people so the hover text is now wrong. Also made the photo edit form XHTML (XML) compliant.
* Merge https://github.com/friendica/red into pending_mergefriendica2014-10-271-27/+21
|\
| * do not reload page for edit album and some minor cleanupmarijus2014-10-271-27/+21
| |
* | add "repository" permissions role and make sure we have a sane "accept" ↵friendica2014-10-271-0/+6
|/ | | | default for the custom role.
* a couple of photo tag issuesfriendica2014-10-262-23/+34
|
* couple of other places where we need to reset stuff completely if the role ↵friendica2014-10-261-6/+11
| | | | changes
* reset ACL just in case it was custom already.friendica2014-10-261-1/+1
|
* put privacy role selector in settings page. Change visibility of various ↵friendica2014-10-261-117/+107
| | | | permissions items accordingly.
* use intval rather than dbesc since these are ints. Should work regardless, ↵friendica2014-10-261-2/+2
| | | | but this makes it consistent with the way we do most other queries.
* Merge https://github.com/friendica/red into pending_mergefriendica2014-10-261-3/+37
|\ | | | | | | | | Conflicts: mod/like.php
| * some work on photos like/dislikemarijus2014-10-252-4/+37
| |
* | allow photos without comments to be likedfriendica2014-10-261-2/+15
|/
* make bbcode/html includes work in markdown help pages and vice versazottel2014-10-241-7/+19
|
* Issue #661Thomas Willingham2014-10-241-1/+1
|
* don't offer forum (@name+) completion in comments, since it won't do anything.friendica2014-10-231-2/+2
|
* improved wall-to-wall detection for comments so we can handle Diaspora ↵friendica2014-10-221-6/+16
| | | | | | | signing and wall-to-wall attribution correctly. Do it at the point of submission. This also fixes a potential bug in yesterday's wall-to-wall permission setting, if it was a local comment to a remote post.
* Merge pull request #655 from pafcu/masterRedMatrix2014-10-221-7/+26
|\ | | | | Better handling of incorrect info entered in event
| * If entered event info is not valid, let user try again with the old info ↵Stefan Parviainen2014-10-211-7/+26
| | | | | | | | still there. Closes friendica/red#648
* | private forum issuesfriendica2014-10-211-0/+15
| |
* | wrong template loaded issuefriendica2014-10-201-1/+1
| |
* | Merge https://github.com/friendica/red into pending_mergefriendica2014-10-201-10/+10
|\|
| * more work on photosmarijus2014-10-201-10/+10
| |
* | move all theme initialisation to one place - just after calling module_init. ↵friendica2014-10-201-4/+18
|/ | | | Revert if there are serious issues, but please note the issues in as much detail as possible so we can work through them.
* merge madnessfriendica2014-10-193-57/+10
|
* missing event permissionsfriendica2014-10-151-0/+1
|
* $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
|
* chanman is now 'locs' and a couple of post handlers have been defined.friendica2014-10-142-31/+90
|
* fix import sql errorfriendica2014-10-131-1/+1
|
* When you delete something in /cloud stay in the right folder.Klaus Weidenbach2014-10-141-20/+27
| | | | | | | When you deleted a file in /cloud you was always jumped back to /cloud/[channel], now you will stay in the parent folder. Some more doxygen documentation. Removed duplicate data from logging output and reduced logging in RedDAV in general.
* A fix, but I have no case to verify.Klaus2014-10-121-2/+2
| | | I could not find out under which conditions this is relevant and therefore have no test case, but it must be of instance RedDAV\RedFile.
* Moved classes from reddav.php into own files.Klaus Weidenbach2014-10-121-2/+2
| | | | | | Finished moving classes out from include/reddav.php into own files. Also continued with namespace for RedDAV. Improved some docs and added some todos and fixmes.
* Show tag in siteinfo. Not useful for us, quite useful for admins.Thomas Willingham2014-10-111-1/+4
|
* FFS, another oopsThomas Willingham2014-10-111-2/+0
|
* Fix webpages. Sycning between too many codebases...Thomas Willingham2014-10-111-1/+3
|
* Unbreak webpagesThomas Willingham2014-10-111-3/+1
|