aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* PostgreSQL support initial commitHabeas Codice2014-11-13110-648/+2256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Merge remote branch 'upstream/master'habeascodice2014-11-01399-16927/+23392
|\
| * check that we have valid datafriendica2014-11-012-10/+17
| |
| * Merge https://github.com/friendica/red into pending_mergefriendica2014-11-0112-87/+70
| |\
| | * do not reload page for photo uploadmarijus2014-10-319-43/+26
| | |
| | * Smarty3 now lives in storeThomas Willingham2014-10-311-4/+0
| | |
| | * Merge pull request #671 from pafcu/masterjeroenpraat2014-10-311-1/+4
| | |\ | | | | | | | | Fix problem with default birth date
| | | * Fix problem with default birth dateStefan Parviainen2014-10-311-1/+4
| | | |
| | * | Merge branch 'master' of https://github.com/friendica/redmarijus2014-10-3185-3609/+3601
| | |\ \
| | * | | more work on photo uploadmarijus2014-10-315-40/+41
| | | | |
| * | | | disable request message response until we work through thisfriendica2014-11-013-2/+4
| | | | |
| * | | | doc updatesfriendica2014-11-0110-0/+1049
| | |/ / | |/| |
| * | | document request packets a bit morefriendica2014-10-311-1/+4
| | | |
| * | | doc updatesfriendica2014-10-3184-3604/+3592
| | | |
| * | | flag notify packets that are sent in response to a message_id request and ↵friendica2014-10-311-4/+5
| |/ / | | | | | | | | | prevent them from recursing
| * | Heads up: "custom/module.php" is deprecated. Please read this commit if you ↵friendica2014-10-301-1/+13
| | | | | | | | | | | | are affected.
| * | Merge https://github.com/friendica/red into pending_mergefriendica2014-10-3016-429/+737
| |\ \
| | * | Debian doco - no longer uses dropbear.Thomas Willingham2014-10-311-2/+2
| | | |
| | * | removing this was not a good idea...marijus2014-10-301-0/+4
| | | |
| | * | update bootstrap library to version 3.3marijus2014-10-308-333/+660
| | | |
| | * | some work on photo uploadmarijus2014-10-307-97/+74
| | | |
| * | | What this checkin does is catch the case where a comment arrived and there's ↵friendica2014-10-308-23/+180
| | | | | | | | | | | | | | | | 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.
| * | | Merge https://github.com/friendica/red into pending_mergefriendica2014-10-291-10/+12
| |\| |
| | * | if someone does not have permission to chat do not show the chatrooms tabmarijus2014-10-291-10/+12
| | | |
| * | | allow feed pagingfriendica2014-10-292-1/+4
| |/ /
| * | 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.
| * | the default permissions for new connections when using a custom role is ↵friendica2014-10-281-1/+5
| | | | | | | | | | | | inadequate. Until we can make it configurable start off with something like a public social role. We're typically taking the person straight to the connection editor so they can change it before any privacy damage is done
| * | Merge https://github.com/friendica/red into pending_mergefriendica2014-10-283-29/+66
| |\ \
| | * \ Merge pull request #668 from git-marijus/masterRedMatrix2014-10-283-29/+66
| | |\ \ | | | | | | | | | | change the way tagrm works to allow tag removal on the fly
| | | * | change the way tagrm works to allow tag removal on the flymarijus2014-10-283-29/+66
| | |/ /
| * / / change photo tag bubble tipfriendica2014-10-282-2/+2
| |/ /
| * | several unrelated things - auto_follow wasn't working for new accounts, ↵friendica2014-10-276-13/+31
| | | | | | | | | | | | 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-2712-5996/+6185
| |\ \
| | * | do not reload page for edit album and some minor cleanupmarijus2014-10-277-57/+41
| | | |
| | * | Merge branch 'master' of https://github.com/friendica/redJeroen2014-10-273-1/+61
| | |\ \
| | * | | update nl + Terms of Service more prominent in the help files.Jeroen2014-10-275-5939/+6144
| | | | |
| * | | | add "repository" permissions role and make sure we have a sane "accept" ↵friendica2014-10-273-5/+63
| | |/ / | |/| | | | | | | | | | default for the custom role.
| * | | some documentation of permission roles and what the differences are.friendica2014-10-273-1/+61
| |/ /
| * | turn down the preview logging. Haven't needed that level of detail recently.friendica2014-10-261-2/+2
| | |
| * | 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-266-150/+157
| | | | | | | | | | | | 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-263-14/+114
| |\ \ | | | | | | | | | | | | | | | | Conflicts: mod/like.php
| | * | wrong vars in templatemarijus2014-10-261-2/+2
| | | |
| | * | some work on photos like/dislikemarijus2014-10-254-15/+114
| | | |
| * | | allow photos without comments to be likedfriendica2014-10-262-3/+16
| |/ /
| * | moved post_to_red to its own project ( https://github.com/friendica/wptored ↵friendica2014-10-253-533/+1
| | | | | | | | | | | | ), which I was planning to do anyway since it's kind of lost in the util folder, but also because having it there may present licensing issues, as it's GPL.
| * | the to-do list is getting longer again.friendica2014-10-241-0/+3
| | |