Commit graph

62 commits

Author SHA1 Message Date
Mike Macgirvin
6008fbc3d7 updates from hz 2023-02-16 07:16:58 +11:00
Mike Macgirvin
7dffca2054 add rejections to $hidden_activities 2023-01-02 14:02:11 +11:00
Mike Macgirvin
798ebd2981 hubloc confusion 2022-12-22 05:48:23 +11:00
Mike Macgirvin
2a8f93c732 hubloc_delete query issue 2022-11-06 19:29:51 +11:00
Mike Macgirvin
89065d9d2a missing use statement. 2022-09-11 17:41:37 +10:00
Mike Macgirvin
511363a3a6 cleanup 2022-09-05 08:39:58 +10:00
Mike Macgirvin
8803be2ca3 cleanup 2022-08-25 21:43:03 +10:00
Mike Macgirvin
d711dc141e hubloc refactor continued - hubloc_delete() 2022-06-17 19:24:50 -07:00
Mike Macgirvin
6c91a91561 use hubloc_delete 2022-06-17 19:01:56 -07:00
Mike Macgirvin
b26c877670 superfluous 'and' in new query during tests 2022-06-16 23:12:42 -07:00
Mike Macgirvin
35e02f25d6 begin hubloc refactor 2022-06-16 19:46:54 -07:00
nobody
a8e96322f0 it's done 2022-02-15 20:08:28 -08:00
nobody
cbd8c77873 revert clearing primary on dead channels. Mark the hubloc deleted instead. Zotfinger will redirect to any living clones we know about. By default, Zotfinger requests will recurse, but this can be disabled if needed. 2022-01-23 11:43:23 -08:00
nobody
d46dd6aeb8 psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
nobody
f602a393a5 psr12 updates 2021-12-03 10:02:31 +11:00
nobody
0f62a46844 cleanup 2021-04-12 20:49:58 -07:00
nobody
1a595f4273 hubloc_mark_as_down() - also set site_dead 2020-10-18 17:59:41 -07:00
zotlabs
b44f194aa8 Deprecate the term 'master' from the codebase. 2020-06-15 00:29:56 -07:00
zotlabs
7364a82f5d remove old twitter stuff 2019-04-15 21:55:59 -07:00
zotlabs
5ef1b23d0f fixes from upstream 2018-10-30 21:28:51 -07:00
zotlabs
6baf4441e0 get rid of the deprecated location message type 2018-07-17 17:26:26 -07:00
zotlabs
b7356eda49 start fresh after a lot of heavy lifting and fix a lot of stuff 2018-06-03 21:23:34 -07:00
zotlabs
fd4ea47503 move libzot to class 2018-05-31 19:42:13 -07:00
zotlabs
d101ea88ca more zot6 work 2018-05-23 21:48:19 -07:00
zotlabs
33bb89729c hubzilla issue #1019 - punycode urls on connedit page when displaying locations 2018-03-29 02:26:25 -07:00
zotlabs
cc0cd0b292 more generalisation of commonly used code constructs 2018-02-01 17:17:23 -08:00
zotlabs
c92bb6176a more separation of complex code into separate functions 2018-02-01 15:09:51 -08:00
zotlabs
d6c23486d5 create site_store_lowlevel() to initialise data structures for the site table 2017-04-03 16:43:30 -07:00
Klaus Weidenbach
2e2f984c45 Add some documentation for import functions. 2017-03-30 23:06:00 +02:00
zotlabs
7b065365e0 consolidate hubloc storage 2017-01-30 15:01:22 -08:00
zotlabs
5aa0017e91 provide lowlevel xchan storage function to ensure that all non-null rows are initialised 2017-01-28 15:01:19 -08:00
zotlabs
b530d1d449 perform input validation on xchan_store and re-enable the post method of the xchan api endpoint. 2016-12-26 13:10:24 -08:00
zotlabs
3c302bae5a move all the zid related stuff to one file 2016-11-13 20:22:01 -08:00
zotlabs
103cd2b7a1 provide 'per-page' caching for is_matrix_url() results to reduce duplicate queries 2016-11-13 16:12:36 -08:00
redmatrix
a2cec8899a daemon conversion continued... 2016-05-19 22:26:37 -07:00
redmatrix
7732532964 handle UNO move channel operation 2016-03-09 15:56:51 -08:00
redmatrix
dbeae16dc1 add site_type to queries, first few - several more to go. 2015-09-28 04:21:29 -07:00
redmatrix
97b990c9bf site checking stuff 2015-09-14 19:16:25 -07:00
redmatrix
fd708b28b8 ping site function (taken from admin/hubloc) 2015-09-13 22:48:18 -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
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
f2127d4ba7 limit notification detail queries for items and events 2015-03-23 15:36:17 -07:00
friendica
62b2fa6ac7 operation snakebite, cont. 2015-03-22 20:30:23 -07:00
friendica
ba7bdd79b7 queue management actions. Still needs further work such as indication of last successful connection or indication that the hub was marked offline, but these are potentially expensive queries. 2015-03-01 15:55:27 -08:00
friendica
2b44c5fc72 Fix a couple of places where we weren't checking for dead hublocs. Add a function to mark a hubloc dead. 2015-02-27 13:43:12 -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
ee3eee425c that should take care of the bitfields in hubloc 2015-01-20 16:13:18 -08:00
friendica
6f11f20992 first cut at unpacking bitfields in hubloc, fixed hubloc_error and hubloc_deleted 2015-01-20 15:35:42 -08:00
friendica
1780ba5e7d don't remove obsolete hublocs that have no sitekey - it will remove all kinds of other hublocs it isn't supposed to (e.g. diaspora). 2014-12-14 22:54:27 -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