aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dirsearch.php
Commit message (Collapse)AuthorAgeFilesLines
* allow directory searches to be filtered by (public forums) and/or (! public ↵friendica2014-11-231-1/+12
| | | | forums)
* Fix dirsearch with quoted single-word termStefan Parviainen2014-11-181-0/+6
|
* Fix dirsearch parser to not get confused by logic terms in names and to ↵Stefan Parviainen2014-11-171-25/+28
| | | | handle quoted single word names
* Merge remote-tracking branch 'upstream/master'Habeas Codice2014-11-131-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: boot.php include/dba/dba_driver.php include/diaspora.php include/follow.php include/session.php include/zot.php mod/photos.php mod/ping.php
| * indicate public forums in directory results (there will be some [possibly ↵friendica2014-11-101-0/+2
| | | | | | | | considerable] lag time before existing forums are correctly tagged).
* | PostgreSQL support initial commitHabeas Codice2014-11-131-4/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* for webpages, hide the mimetype selector unless in advanced mode. For pages ↵friendica2014-09-071-2/+2
| | | | that endless scroll and show blocky-block things, set the default items-per-page to 60. Why? It fits column-widths of 2,3,4,5,6,10,12,15, and 20 without leaving remaindered items dangling at the end. No other setting less than 100 has this much versatility.
* retro-actively set standalone directory fix, also a fix for directory ↵friendica2014-08-281-1/+7
| | | | endless scroll when you hit the end.
* restrict returned directory contents to xchans in the zot network. We could ↵friendica2014-08-201-2/+2
| | | | probably add other networks to this and create a distributed directory for the free web. It's highly unlikely we would do this but we *could*.
* some more work on realmsfriendica2014-08-171-2/+12
|
* limit updates from new dir servers to avoid exhausting memory.friendica2014-06-291-1/+1
|
* keep dirsync from exhausting memoryfriendica2014-06-291-1/+1
|
* more work on firehosefriendica2014-03-261-0/+2
|
* failed experiment - revert the directory to 80 results per page until ↵friendica2014-03-101-1/+1
| | | | somebody implements endless scroll on the thing. 300 takes far too long to load all the images.
* update cacert.pem , don't hide url link for rmagicfriendica2014-03-091-1/+0
|
* advanced search front-endfriendica2014-03-081-0/+4
|
* back-end for advanced directory searchfriendica2014-03-081-15/+98
|
* stopgap solution until somebody implements endless scroll on the directoryfriendica2014-03-041-1/+1
|
* directory sync issuesfriendica2014-03-031-1/+6
|
* Probably shouldn't list REGISTER_CLOSED sites on a list of open hubs.Thomas Willingham2014-01-141-2/+2
|
* cut/paste errorfriendica2013-12-251-3/+3
|
* extend the directory profiles a bit morefriendica2013-12-251-0/+3
|
* improve the directory popup a bitfriendica2013-12-231-4/+1
|
* first cut at a directory popup. It's a bit annoying at the moment, so we'll ↵friendica2013-12-231-3/+15
| | | | have to make it less so. Also had second thoughts about the project homepage changes made yesterday. Just because a bunch of Reddit trolls can't get social networking out of their brain long enough to explore other technologies or even read the project page doesn't mean we should pander to them and explain how or why we either are or aren't a social network.
* dirsearch and pubsites - force non-SSL sites to float to the bottom of the listfriendica2013-11-141-1/+9
|
* removeme sort of works for a single channel - lots of loose ends to deal ↵friendica2013-11-121-4/+6
| | | | with but it's a start
* Fix safe search, and also make it an xconfigThomas Willingham2013-11-091-3/+4
|
* DB - allow private messages to expirefriendica2013-11-061-2/+2
|
* hmmph. That's why the sort order didn't change...friendica2013-11-031-2/+2
|
* make date order the default for the directoryfriendica2013-11-031-1/+1
|
* allow zot public providers to list their location, as a non US-based server ↵friendica2013-10-301-1/+1
| | | | could be a strong selling point.
* directory leaking hidden channels - logic issuefriendica2013-10-241-1/+3
|
* directory date order (sort=date)friendica2013-10-121-1/+1
|
* small fixesfriendica2013-09-301-1/+10
|
* directory sync - this will either work, or it won't work, or it will ↵friendica2013-09-301-6/+4
| | | | | | | | | 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.
* there's our directory sync packet (aka transaction log). Now we just have to ↵friendica2013-09-291-4/+14
| | | | pass them around and act on them.
* adult channel settingfriendica2013-09-221-2/+2
|
* use &safe=-1 for unsafe onlyfriendica2013-09-191-1/+4
|
* provide a "safe search" backend and allow for self-censorship using nsfw or ↵friendica2013-09-191-2/+6
| | | | adult profile keywords. Eventually the directories will be forced to mark adult profiles and sync this knowledge between them. At the moment there's no way to do an unsafe search, but we really just need a checkbox and pass the value through directory to dirsearch on the back end, and some will want this as a pconfig.
* add "tiered" access policy, add tagcloud to directory pagesfriendica2013-09-181-3/+6
|
* provide the back-end for a directory tag cloudfriendica2013-09-171-1/+9
|
* site sellpage linksfriendica2013-09-171-1/+1
|
* implement what I hope will now be the server side of directory sync, add ↵friendica2013-09-151-4/+15
| | | | viewsrc to item_photo_menu, and log what changed in import_xchan update objects so we can find out why there are so many updates when nothing _obvious_ has changed that should trigger it.
* quick fix to directoryfriendica2013-09-091-3/+3
|
* function namefriendica2013-09-051-1/+1
|
* public site list (will take a few days to populate, assuming folks have ↵friendica2013-09-051-0/+36
| | | | updated their site access policy which old sites do not have)
* Add a site access policy (to determine if this is really a public site or ↵friendica2013-08-061-4/+6
| | | | just an open site) and add an orphan flag to xchans in case all their hublocs go away. Get rid of a couple of DO NOT EDIT template messages which were still lurking in the tree.
* connect link in directoryfriendica2013-08-031-0/+2
|
* provide a way to search the directory by modification datefriendica2013-07-141-2/+12
|
* add age to dirsearch jsonfriendica2013-06-301-0/+1
|