Commit graph

229 commits

Author SHA1 Message Date
redmatrix
a2cec8899a daemon conversion continued... 2016-05-19 22:26:37 -07:00
redmatrix
39bc0664a7 Separate cron into periodic components and use that as the main interface for scheduled tasks instead of the quaint 'poller'. 2016-05-19 21:22:04 -07:00
redmatrix
9cb1ac3de5 daemon master: create some compatibility code 2016-05-19 20:36:32 -07:00
redmatrix
43c2b22fca cli utilities - argc and argv reversed. Not functionally incorrect since it was consistent but aesthetically incorrect. 2016-05-17 19:49:21 -07:00
redmatrix
1f0e603992 expire delivery reports at 10 days by default instead of 30. 2016-01-04 22:12:36 -08:00
redmatrix
0b1b11ea53 heavy lifting for delivery reports 2015-09-22 02:32:04 -07:00
redmatrix
97b990c9bf site checking stuff 2015-09-14 19:16:25 -07:00
redmatrix
6cc60ba477 initial work on obj import, rename import_profile_photo to import_xchan_photo to more accurately state its purpose. 2015-09-01 22:03:10 -07:00
redmatrix
c865f17dc0 schedule a doco update once weekly 2015-08-30 22:46:00 -07:00
redmatrix
be0459a98b convert the abook fields 2015-06-14 21:08:00 -07:00
redmatrix
ca870dbf31 more work on item table optimisation 2015-06-10 16:59:04 -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
6f78d7a85d fix regdir 2015-03-31 21:06:48 -07:00
Mario Vavti
1821b099df this query can take quite a while if there were many updates but it has not been called for a long time (eg nobody called mod sharedwithme). might be a good idea to have this in the poller to clean up on a regular basis and call it once more in mod sharedwithme. what do you think? 2015-03-24 10:56:02 +01:00
friendica
ccef9e5636 put a lower time limit on time travellers 2015-03-22 18:23:37 -07:00
friendica
b1fd6c53a5 tweaks to directory registrations which don't seem to be happening, also downgrade any directory that claims to be a primary directory for RED_GLOBAL. 2015-03-19 15:56:30 -07:00
friendica
36af426538 Nag hub admins with self-signed certs to fix them. Otherwise we'll just have to start
marking them as dead sites.
2015-03-01 20:14:42 -08:00
friendica
aafed50a0e Merge branch 'master' into tres 2015-02-01 20:30:47 -08:00
friendica
b1a92d620e two tracks proceeding in parallel - first adding the ability to store a digital signature with ratings so that directories can pass them around, second provide some directory registration functions so we can obtain a list of directories from somewhere (to pass ratings around between them). This gives the primary directory role some value as that is where you register your directory. 2015-02-01 15:10:52 -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
4c2a1e572a start on item_restrict conversion 2015-01-22 21:04:54 -08:00
Habeas Codice
9d9be768c5 fix dir server query take 2
rationale: use latest entry rather than latest update. update timestamp is updated for all entries upon success so they
are equivalent. prevents dupes from fake null dates.
2015-01-22 09:25:34 -08:00
Habeas Codice
90fbfb313e Rework directory server update selection query 2015-01-20 20:59:08 -08:00
friendica
7875b79f2f get rid of really old poco records once weekly 2015-01-20 14:04:44 -08:00
friendica
d3830aea96 provide last successful poll run time (using relative time) in siteinfo so that we can tell folks that have no idea what we're talking about that their poller definitely isn't running and this is probably why nothing works correctly. 2014-12-21 18:40:25 -08:00
friendica
1c249a5b06 some poller optimisations and a fix for undefined (empty) dbtype which shows up as a mysql error that 'rand' isn't found. 2014-11-16 15:51:42 -08: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
961049f5fa revert that bit 2014-11-07 12:16:13 -08:00
friendica
1fbd1a79c7 Provide a way to mark photos as adult and hide them from the default album view. Still need a button or setting to enable "unsafe viewing". This has no effect anywhere but in the album views. They can still be viewed by flipping through the individual photos with 'prev' and 'next'. We probably need a comprehensive strategy for how to deal with n-s-f-w photos in albums so consider this a band-aid which requires additional work and integration with other facilities which access these photos. It is entirely optional. 2014-11-06 17:27:28 -08:00
Thomas Willingham
1fb2de6d55 Typo 2014-10-21 17:27:13 +01:00
Thomas Willingham
58431f948e Screwed up merge - put Mike's stuff back. 2014-10-20 19:35:02 +01:00
Thomas Willingham
48b2eafcaa Prevent more than one instance of the poller running at a time. 2014-10-20 19:31:47 +01:00
friendica
c909b8be06 don't auto-archive connections we can't poll. 2014-10-19 21:41:38 -07:00
Paolo Tacconi
15c1529e83 query for statistics are now executed by poller 2014-10-02 13:43:48 +02:00
friendica
0dc33900b6 provide a way to sync locations and get rid of bogus hublocs, now implemented 2014-09-14 22:19:19 -07:00
friendica
21290bffce one more time 2014-09-08 20:47:36 -07:00
friendica
b56e49d196 missed one 2014-09-08 20:45:17 -07:00
friendica
c6d07feff5 This is long overdue - use a symblic constant NULL_DATE instead of the easily mis-typed sequence '0000-00-00 00:00:00' 2014-09-08 20:35:15 -07:00
friendica
844087bc71 implement service class for feed polling frequenecy, fixed a service class bug, moved service class stuff from plugin to account.php where it belongs and load that by default instead of on demand 2014-09-03 19:07:14 -07:00
Thomas Willingham
1c0be39943 Merge remote-tracking branch 'upstream/master' 2014-09-02 01:57:30 +01:00
friendica
2a37d99958 get out the sunnies 2014-08-31 22:15:00 -07:00
Thomas Willingham
473e582d1f Add check_upstream_directory() to check that your directory is still
a directory, and if it isn't, let find_upstream_directory() find you
a new one.
2014-08-31 16:58:17 +01:00
friendica
f11856f839 allow a site to run cron daily at a chosen hour 2014-07-16 16:21:01 -07:00
friendica
376a51f8d8 doc updates 2014-06-06 23:56:52 -07:00
friendica
2386bc4d00 bring back birthdays 2014-06-02 17:49:19 -07:00
friendica
2a6d7b6a07 cleanup dead directory entries. This was a real b#tch, so keep your eye out for issues - which you shouldn't see until next weekend when this is scheduled to run. We're only setting flags, so if anything goes wrong we should be able to recover without too much pain. 2014-05-28 21:42:46 -07:00
Thomas Willingham
1093e8d83e Default discover to on. 2014-03-30 22:59:37 +01:00