Commit graph

103 commits

Author SHA1 Message Date
zotlabs
4c69a7f376 now socgraph is looping 2020-07-15 16:57:16 -07:00
zotlabs
5f1da81082 Support both zot and zot6 in social graph operations (common friends, suggestions). 2019-06-27 17:02:58 -07:00
zotlabs
e7f5ad401c cleanup 2019-05-05 23:38:29 -07:00
zotlabs
79f5866137 fix suggestion ordering 2019-04-30 23:18:39 -07:00
zotlabs
6753c789f0 don't show superblocked channels in suggestions 2019-04-29 19:29:11 -07:00
zotlabs
324ee0b5dc cleanup 2019-04-14 23:50:49 -07:00
zotlabs
eda156a5bb regression in socgraph 2018-10-15 19:29:32 -07:00
zotlabs
cebfeabc41 logic issue 2018-09-15 16:43:44 -07:00
zotlabs
048c5f65e2 old protocol string still showing 2018-09-13 22:39:05 -07:00
zotlabs
915c50064c consolidate directory functions into libzotdir 2018-06-04 23:19:16 -07:00
zotlabs
fd4ea47503 move libzot to class 2018-05-31 19:42:13 -07:00
zotlabs
59a2057fa0 fix some issues with friend suggestions on standalone sites with no 'suggestme' volunteers. This wrongly pulled up a site directory suggesting everybody on the site. While a better outcome than finding nobody, this does not fit with our ethical design goals. If there are no friends of friends, we will only suggest those who volunteer to be on the default suggestion list. Also do not attempt to load poco data from dead sites. 2018-03-04 17:40:38 -08:00
zotlabs
b05c1c391c db issue reported in hubzilla #953 - this does not do anything about the auth issue 2018-01-10 15:42:02 -08:00
zotlabs
ad6cb63e07 xlink_rating_text default value 2017-12-09 12:56:11 -08:00
zotlabs
60fcb5f4f2 don't include pending connections in poco 2017-11-18 12:29:20 -08:00
zotlabs
0b740826c5 include/socgraph - remove a few obsolete and long-deprecated functions 2017-06-01 21:22:31 -07:00
zotlabs
263efbfe39 reference to deprecated function import_author_diaspora in socgraph.php 2017-04-02 21:49:50 -07:00
redmatrix
4e07b4c0e8 even more backslashes 2016-10-03 22:01:14 -07:00
redmatrix
5e0698ba87 turn the oft-repeated block_public ... check into a function observer_prohibited() 2016-05-22 17:52:30 -07:00
redmatrix
1cb311cef9 finish updating zot_finger instances 2016-05-21 18:18:33 -07:00
redmatrix
9abd95fad3 static App 2016-03-31 16:06:03 -07:00
redmatrix
be0459a98b convert the abook fields 2015-06-14 21:08:00 -07:00
redmatrix
e68a00d381 more db structure 2015-05-19 22:43:24 -07:00
friendica
c4221f3273 Merge branch 'master' into tres
Conflicts:
	include/notifier.php
2015-04-29 21:49:43 -07:00
friendica
b3ac1cd993 mod/branchtopic - move an off-topic comment to its own thread as a fresh wall-to-wall post and the same delivery permissions as its parent. No adjustments are made for complex delivery chains. 2015-04-24 00:56:06 -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
3a3563a4b1 commit 59828593c broke some important poco stuff, looks like the cat might have climbed over the keyboard and deleted something that wasn't intended to be deleted. 2015-04-06 19:00:13 -07:00
Klaus Weidenbach
0d601563d0 Some cleanups and documentation.
Fixed some wrong variable names.
Initialized some variables before using them.
Removed some checks for STATUSNET_PRIVACY_COMPATIBILITY in
include/security.php as it does not seem to be defined anywhere.
2015-03-04 00:15:24 +01:00
friendica
59828593c1 some ratings fixes 2015-02-13 14:25:04 -08:00
friendica
912be23e16 Merge branch 'master' into tres
Conflicts:
	include/group.php
	include/text.php
	mod/acl.php
	mod/channel.php
	mod/connections.php
	mod/display.php
	mod/group.php
	mod/item.php
	mod/locs.php
	mod/network.php
	mod/photos.php
	mod/ping.php
	mod/starred.php
	mod/viewsrc.php
2015-01-29 15:09:35 -08:00
friendica
e157371c39 remote_user => remote_channel 2015-01-28 20:58:59 -08:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
friendica
a2cdd1499c Merge branch 'master' into tres
Conflicts:
	include/socgraph.php
2015-01-27 20:00:43 -08:00
friendica
0596097f86 provide storage for directory based reputation in the xlink table by setting xlink_static = 1, so that xlink_static = 0 is traditional poco linkages 2015-01-26 19:13:06 -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
friendica
b428fdf66e abstract poco into a single function in socgraph so we can provide different wrappers for it providing slightly different functionality. 2015-01-25 16:27:09 -08:00
friendica
30815e0c57 don't set a rating of 1 on old sites that report poco rating as an array. Just set it to 0. It will be fixed whenever they upgrade. 2015-01-25 00:38:38 -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
friendica
7875b79f2f get rid of really old poco records once weekly 2015-01-20 14:04:44 -08:00
friendica
9d5e972013 poco rating variable getting over-written before local storage. 2015-01-19 20:36:13 -08:00
friendica
9bedb38621 validate poco chatrooms before storing 2015-01-15 20:59:26 -08:00
friendica
1c9299ed42 more backend work on poco rating 2015-01-15 14:05:18 -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
7a9b1c4a77 illegal string offset warnings 2014-09-05 15:00:08 -07:00
friendica
80f956a622 fix the client side of poco 2014-09-04 19:45:26 -07:00
friendica
3e8e67df2c Set a default directory server from a hard-wired list if one was not previously chosen. 2014-04-25 18:10:23 -07:00
friendica
235b033560 that should fix it. 2014-03-24 19:01:20 -07:00
friendica
c8f1bf89a9 vsprintf error 2014-02-26 14:51:29 -08:00
friendica
e7e97e578b put bookmarked chatrooms into poco 2014-02-25 19:48:13 -08:00
friendica
f45b06ffa0 suggestion widget 2013-12-06 21:40:01 -08:00