aboutsummaryrefslogtreecommitdiffstats
path: root/include/hubloc.php
Commit message (Collapse)AuthorAgeFilesLines
* fix php warningsMario Vavti2022-10-201-2/+2
|
* allow zotfinger to recurse through all known hublocs if the one we got does ↵Mario2022-02-011-1/+10
| | | | not exist (404) or got removed (410). add functions for updating tables from array and deleting hublocs.
* remove duplicate singletons hublocs once a dayMario2021-05-051-0/+3
|
* use hubloc_hash instead of hubloc_id_url - otherwise it will bite hublocs ↵Mario2021-05-051-17/+10
| | | | which use more than one protocol
* introduce function to remove duplicate singleton hublocsMario2021-05-021-5/+49
|
* try to fix more hubloc anomalies: use refresh_all in ↵Mario2020-12-171-1/+3
| | | | | remove_obsolete_hublocs() and use Libzot::encode_locations() instead of zot_encode_locations() in notifier (cherry picked from commit dec4ceabb5e036dfdab50f499dd2a26fe4eeebf7)
* fix ping_site()Mario2020-11-151-20/+8
|
* provide info about dead sites in delivery report and set site_dead when ↵Mario2020-10-191-0/+8
| | | | marking a hubloc down.
* fix z6_discover() to do the right thing after transitionMario2020-03-261-2/+2
|
* another fix for z6_discover() and create a zot6 hubloc if applicableMario Vavti2019-03-281-1/+1
|
* fix various issues in z6_discover()Mario Vavti2019-03-271-3/+5
|
* fix wrong field nameMario Vavti2019-03-241-2/+2
|
* find unregistered z6 clones on hubzilla sites (does not happen automatically ↵zotlabs2019-03-131-0/+36
| | | | since z6 is not the default protocol on hubzilla). This will need to be pushed to master for the next point release.
* typozotlabs2018-10-301-1/+1
|
* issue syncing the channel_primary setting which shows up as a wrong count on ↵zotlabs2018-10-301-17/+16
| | | | the admin summary page
* hubloc DB changes needed for z6zotlabs2018-08-131-0/+2
|
* hubzilla issue #1019 - punycode urls on connedit page when displaying locationszotlabs2018-03-291-1/+2
|
* more generalisation of commonly used code constructszotlabs2018-02-011-15/+1
|
* more separation of complex code into separate functionszotlabs2018-02-011-0/+32
|
* create site_store_lowlevel() to initialise data structures for the site tablezotlabs2017-04-031-0/+27
|
* Add some documentation for import functions.Klaus Weidenbach2017-03-301-41/+63
|
* consolidate hubloc storagezotlabs2017-01-301-0/+31
|
* provide lowlevel xchan storage function to ensure that all non-null rows are ↵zotlabs2017-01-281-104/+0
| | | | initialised
* perform input validation on xchan_store and re-enable the post method of the ↵zotlabs2016-12-261-0/+8
| | | | xchan api endpoint.
* move all the zid related stuff to one filezotlabs2016-11-131-24/+0
|
* provide 'per-page' caching for is_matrix_url() results to reduce duplicate ↵zotlabs2016-11-131-2/+12
| | | | queries
* daemon conversion continued...redmatrix2016-05-191-1/+1
|
* handle UNO move channel operationredmatrix2016-03-091-4/+11
|
* add site_type to queries, first few - several more to go.redmatrix2015-09-281-1/+3
|
* site checking stuffredmatrix2015-09-141-3/+8
|
* ping site function (taken from admin/hubloc)redmatrix2015-09-131-1/+26
|
* initial work on obj import, rename import_profile_photo to ↵redmatrix2015-09-011-1/+1
| | | | import_xchan_photo to more accurately state its purpose.
* Merge branch 'master' into tresfriendica2015-04-231-4/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * limit notification detail queries for items and eventsfriendica2015-03-231-1/+3
| |
| * operation snakebite, cont.friendica2015-03-221-2/+2
| |
| * queue management actions. Still needs further work such as indication of ↵friendica2015-03-011-2/+3
| | | | | | | | last successful connection or indication that the hub was marked offline, but these are potentially expensive queries.
| * Fix a couple of places where we weren't checking for dead hublocs. Add a ↵friendica2015-02-271-1/+10
| | | | | | | | function to mark a hubloc dead.
* | working through the xchan table to remove bitfields, mostly complete except ↵friendica2015-01-201-2/+8
| | | | | | | | for updating the updater
* | that should take care of the bitfields in hublocfriendica2015-01-201-1/+1
| |
* | first cut at unpacking bitfields in hubloc, fixed hubloc_error and ↵friendica2015-01-201-2/+1
|/ | | | hubloc_deleted
* don't remove obsolete hublocs that have no sitekey - it will remove all ↵friendica2014-12-141-1/+1
| | | | kinds of other hublocs it isn't supposed to (e.g. diaspora).
* PostgreSQL support initial commitHabeas Codice2014-11-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* generalise the output format of xchan_fetch so it matches the input formatfriendica2014-10-231-1/+11
|
* API: xchan get/createfriendica2014-10-231-1/+79
|
* figuring out how to bootstrap the change_primary procedure when all you have ↵friendica2014-10-131-0/+2
| | | | is inconsistent data which you think you trust.
* more diagnostic when changing primaryfriendica2014-10-131-4/+17
|
* sqlfriendica2014-10-131-1/+1
|
* new function hubloc_change_primary()friendica2014-10-131-0/+42
|
* that's why remove_obsolete_hublocs() isn't telling anybody when it does its ↵friendica2014-09-301-3/+3
| | | | thing, I forgot to uncomment the bit that tells everybody after I tested it. I needed extensive testing to make sure we didn't accidentally wipe out all hublocs everywhere. Testing went fine so I just assumed it was all working as planned; but went back today to find out why I wasn't told of a recent change.
* provide a way to sync locations and get rid of bogus hublocs, now implementedfriendica2014-09-141-12/+29
|