Commit graph

86 commits

Author SHA1 Message Date
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
Thomas Willingham
353ccaac05 Issue #99 2013-08-18 05:03:04 +01:00
friendica
d467544bb7 fine tuning the error checks 2013-08-05 20:46:25 -07:00
friendica
790c6507d5 keep total of imported xchans correct - even if one or mail failures occur 2013-08-05 20:36:05 -07:00
friendica
d5e873f549 more error checking in case import_xchan fails 2013-08-05 20:32:58 -07:00
friendica
18f8fcf9e7 use url part of array 2013-08-05 20:20:34 -07:00
friendica
8d2debca7e prune old suggested channels 2013-08-05 20:15:33 -07:00
friendica
c2f97f7490 populate initial suggestions (ultimately we want to do this at install time as well as from the poller so that new sites have friend suggestions when they create their first channel). 2013-08-05 20:08:35 -07:00
friendica
c86dfd2e0c directory server sitelist module (needed for public site list and building friend suggestions for new sites/channels with no known contacts) 2013-08-04 21:20:03 -07:00
friendica
6845d22285 hide hidden entries 2013-03-05 21:04:47 -08:00
friendica
4062be2869 basic friend suggestions (but not "new to the network and have no friends at all" suggestions) 2013-03-05 21:00:25 -08:00
friendica
ea3940c4b0 start formatting for Doxygen 2013-02-25 17:09:40 -08:00
friendica
cfd0dc1bff little fixes 2013-02-24 20:21:37 -08:00
friendica
e754845c80 add rating support to poco 2013-02-15 22:34:01 -08:00
friendica
b19764c9a1 fix to common friends - it seems it counts the right number of common friends, but they are all you 2013-02-13 04:12:13 -08:00
friendica
ce95b1f68c clean up some sql errors from the logs 2013-02-08 16:26:00 -08:00
friendica
982034b87d update friends in common tool now that poco is working 2013-01-31 17:55:52 -08:00
friendica
89c6fc939d Someday the social graph will work, but alas not today. Add more debugging. 2013-01-28 18:07:31 -08:00