aboutsummaryrefslogtreecommitdiffstats
path: root/include/directory.php
Commit message (Collapse)AuthorAgeFilesLines
* directory interface cleanup and documentation so that debugging realms won't ↵friendica2015-02-191-1/+5
| | | | be stabbing in the dark.
* PostgreSQL support initial commitHabeas Codice2014-11-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* when an admin censors a channel, we only need to notify the directory and ↵friendica2014-06-221-6/+13
| | | | not all the connections.
* Set a default directory server from a hard-wired list if one was not ↵friendica2014-04-251-7/+1
| | | | previously chosen.
* this should improve queue performance dramatically.friendica2014-03-241-2/+3
|
* implement a forced directory update mode where we unconditionally create a ↵friendica2014-02-111-2/+7
| | | | directory sync packet. This is needed to ensure that monthly directory pings are propagated to other directory servers so they can each prove for themselves whether or not an account is alive or dead. We do not trust other directories to provide us information beyond "look at this entry and decide for yourself" as doing otherwise would invite rogue directory manipulations. As this scheduled update occurs on all channels across all servers, we should also pick up refresh messages from all existing channel clones and these should also propagate out to all directory servers using the same mechanism (though perhaps not at the same time).
* reversed args in update_modtime, incorrect ud_guid and ud_hashfriendica2014-02-101-1/+1
|
* implement monthly directory pingsfriendica2013-10-281-0/+16
|
* create update record for accounts on directory server itself during profile ↵friendica2013-10-241-0/+17
| | | | changes, re-queue failed directory sync packets, fix account_id index in queue creation, be more selective about updating hubloc_connected (only when we're talking to the associated site). But we still need a way to flag dead accounts and these mechanisms won't cut it, because it isn't a requirement that channels communicate with anybody, except for contacting the directory when the account is created. I think we need to make every channel ping the directory once a month. Then we can find those that have not done so (after syncing with other directories). We can't have the directory just flag dead accounts as this would create a way for an anti-social attacker to become a directory server and mark all the accounts dead.
* populate initial suggestions (ultimately we want to do this at install time ↵friendica2013-08-051-1/+1
| | | | as well as from the poller so that new sites have friend suggestions when they create their first channel).
* fix profile update propagationfriendica2013-06-181-6/+10
|
* push refresh messages, performance work on conversations and configs, doc ↵friendica2013-06-141-1/+6
| | | | updates
* don't use permissions to block directory updates from happening. Use zfinger ↵friendica2013-05-151-6/+0
| | | | to decide what to send.
* start formatting for Doxygenfriendica2013-02-251-1/+2
|
* directory debuggingfriendica2013-02-191-0/+2
|
* master/standalone directory profile updatefriendica2012-12-261-1/+1
|
* wrong constantfriendica2012-12-201-1/+1
|
* directory page still needs a lot of work, look up locally if local master or ↵friendica2012-12-191-3/+1
| | | | standalone, need to put some basic profile info in discovery page and direct to local directory master
* send stuff to zothub as a fallback directory master for nowfriendica2012-12-181-8/+37
|
* cleanupMike Macgirvin2012-10-231-2/+2
|
* cli_startup() for directory updatesMike Macgirvin2012-10-231-23/+3
|
* rev update, bug 428, 429, and ability to block globaldir submissions from ↵friendica2012-05-211-1/+9
| | | | demo sites
* Merge branch 'master' of https://github.com/friendica/friendicaAlexander Kampmann2012-04-051-0/+0
| | | | | | Conflicts: include/config.php update.php
* add remove_user hook (it looks like dreamhost changed all my file ↵friendica2012-01-181-0/+0
| | | | permissions, this will make a nasty commit)
* load db configs (config,system) for all "executables"Friendika2011-06-301-10/+14
|
* modded scripts to be runned in cli so they can be included and executed in ↵Fabio Comuni2011-01-281-11/+21
| | | | main program
* Mods to script runned via CLI to permits to run also includedfabrixxm2011-01-241-2/+2
|
* mongo checkin, global directory, redir rework, location basicsMike Macgirvin2010-08-191-0/+28