Commit graph

87 commits

Author SHA1 Message Date
redmatrix
5805a54097 directory search for pubforums using hubzilla directory servers using redmatrix flag value 2015-11-19 16:44:12 -08:00
redmatrix
54059b2f15 Merge https://github.com/redmatrix/redmatrix into pending_merge 2015-10-19 20:36:22 -07:00
redmatrix
f00887ea42 add project info to pubsite list 2015-10-19 20:35:44 -07:00
redmatrix
e5f47cd14b create site records for all queued sites and check for death 2015-09-28 17:13:11 -07:00
redmatrix
4c319a98a8 fix some merge errors 2015-05-18 17:20:59 -07:00
friendica
6679734135 Merge branch 'master' into tres
Conflicts:
	include/Contact.php
	include/ItemObject.php
	include/api.php
	include/attach.php
	include/diaspora.php
	include/dir_fns.php
	include/enotify.php
	include/event.php
	include/expire.php
	include/items.php
	include/notifier.php
	include/notify.php
	include/photos.php
	include/taxonomy.php
	include/text.php
	include/widgets.php
	include/zot.php
	mod/admin.php
	mod/channel.php
	mod/dirsearch.php
	mod/display.php
	mod/editwebpage.php
	mod/events.php
	mod/home.php
	mod/item.php
	mod/manage.php
	mod/mood.php
	mod/network.php
	mod/page.php
	mod/photos.php
	mod/ping.php
	mod/post.php
	mod/thing.php
	mod/viewsrc.php
	view/css/mod_events.css
2015-04-23 19:49:41 -07:00
friendica
558246257c separate the hub query since it changes the logic default and cannot easily be grouped 2015-04-07 13:51:51 -07:00
friendica
04959a095f make the findpeople widget honour the local/global directory setting 2015-04-06 16:14:12 -07:00
Habeas Codice
1578c49976 substr() is a mysql alias for substring(). substring() is in the SQL standard and is supported by both
databases.
2015-03-12 00:28:49 -07:00
friendica
aac4affe65 directory: fix public forum listing 2015-03-07 15:21:23 -08:00
friendica
f6da235a7d major cleanup of directory options 2015-03-05 23:31:01 -08:00
friendica
bd4d2f3b44 make alpahabetic searches start with A 2015-03-05 19:16:50 -08:00
friendica
08f054130f require access token to view, query, or join directories in private realms, if the realm is so configured. 2015-02-24 16:36:27 -08:00
friendica
4b348d2489 Merge branch 'master' into tres
Conflicts:
	view/css/mod_events.css
	view/theme/redbasic/css/style.css
2015-02-05 19:38:43 -08:00
friendica
86771547e6 finish off the sync functions 2015-02-03 18:35:54 -08:00
friendica
c417a43338 styling for the directory page when it comes to ratings 2015-02-03 15:50:12 -08:00
friendica
36b756e4cd honour block public setting - especially for standalones 2015-02-03 15:16:03 -08:00
friendica
77379029f5 add ratings to the directory sync arrays 2015-02-02 21:07:46 -08:00
friendica
e6a5f78003 Merge branch 'master' into tres
Conflicts:
	include/zot.php
2015-01-31 00:50:20 -08:00
friendica
9b3b0b5e88 basic query for number of raters. Should probably be a join or subselect but that will take a bit more fiddling 2015-01-28 17:39:53 -08:00
friendica
ac594183c6 Merge branch 'master' into tres and add some work on the item_deleted flag refactor
Conflicts:
	include/attach.php
	include/onedirsync.php
	include/zot.php
	mod/locs.php
2015-01-26 18:27:03 -08:00
Habeas Codice
891d231bbe rand() fixes 2015-01-23 17:25:05 -08:00
Habeas Codice
6d291d880e directory server dba sql fixes 2015-01-21 21:25:50 -08:00
friendica
51848c6190 working through the xchan table to remove bitfields, mostly complete except for updating the updater 2015-01-20 19:33:19 -08:00
Stefan Parviainen
647311db3e Directory sorting as a dropdown, forum filter as checkbox, option to sort oldest first 2014-12-07 12:31:12 +01:00
friendica
5bb794cc28 allow directory searches to be filtered by (public forums) and/or (! public forums) 2014-11-23 18:22:19 -08:00
Stefan Parviainen
c8c061d0cf Fix dirsearch with quoted single-word term 2014-11-18 13:48:22 +01:00
Stefan Parviainen
ece9819b4d Fix dirsearch parser to not get confused by logic terms in names and to handle quoted single word names 2014-11-17 18:51:37 +01:00
Habeas Codice
ac27db22c1 Merge remote-tracking branch 'upstream/master'
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
2014-11-13 13:06:31 -08:00
Habeas Codice
1a5a5c7edb PostgreSQL support initial commit
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)
2014-11-13 12:21:58 -08:00
friendica
5619902776 indicate public forums in directory results (there will be some [possibly considerable] lag time before existing forums are correctly tagged). 2014-11-10 17:44:02 -08:00
friendica
75fc3a8ceb for webpages, hide the mimetype selector unless in advanced mode. For pages 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. 2014-09-07 19:16:48 -07:00
friendica
95def2a247 retro-actively set standalone directory fix, also a fix for directory endless scroll when you hit the end. 2014-08-28 19:05:13 -07:00
friendica
b8a5b7a610 restrict returned directory contents to xchans in the zot network. We could 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*. 2014-08-20 19:36:01 -07:00
friendica
4a76925787 some more work on realms 2014-08-17 19:06:56 -07:00
friendica
33034bc9b6 limit updates from new dir servers to avoid exhausting memory. 2014-06-29 18:18:29 -07:00
friendica
cc22c1da50 keep dirsync from exhausting memory 2014-06-29 18:11:10 -07:00
friendica
ed14c1f224 more work on firehose 2014-03-26 18:45:01 -07:00
friendica
09dde2810c failed experiment - revert the directory to 80 results per page until somebody implements endless scroll on the thing. 300 takes far too long to load all the images. 2014-03-10 23:47:45 -07:00
friendica
a79072ce47 update cacert.pem , don't hide url link for rmagic 2014-03-09 13:53:55 -07:00
friendica
bef416a2d1 advanced search front-end 2014-03-08 17:39:20 -08:00
friendica
20ef3aee72 back-end for advanced directory search 2014-03-08 15:53:55 -08:00
friendica
4da73d7d84 stopgap solution until somebody implements endless scroll on the directory 2014-03-04 19:34:04 -08:00
friendica
3d49bf0320 directory sync issues 2014-03-03 21:00:42 -08:00
Thomas Willingham
a49704fdb6 Probably shouldn't list REGISTER_CLOSED sites on a list of open hubs. 2014-01-14 03:50:32 +00:00
friendica
c1875bcc37 cut/paste error 2013-12-25 02:04:52 -08:00
friendica
fe00e9b261 extend the directory profiles a bit more 2013-12-25 01:57:04 -08:00
friendica
8194ade886 improve the directory popup a bit 2013-12-23 19:44:23 -08:00
friendica
b08d4cc1fe first cut at a directory popup. It's a bit annoying at the moment, so we'll 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. 2013-12-23 17:24:25 -08:00
friendica
bf709d49ba dirsearch and pubsites - force non-SSL sites to float to the bottom of the list 2013-11-14 18:36:09 -08:00