aboutsummaryrefslogtreecommitdiffstats
path: root/include/dir_fns.php
Commit message (Collapse)AuthorAgeFilesLines
* issue #157, provide default directory sort orderfriendica2015-04-191-1/+7
|
* Correcting reported Doxygen syntax warnings.Klaus Weidenbach2015-03-291-109/+103
| | | | | | | Fixed wrong Doxygen syntax and add some of the available FIXME to Doxygen documentation. Updated Doxygen configuration to add also all capital letter tags. Adding some more Doxygen documentation.
* Allow site to over-ride directory options. Bugger off.friendica2015-03-091-38/+31
|
* major cleanup of directory optionsfriendica2015-03-051-2/+9
|
* straighten out some directory stuff, which required some Comanche structural ↵friendica2015-03-051-2/+24
| | | | changes
* require access token to view, query, or join directories in private realms, ↵friendica2015-02-241-6/+12
| | | | if the realm is so configured.
* directory interface cleanup and documentation so that debugging realms won't ↵friendica2015-02-191-5/+48
| | | | be stabbing in the dark.
* some ratings fixesfriendica2015-02-131-1/+1
|
* finish off the sync functionsfriendica2015-02-031-0/+43
|
* don't unset a directory server which has no active channels and hence will ↵friendica2015-01-181-9/+24
| | | | never have a site table update. Do this by probing the sys channel of that directory weekly and checking the directory status returned by it.
* clean up some url anomalies in dir_sort_links after security fixfriendica2015-01-081-1/+3
|
* double q argument could also cause issuesfriendica2015-01-081-1/+4
|
* SECURITY: dir_sort_links() exposes session cookiefriendica2015-01-081-2/+2
|
* fix some directory anomoliesfriendica2014-12-161-2/+4
|
* Directory sorting as a dropdown, forum filter as checkbox, option to sort ↵Stefan Parviainen2014-12-071-0/+17
| | | | oldest first
* add link to search forums in the directoryfriendica2014-11-231-2/+3
|
* minor photo flag issue - and some more whitespace editsfriendica2014-11-191-4/+4
|
* PostgreSQL support initial commitHabeas Codice2014-11-131-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* This is long overdue - use a symblic constant NULL_DATE instead of the ↵friendica2014-09-081-2/+2
| | | | easily mis-typed sequence '0000-00-00 00:00:00'
* Add check_upstream_directory() to check that your directory is stillThomas Willingham2014-08-311-0/+20
| | | | | a directory, and if it isn't, let find_upstream_directory() find you a new one.
* some more work on realmsfriendica2014-08-171-8/+22
|
* add an encoding type to formatted zot communication structures so that we ↵friendica2014-07-241-0/+1
| | | | can later add alternate encodings.
* much better fix to problem yesterday of updates with the wrong ud_addr ↵friendica2014-06-301-1/+1
| | | | | | getting updated. Now we'll pass in the update table row to import_xchan so we know exactly which ud_addr applies. We still need ud_flags passed in separately.
* log the offending dir serverfriendica2014-06-291-0/+2
|
* limit updates from new dir servers to avoid exhausting memory.friendica2014-06-291-1/+6
|
* regression: (-1) update_flag still exists in one function. This should be ↵friendica2014-06-011-1/+1
| | | | UPDATE_FLAGS_FORCED or 2.
* Set a default directory server from a hard-wired list if one was not ↵friendica2014-04-251-3/+24
| | | | previously chosen.
* directory sync issuesfriendica2014-03-031-0/+3
|
* implement a forced directory update mode where we unconditionally create a ↵friendica2014-02-111-5/+8
| | | | 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-2/+2
|
* extend the directory profiles a bit morefriendica2013-12-251-0/+4
|
* improve the directory popup a bitfriendica2013-12-231-2/+2
|
* split private messages into two modules - "message" is just for message ↵friendica2013-12-211-2/+2
| | | | lists, "mail" is for reading and writing conversations. This is so we can Comanchify it cleanly.
* Don't let nobody set an xconfig in safe search.Thomas Willingham2013-12-111-1/+2
|
* Fix missing argument warningOlaf Conradi2013-11-121-1/+1
|
* turn safemode into a proper widgetfriendica2013-11-111-0/+1
|
* More safe search - since the default is one, toggle only works afterThomas Willingham2013-11-111-1/+1
| | | | | an initial xconfig is set - the first one will turn safe search on (ie, do nothing from a users point of view). Fix that.
* Stray lineThomas Willingham2013-11-091-3/+0
|
* Clean upThomas Willingham2013-11-091-1/+1
|
* Bring safe search to the UIThomas Willingham2013-11-091-0/+18
|
* create update record for accounts on directory server itself during profile ↵friendica2013-10-241-2/+5
| | | | 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.
* extra loggingfriendica2013-10-141-1/+4
|
* sql typo in directory syncfriendica2013-10-141-1/+1
|
* directory sort links on sidebarfriendica2013-10-131-0/+11
|
* provide config for preferred directory serverfriendica2013-10-131-0/+3
|
* directory sync - this will either work, or it won't work, or it will ↵friendica2013-09-301-3/+61
| | | | | | | | | possibly recurse and blow up the matrix. Hard to say. Do you feel lucky? Well do ya' ... punk? Rule #1 - don't mess with anything unless it's blowing up the matrix. If it doesn't blow up the matrix, but doesn't work, just let it go and let's figure out what it is doing and what it isn't doing. The flow is as follows: Once a day go out to all the directory servers besides yourself and grab a list of updates. This happens in the poller. If we've never seen them before add them to the updates table. The poller also looks to see if we're a directory server and have updates that haven't yet been processed. It calls onedirsync.php to process each one. If we contact the channel to update and don't find anything (we're just doing a basic zot_finger), set a ud_last timestamp. If this is set we will only try once a day for seven days. Then we stop trying to update. This will probably cause a spike the first time through because you haven't seen any updates before, but we spread out the load over your delivery interval.
* really, truly fix the age missing in directory bugfriendica2013-07-021-1/+4
|
* for directory sync, ensure we have a fallback master; even if we have ↵friendica2013-04-181-0/+43
| | | | nothing else
* start formatting for Doxygenfriendica2013-02-251-1/+1
|
* fix localdir privacy (again)friendica2013-02-191-1/+5
|