aboutsummaryrefslogtreecommitdiffstats
path: root/mod/connections.php
Commit message (Collapse)AuthorAgeFilesLines
* PostgreSQL support initial commitHabeas Codice2014-11-131-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* endless scroll on connections pagefriendica2014-09-101-16/+37
|
* add collections widget to connections page - and some more work on realmsfriendica2014-08-171-0/+3
|
* provide a specific permission for liking profiles (reuse the obsolete ↵friendica2014-07-171-11/+11
| | | | bookmark permission), also remove the unused 'unconnected contacts' view for now.
* fix active statemarijus2014-06-141-0/+1
|
* ifpending repaired again. Hope it works as intended now.sasiflo2014-05-041-1/+1
|
* hopefully this will fix itfriendica2014-05-041-2/+2
|
* ifpending repaired. Show page "all contacts" directly if no pending connections.sasiflo2014-05-041-1/+2
| | | | | Tried to repair. Think the merge of flags was wrong in the last commit.
* better mapping of visible connectionsfriendica2014-04-141-7/+5
|
* subdue archived connections in mod/connectionsfriendica2014-04-061-1/+1
|
* more work on #395friendica2014-04-061-4/+3
|
* finish "ifpending" connectionsfriendica2014-04-041-1/+4
|
* introduce a connection type called 'ifpending' for number 6 of issue #395 - ↵friendica2014-04-041-0/+20
| | | | so that we can still have an unconditional 'pending' link. Needs testing before integrating with the nav menu
* change flags for one-way connections from hidden to unconnected so we can ↵friendica2014-03-041-17/+30
| | | | still use hidden for - well hiding connections
* allow one to ignore pending connectionsfriendica2014-02-281-1/+2
|
* fixes to thing profile assignmentsfriendica2014-02-111-1/+1
|
* accept new connection broke yesterdayfriendica2014-02-031-0/+2
|
* default photo issue, and connections page showing deleted accounts. Also ↵friendica2013-12-191-3/+5
| | | | show last updated on connedit page
* more comanchefriendica2013-12-191-17/+0
|
* split off mod_connections into mod_connections & mod_connedit - lots of ↵friendica2013-12-181-333/+3
| | | | links to fix
* bring back the collection edit sidebar widget on the connection edit page ↵friendica2013-12-161-1/+1
| | | | until I sort out Comanche on that page.
* slight mod of connections widgetsfriendica2013-12-091-1/+1
|
* migrate follow widget to comanche and remove obsolete mod/intro.phpfriendica2013-12-091-1/+1
|
* suggestion widget tweaked to make it comanche capable. Remove old versions ↵friendica2013-12-081-1/+3
| | | | of specs that are so obsolete it isn't funny. Zot protocol reference is in red's github wiki, and in the code. We should move the github copy to /doc once it is updated to match the code. There's no point in documenting dfrn in the red code base.
* add suggestions to a couple of other pagesfriendica2013-12-061-0/+2
|
* refactor magic-authfriendica2013-12-021-1/+0
|
* make the template processor (e.g. replace_macros) pluggablefriendica2013-11-281-1/+1
|
* follow and accept_follow hooksfriendica2013-11-211-0/+8
|
* make default group for new connections workfriendica2013-11-211-0/+9
|
* populate some posts when somebody is granted "read stream" permissionfriendica2013-11-171-0/+3
|
* return a login form on some protoected pages if not logged in.friendica2013-11-021-3/+3
|
* Don't set widgets if you're not a local user.Thomas Willingham2013-11-021-0/+3
|
* remove the disabled flag on individual permissions and improve the text to ↵friendica2013-10-131-1/+2
| | | | | | show that settings may be inherited. The reason for this change is that we want the individual settings to be stored regardless of the inherited settings, because if somebody changes the higher precedence privacy settings it could leave all their existing contacts with no permissions and this could be a support nightmare. So this way if somebody starts off with "anybody on the network can send me their stream and posts" and later changes it to "only specific connections can send me their stream and posts", the individual setting will already be set for all their connections. The previous behaviour is that this setting would have been disabled so none of their existing connections will have this specific permission. Old-timers who were here and made lots of connections before this commit - will have to edit all their connections if they change their privacy settings from lesser restrictive to be more restrictive.
* Issue #158friendica2013-09-291-0/+7
|
* Preparatory work for photo conversations (third time). Also take away unused ↵friendica2013-08-271-0/+9
| | | | "post new activity" preferences until they actually do something.
* not able to drop pending connectionsfriendica2013-08-151-1/+2
|
* string parse error extracting one particular stringfriendica2013-08-091-1/+1
|
* don't show connections with removed xchans - as there isn't much to seefriendica2013-08-041-19/+17
|
* minor - change nav_set_selected() to only highlight intros if on that ↵friendica2013-08-011-1/+1
| | | | particular connections page and not for any connections page.
* make "selected" class work on all navigation menu itemsmarijus2013-08-011-1/+1
|
* the rest of the heavy lifting on clone sync - now we're down to some log ↵friendica2013-07-251-0/+1
| | | | messages and a whole lot of testing
* more work on clone syncfriendica2013-07-251-1/+1
|
* use current channel photo for favicon where applicable - might be browser ↵friendica2013-07-071-0/+5
| | | | dependent but seems to work on FF
* progress on multiple profiles, doing it the old way. I don't think we're ↵friendica2013-07-031-7/+8
| | | | going to be able to do it the new way - way too complicated.
* more work on channel syncfriendica2013-06-261-1/+1
|
* more nomadic clone syncfriendica2013-06-261-6/+31
|
* set default contact affinity back to 99 - we'll solve the other problem ↵friendica2013-05-241-1/+1
| | | | another way, this one is flawed
* make 90 the default closeness when humans are involved in the processfriendica2013-05-231-1/+1
|
* more permissions descriptive text to lessen confusionfriendica2013-05-211-2/+4
|
* issue with auto permissionsfriendica2013-05-191-1/+9
|