Commit graph

609 commits

Author SHA1 Message Date
redmatrix
59a56ac77f catch the timestamp also 2015-09-20 17:47:41 -07:00
redmatrix
35f09f4f74 remove system flags from channel import packet 2015-09-20 17:45:23 -07:00
redmatrix
b240c15014 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	include/zot.php
2015-09-20 16:55:24 -07:00
redmatrix
9de8df496a we need the xchan record also 2015-09-20 16:52:21 -07:00
redmatrix
ce064188c6 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	include/zot.php
2015-09-19 22:48:22 -07:00
redmatrix
5d6f59a598 clone new connections 2015-09-19 22:46:59 -07:00
redmatrix
f4a4cf1402 clone new connection requests 2015-09-19 15:36:07 -07:00
redmatrix
63146821d7 Merge https://github.com/redmatrix/redmatrix into pending_merge 2015-09-18 23:02:49 -07:00
redmatrix
9ed8eac8c6 include site identitfier on redmatrix delivery reports also 2015-09-18 23:02:03 -07:00
redmatrix
43251ed8ce add reporting site to delivery report 2015-09-18 22:00:33 -07:00
redmatrix
fdd4c1b9d1 more work on surviving hub re-installs 2015-09-18 14:31:29 -07:00
redmatrix
f0a7a6a1e2 consolidate zotfinger and webfinger 2015-09-17 17:51:31 -07:00
redmatrix
692e117c8a Merge pull request #38 from MicMee/master
ensure that living sites are marked as alive
2015-09-12 08:25:27 +10:00
redmatrix
d96ca61f2b Merge https://github.com/redmatrix/redmatrix into pending_merge 2015-09-11 14:57:26 -07:00
redmatrix
fc58b8cc0d log the remote message if there was one 2015-09-11 14:56:31 -07:00
redmatrix
45e1f93e56 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	util/messages.po
2015-09-11 14:33:07 -07:00
redmatrix
e062c4e6b5 another tactic to deal with orphan hublocs from re-installs, or at least allow the descendant channel to survive 2015-09-11 14:30:07 -07:00
Michael Meer
755edd2110 ensure that living sites are marked as alive 2015-09-11 14:06:37 +02:00
redmatrix
4abfd4053a sync likes 2015-09-10 19:18:12 -07:00
redmatrix
00b480527a provide remote delivery report at logger_debug level 2015-09-10 17:53:06 -07:00
redmatrix
922d2165b3 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	include/zot.php
2015-09-10 16:51:22 -07:00
redmatrix
50e32c3d8a zot_refresh: always try the hubloc pointed to by xchan_addr first 2015-09-10 16:48:08 -07:00
redmatrix
75d521d42a menu import and sync 2015-09-08 17:52:39 -07:00
redmatrix
650e98b2a9 work on event sync 2015-09-07 21:01:49 -07:00
redmatrix
6d1b64065a consolidate import_items/sync_items 2015-09-07 18:14:30 -07:00
redmatrix
d79e81a069 import and sync chatrooms 2015-09-03 18:44:40 -07:00
redmatrix
f3cb17ac3b app sync 2015-09-02 23:09:51 -07:00
redmatrix
c22da3da1c start to modularise the clone import and sync functions 2015-09-02 20:12:40 -07:00
redmatrix
2a26c898ca protect from sql injection 2015-09-02 15:52:54 -07:00
redmatrix
69fc10d5ad Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	include/zot.php
2015-09-02 15:49:50 -07:00
zottel
441946b9d3 really fix post filtering 2015-09-02 15:49:07 +02: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
eac9c8a7e6 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	include/zot.php
	install/update.php
	util/messages.po
2015-08-23 20:23:55 -07:00
redmatrix
b1f091e4d7 issues with abook sync between hubzilla and red 2015-08-23 17:40:47 -07:00
redmatrix
bf190be5b4 issues encountered with hubzilla DB changes, zot_refresh and item_drop and hub sync 2015-08-23 13:27:34 -07:00
redmatrix
a4caaefd32 event integration improvements 2015-08-19 16:50:32 -07:00
redmatrix
18bc12c21c Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	include/zot.php
	util/messages.po
2015-08-14 22:24:15 -07:00
Alexandre Hannud Abdo
73b30de9cb Properly fix which perms get checked for comments, Mike's solution 2015-08-14 12:21:05 -03:00
redmatrix
d140620008 add item validation function 2015-08-13 19:35:57 -07:00
redmatrix
ef73880459 reverting 36b5f6ac 2015-08-12 22:48:08 -07:00
redmatrix
0b7365e2db revert 36b5f6ac 2015-08-12 22:37:24 -07:00
redmatrix
2d9d4dfeb3 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	doc/history.md
	mod/import.php
2015-08-11 22:35:36 -07:00
Alexandre Hannud Abdo
36b5f6acfe Require comment perms only for own posts, allow senders to deliver comments using stream perms. 2015-08-10 18:20:18 -03:00
redmatrix
cc5b0cde1d Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	include/diaspora.php
2015-07-23 21:07:35 -07:00
redmatrix
27fa908233 patch to allow theme based widgets 2015-07-23 18:49:37 -07:00
redmatrix
fd8e6f3130 typo 2015-07-19 21:04:02 -07:00
redmatrix
4299ae65a4 abook clone sync - change logic to also unset existing cross-project flags besides just setting them 2015-07-16 18:07:23 -07:00
redmatrix
c3dbacfb88 don't including rating stuff from cloned abooks 2015-07-16 17:53:59 -07:00
redmatrix
b9fd8b4614 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	include/zot.php
2015-07-15 18:41:50 -07:00
redmatrix
7db515b77c fix for empty recip array resulting from a mangled xchan 2015-07-15 18:31:37 -07:00
redmatrix
7f6e4d5f4a more clone sync issues across projects 2015-07-15 18:21:04 -07:00
redmatrix
95cf1668de Merge branch 'master' of https://github.com/redmatrix/redmatrix 2015-07-15 18:15:25 -07:00
redmatrix
59b67d52e6 clone sync fixes across red/hz 2015-07-15 18:14:19 -07:00
redmatrix
e8f19c1e15 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	mod/connedit.php
2015-07-14 17:10:13 -07:00
redmatrix
a5989b0f31 coverup and ignore the illegal string offset message that some sites have been reporting. This does not fix it. A fix would be to examine the data that has been received and find out why it is mangled and trace this back to where it was mangled. 2015-07-14 16:54:16 -07:00
redmatrix
dad4ac6c89 incorrect value for hubloc_deleted in zot_get_hublocs() query 2015-07-07 16:06:34 -07:00
redmatrix
90a31f4ad5 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	include/zot.php
2015-07-02 22:00:15 -07:00
redmatrix
1a5898bf80 sync abook entries from redmatrix
Merge branch 'master' of https://github.com/redmatrix/redmatrix

Conflicts:
	include/items.php
2015-07-02 21:58:28 -07:00
redmatrix
065a50c920 a few clone sync fixes as well as some work on hubzilla clone sync back to redmatrix 2015-07-02 21:55:36 -07:00
redmatrix
63f2e9b412 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	include/zot.php
	mod/connedit.php
	util/messages.po
2015-06-28 22:33:13 -07:00
redmatrix
de13497333 no this isn't it. well ok, it's part of it, but not the important part. it's still pretty cool. 2015-06-28 21:16:56 -07:00
redmatrix
1a0655f34e more work on mail flags 2015-06-23 21:01:59 -07:00
redmatrix
cb76fb8b9b item flag fixes discovered after a few merges 2015-06-23 19:45:39 -07:00
redmatrix
859a2ac8ef DB changes for some channel flags 2015-06-15 17:28:52 -07:00
redmatrix
be0459a98b convert the abook fields 2015-06-14 21:08:00 -07:00
redmatrix
b381ec5734 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	mod/impel.php
2015-05-27 19:27:38 -07:00
redmatrix
9a0264f5d2 some work on issue #329 2015-05-25 19:17:35 -07:00
redmatrix
3763f74a10 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	include/items.php
	include/text.php
	mod/item.php
	view/nl/messages.po
2015-05-20 20:49:06 -07:00
redmatrix
c10a4ca9c7 re-arrange the html cache a bit 2015-05-20 20:28:16 -07:00
redmatrix
62df06b3d6 cloning abook entries was broken in several ways if the target xchan wasn't available on the clone site. This should make it less broken. 2015-05-20 20:20:35 -07:00
redmatrix
a6cb90c81c Merge branch 'master' into tres
Conflicts:
	include/Import/refimport.php
	include/activities.php
	include/attach.php
	include/event.php
	include/externals.php
	include/identity.php
	include/items.php
	include/notifier.php
	include/photos.php
	include/taxonomy.php
	include/zot.php
	mod/channel.php
	mod/connedit.php
	mod/events.php
	mod/item.php
	mod/like.php
	mod/manage.php
	mod/mood.php
	mod/ping.php
	mod/poke.php
	mod/subthread.php
	mod/tagger.php
	mod/thing.php
2015-05-14 18:02:29 -07:00
redmatrix
25b599a4bd convert ITEM_WALL from bitfield to standalone 2015-05-06 21:03:33 -07:00
redmatrix
a3c37f1458 first pass name change 2015-05-05 03:56: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
Klaus Weidenbach
fdd6508019 Some documentation and whitespaces at line endings. 2015-04-10 00:28:23 +02:00
Klaus Weidenbach
d0361582b0 Correcting reported Doxygen syntax warnings.
Fixed wrong Doxygen syntax and add some of the available FIXME to
Doxygen documentation.
Updated Doxygen configuration to add also all capital letter tags.
Adding some more Doxygen documentation.
2015-03-29 22:23:00 +02: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
Michael Johnston
4e98a70e66 add missing %d for abook_closeness 2015-03-11 20:56:40 -04:00
friendica
54a9fb1774 diaspora's spammy permission model seems to have leaked through our firehose. Don't let it. 2015-03-10 12:22:22 -07:00
friendica
b5683bfac4 change default affinity (abook_closeness) to 80 for all new connections going forward (was 99). This way it can be adjusted down later without requiring you to change all your existing connections upward (since your existing connections are likely all sitting at 99 at the moment). The default setting is also configurable with a pconfig system.new_abook_closeness 2015-03-08 14:11:38 -07:00
friendica
99e4d2362c I'm going to use the site_update timestamp to indicate whenever we successfully connect with a site. This way we can mark hubs dead on non-directory servers; but we have to wait before implementing this until we have a history of site_update being updated. 2015-03-03 15:54:38 -08:00
friendica
85f79990af don't let a zot-finger bring a dead hub back to life unless it's the site we're currently talking to. 2015-03-03 15:22:24 -08:00
zottel
e4a2e353d8 make public delivery to contacts or any connections work again
$hash wasn't defined in this case
2015-03-02 11:05:03 +01:00
friendica
4162dfe43f Merge https://github.com/friendica/red into pending_merge 2015-02-26 14:21:26 -08:00
friendica
09f80270de loop breaker 2015-02-26 14:20:43 -08:00
Habeas Codice
82bb216952 more fake null shenanigans 2015-02-26 08:23:02 -08:00
Habeas Codice
f55e210120 Revert "more fake null shenanigans"
This reverts commit b57010e3da.
2015-02-26 08:22:15 -08:00
Habeas Codice
b57010e3da more fake null shenanigans 2015-02-26 08:20:29 -08:00
friendica
b32841e2dd Found the cause of the delete looping, and I can prevent it going forward. The issue remains what to do about comments which are already in the DB and have ITEM_ORIGIN incorrectly set. We can't exactly reset them because the "original" context has been lost. (Sorry but couldn't resist an insider pun that none of you will be able to follow anyway). Read the comments. 2015-02-25 15:27:33 -08:00
friendica
1a071ea4f0 call post_local hooks prior to storing a post that is going to be sourced. There are some fields in the actual stored item that may change when we start the second delivery chain so a few plugins may not deal with these items correctly. Since we only source public items these effects will be slight. 2015-02-25 03:16:43 -08:00
friendica
2a2cc309ce solve some (hopefully most) missing delivery issues 2015-02-25 01:39:45 -08:00
friendica
d29de912b4 public_recips cleanup 2015-02-23 16:27:12 -08:00
Habeas Codice
ffd47e6b95 catch negative ages
nix extra var
2015-02-20 19:48:51 -08:00
zottel
d0fe0b5d5f fix parens mismatch from last commit 2015-02-18 11:48:05 +01:00
zottel
9d745cd072 also deliver public posts to channels with channel_w_stream = PERMS_AUTHED 2015-02-18 11:44:43 +01:00
Habeas Codice
d9d029470f Merge branch 'master' of https://github.com/friendica/red 2015-02-16 15:13:31 -08:00
Habeas Codice
ca8e221018 normalize age data
mysql has type tinyint(3) which probably turns into a 24-bit value, but
postgres uses 3-digit decimal as its constraint (probably what the mysql
schema was intended to do). either that or mysql silently truncates while
postgres respects the constraint. Either way, bad data gets in unchecked, now
it's checked.
2015-02-16 15:09:43 -08:00
friendica
1c4b919980 force site_url to be lowercase when stored. Otherwise rating hubs on postgres could get real messy. 2015-02-15 23:45:22 -08:00
friendica
7bb2e25ea0 missing param 2015-02-13 13:04:31 -08:00
friendica
c62d605608 well that was certainly fun. And the reason why likes and other acitivity deletions weren't propagating. Hopefully this is the last reason and there aren't more lurking further down the chain. 2015-02-11 16:11:21 -08:00
friendica
8c061f143f more efficient processing of response activities, plus a proof of concept fix for the problem of receiving a delete notification before we actually get the item which we're supposed to delete. 2015-02-11 15:26:35 -08:00
friendica
4b348d2489 Merge branch 'master' into tres
Conflicts:
	view/css/mod_events.css
	view/theme/redbasic/css/style.css
2015-02-05 19:38:43 -08:00
Habeas Codice
9ed23f9081 Merge branch 'master' of https://github.com/friendica/red 2015-02-05 09:15:39 -08:00
Habeas Codice
88488fdfbb escape dates 2015-02-05 09:15:26 -08:00
friendica
de79bb89fc Merge branch 'master' into pocorate 2015-02-03 16:03:58 -08:00
friendica
3f50313862 garbage in garbage out 2015-02-03 16:03:05 -08:00
friendica
1807db6cb0 send rating information to directories 2015-02-02 20:13:07 -08:00
friendica
e6a5f78003 Merge branch 'master' into tres
Conflicts:
	include/zot.php
2015-01-31 00:50:20 -08:00
friendica
340212d77e sync_locations() toggle DB flag functions were broken - result of postgres changes. Split these into seperate set and reset blocks. 2015-01-30 15:01:10 -08:00
friendica
ab0706521e let zot_refresh continue without a primary hub if one cannot be found. also weekly doc updates 2015-01-30 13:45:28 -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
ff68ea6087 more message restrict conversions 2015-01-29 14:51:41 -08:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
friendica
6c7269be94 add yet another firehose check 2015-01-28 01:13:32 -08:00
friendica
9feb300f47 more minor tweaks to the route mismatch algorithm after watching it all day. 2015-01-28 01:06:56 -08:00
friendica
a2cdd1499c Merge branch 'master' into tres
Conflicts:
	include/socgraph.php
2015-01-27 20:00:43 -08:00
friendica
0bfbe6d61d sql typo 2015-01-27 19:58:43 -08:00
friendica
85b359e25c ignore route mismatches on firehose posts to the sys channel. Use whatever parent route we have. By definition we aren't going to have permission issues with these things. 2015-01-27 17:53:19 -08:00
friendica
21f85b32ec we need to actually ask for the id from the DB if we want to use it. 2015-01-27 17:46:16 -08:00
friendica
2f4ef7660c improved route mismatch detection. We will be less strict about the absolute route matching and only look at the last hop before it got to us - which is ultimately all we should care about (since that sender controls the thread permissions). Route mismatches seem to occur somewhat frequently from yamkote (for unknown reasons), and the logging has been improved a bit so it should provide some slightly more useful debugging info in case it still happens going forward. Oh, also we'll set the parent on comments when we store the initial post (item_store()) and only go back and set the parent for top-level posts. This should reduce the number of comments with missing parents on shared hosts, but may increase the number of missing threads. Probably worthwhile to do a query occasionally for parent = 0 and see how we're doing and how many have shared host related delivery issues. 2015-01-27 15:47:24 -08:00
friendica
fc62d7e577 handle an incoming directory rating message 2015-01-26 19:43:39 -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
Habeas Codice
1d6aead325 remove superfluous group by
this gets called from a zot post_post dealing with a specific messageid and hubloc_hash combination. grouping by site
doesn't make sense here and it gets grouped when pulled back out elsewhere anyway
2015-01-24 22:07:53 -08:00
friendica
e46eba1258 heavy lifting converting item flag bits 2015-01-22 17:41:16 -08:00
friendica
76fe9dc702 zot_finger second arg is optional but function declaration didn't specify this - causes issue with check_upstream_directory 2015-01-21 20:08:10 -08:00
friendica
29436081a8 slow progress removing bitfields on item table 2015-01-21 16:06:25 -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
10102ac2ac connection clone issues 2015-01-10 14:59:10 -08:00
friendica
fbe0610ce9 don't update locally deleted items 2015-01-06 15:44:23 -08:00
friendica
452d275b5e don't import to sys channel from self-censored authors 2014-12-12 00:26:07 -08:00
friendica
8e4e56b566 can't reset public to false because it may have been passed in as true and this would be wrong and cause even more subtle bugs. Reset to whatever value was passed in. 2014-12-01 18:59:38 -08:00
Thomas Willingham
def10df816 Somewhat subtle process_delivery() bug - $public was not being reset if a sys
channel is reached but then the loop iterated over another channel.
2014-12-01 19:09:50 +00:00
friendica
18cae8a78c change logging of some troublesome or noisy bits so we can figure out what is really going on 2014-11-19 19:22:22 -08:00
friendica
7fec939c23 couple of fixes:
- significantly increase the content availability on the discover channel
- fix the button group on the blog/list mode which made the border on a single comment button a bit wonky
2014-11-19 14:41:24 -08:00
friendica
4893e64c1e there's still a permission issue delivering a public post directly to the sys channel (on the local system), but this puts the local sys channel in the public delivery chain and fixes an issue with unseen counts showing on the discover page (where you can't do anything about it). 2014-11-19 00:56:05 -08:00
friendica
efcbcd6f88 add sys channel to public recips if scope public 2014-11-18 20:34:47 -08:00
friendica
b5da015789 put timeout code in place but don't turn it on. 2014-11-13 15:34:35 -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
5619902776 indicate public forums in directory results (there will be some [possibly considerable] lag time before existing forums are correctly tagged). 2014-11-10 17:44:02 -08:00
friendica
6209465233 add public forum identification to libzot. No attempt is made to identify other types of forums or weird custom channel permissions. If the channel is auto-accept and taggable, it's a public forum. 2014-11-10 15:21:04 -08:00
zottel
1f35d9432f don't overwrite $x (contains import_xchan result) with role permissions 2014-11-06 17:24:05 +01:00
friendica
d5d6158973 ok heads up - potentially destabilising change. I've tried to sort out all the default connection permissions for those who don't have a predefined (or therefore have a "custom") permissions role. Unfortunately this includes most people that were using this software more than a month ago. The real changes are that the SELF address book entry no longer holds "auto-permissions" but instead holds your "default permissions" (if you have a pre-defined role, the defaults will be pulled from the role table).
The auto permissions have moved to a pconfig (uid.system.autoperms). A DB update will move these settings into their new homes.

What used to be the "Auto-permissions settings" page is now the "default permissions settings" page and a checkbox therein decides whether or not to apply the permissions automatically. A link to this page will only be shown when you have the "custom" role selected.

With luck nobody will notice anything wrong. But at least for the next few days, please review permissions that have been assigned to new connections (either automatically or manually) and make sure they make sense (e.g. they aren't "nothing"). You still need to take action when seeing a message "permissions have changed but not yet submitted" as we always let you review and perhaps adjust the settings _before_ a connection is established (unless you have autoperms turned on).
2014-11-04 17:11:02 -08:00
friendica
0e4f318b71 php warnings 2014-11-02 19:22:18 -08:00
friendica
285d6f61e4 I'm going to try again with the conversation request packets. I've looked this over and tested a lot of edge cases, and thought about from every angle I can think of to prevent looping. I don't *think* this can loop. I also doubt that this is the problem at friendicared.de, but I don't know for sure what that problem might be. 2014-11-02 15:28:20 -08:00
friendica
4274a2d06c add some more safety checks before turning the conversation request messages back on 2014-11-02 00:06:52 -07:00
friendica
50c16c394f check that we have valid data 2014-11-01 01:52:27 -07:00
friendica
a659ac8952 disable request message response until we work through this 2014-11-01 00:36:21 -07:00
friendica
1cb45c30e9 document request packets a bit more 2014-10-31 06:24:14 -07:00
friendica
5637d07138 flag notify packets that are sent in response to a message_id request and prevent them from recursing 2014-10-31 04:59:30 -07:00
friendica
28a35261db What this checkin does is catch the case where a comment arrived and there's a missing top-level post to match it with. So we'll send a request back to the sender that you've never seen this thread and please send a fresh copy of the entire conversation to date. We could soon have posts in the matrix from different platforms from days gone by, which have been migrated into the modern world. We'll be polite and not deliver these to everybody. However, if someone comments on one of these antique threads we wouldn't be able to see it in our own matrix because we won't have a copy of the parent post. So this rectifies that situation. Be aware that item deletion may need to change to keep "hard deleted" items indefinitely so that they don't keep coming back. We'll have to null out the important data of the former item to accomplish the deletion aspect. 2014-10-30 19:15:03 -07:00
friendica
fd492386bf Tried this once before but had to revert. Basically prevent a comment from being relayed more than once - as it's a huge drain on resources. But last time I tried this, wall-to-wall comments stopped getting relayed. This checkin should do the right thing in both conditions. 2014-10-19 17:31:10 -07:00
friendica
903f7e73fb if a hubloc primary change results in an xchan primary change, create a directory update packet. 2014-10-13 21:44:46 -07:00
friendica
0057612a9f figuring out how to bootstrap the change_primary procedure when all you have is inconsistent data which you think you trust. 2014-10-13 21:38:36 -07:00
friendica
19e1b95837 don't use cached data 2014-10-13 21:01:51 -07:00
friendica
bd4dd85fbb there's the problem 2014-10-13 20:53:34 -07:00
friendica
1b0390af06 new function hubloc_change_primary() 2014-10-13 15:27:56 -07:00
friendica
718bea5d45 cleanup of sync_locations and better logging. There was one significant code change but it is unrelated to current issues, basically if no primary was set we were setting everything as primary. 2014-10-12 15:18:49 -07:00
friendica
f26cd5a636 ah yes, the redundant relay run was for the benefit of wall-to-wall posts issue #633 2014-10-10 15:17:32 -07:00
friendica
b5f91d7b40 missing source route after edit 2014-10-10 14:45:18 -07:00
friendica
cde244ef74 improvement in source route checking when handling complex *upstream* delivery chains, which were not adequately accounted for in the earlier checkin. 2014-10-10 00:13:46 -07:00
friendica
4634049549 allow (our own) ajax urls to pass through bbcode intact. 2014-10-09 20:59:33 -07:00
friendica
effc8960c3 OK this is important. So read it carefully.
This checkin implements route matching of comments so that they are only accepted from the same route as the top-level post they are attached to. This way there should be no mis-match of permissions between any posts in the thread. It may not be completely compatible with comments posted in the past (though I've tried to be, there may be some minor issues). In addition it seems that relaying was invoked more often than necessary - especially when a duplicate post arrived which was not processed because the edited time hadn't changed - it still invoked relaying. This fix should improve site performance considerably for comments cross-posted to forums; which got bounced around a bit and delivered redundantly for no reason.

Roll this back *only* if it causes a meltdown or comment loss is "serious" (as in OMG people are dying, make it stop!). If we can get past 24 hours without serious issue we need to get everybody onto this code. There may be some minor comment loss (mostly affecting new comments to older posts or likes of older comments) until the majority of sites have moved to the new code.

It may be difficult or impossible to deliver comments to posts that pre-date the addition of source routes (April 1, 2014) to anybody but the top-level post author at his/her primary hub. We may wish to close comments on these posts, but let's see how we go before doing that.
2014-10-09 18:12:53 -07:00
friendica
467c6c72f0 ability to pre-populate connections for new channels. e.g. "MySpace Tom" 2014-10-01 14:48:08 -07:00
friendica
b735961560 found the sucker 2014-09-22 16:23:59 -07:00
friendica
c4608d4c82 just mark dead hubloc deleted - don't remove them. This could cause problems. Also clean up fetch_url/post_url header option 2014-09-16 19:07:19 -07:00
friendica
bbc9e4427e honour service class restrictions for total_identities, total_channels ("friends") and total_feeds both when importing channels and subsequently when syncing clones. Limits are based on the local system - additional entries are silently dropped. 2014-09-15 17:17:00 -07: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
bcc9057d8c pull the plug on the old location sync section of import_xchan - this has now been split off into its own function. Cross fingers because this is core functionality which was tried and true, well tested; and now it's a bit different.
Please revert this if the matrix breaks in the next few hours.
2014-09-14 18:09:16 -07:00
friendica
c27b60d981 more heavy lifting on the hubloc management and revocation infrastructure; don't rush me. This is going to become a fundamental part of zot. It deserves careful consideration. 2014-09-14 01:48:54 -07:00
friendica
0350b76d85 some backend work for the remaining missing bits of mod_hubman - this is still a fair ways from being complete and is not ready for prime time. Basically we'll let a channel send out a public message saying "these are my currently approved locations" and anything that isn't in the list will be marked deleted. We'll send out this message when locations change somehow - either through direct personal involvement (hub revoke, change primary, channel import) or during a system rename or "find bad/obsolete hublocs" activity. This way we won't have clones sending back location info we just got rid of and re-importing the bad entries. 2014-09-13 16:00:09 -07:00
friendica
e68185fc05 don't allow an xchan to be imported with an empty name. To avoid translation issues we'll just make it '-'. 2014-09-11 18:11:07 -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
1102499c71 realm detection logic reversed 2014-09-04 16:09:52 -07:00
friendica
2d0ad0625a sql error in profile_activity 2014-08-31 16:24:05 -07:00
friendica
8a62b824f9 lots of little Diaspora issues 2014-08-28 21:49:13 -07:00
friendica
6a42d6fe3b works one way sort of - now to go the other way - which will require fixing a whole slew of FIXMEs 2014-08-26 18:58:48 -07:00
friendica
eb8f194419 sort out some anomalies 2014-08-25 21:42:46 -07:00
friendica
9196c9eef0 We really can't do this without a hubloc. I was hoping we could, but notifier is setup to take hublocs, not xchans. 2014-08-22 21:37:08 -07:00
friendica
69d3e5468d provide the site blacklist everywhere it is needed 2014-08-21 21:07:32 -07:00
friendica
4a76925787 some more work on realms 2014-08-17 19:06:56 -07:00
friendica
82eb265a20 add collections widget to connections page - and some more work on realms 2014-08-17 17:48:41 -07:00
friendica
20bdcb037f provide backend storage and declaration of directory realm 2014-08-16 16:10:35 -07:00
zottel
d57fe0765c don't block "public" messages with authenticated scope 2014-08-15 21:36:24 +02:00
friendica
802a5c2946 zot logging to figure out why we occasionally don't have an address on xchan_import - I suspect we don't have anything useful at all. 2014-08-12 20:46:33 -07:00
friendica
ad1472abf0 got the logic reversed on that one 2014-08-07 18:58:33 -07:00
friendica
f412f6a654 over-ride the private flag if we received a post that isn't completely public, but they didn't set the private flag. 2014-08-07 17:49:57 -07:00
friendica
2cff122d6f public scope delivery issues 2014-08-06 21:16:24 -07:00
friendica
8da548344b clone sync of "unfriend" actions 2014-08-05 17:47:17 -07:00
friendica
5a5190f2ff add an encoding type to formatted zot communication structures so that we can later add alternate encodings. 2014-07-24 15:55:01 -07:00
friendica
9e988afa1f ensure that we don't have permission settings issues due to version skew across sites. 2014-07-17 20:59:58 -07:00
friendica
437b0cb16e collection sync issue 2014-07-17 15:53:07 -07:00
friendica
feb23fc9bc collection sync 2014-07-16 21:18:28 -07:00
friendica
01491e7d61 limit fields to what we require 2014-07-14 21:52:20 -07:00
friendica
c398d556b3 index collection sync info by hash rather than id 2014-07-14 21:49:48 -07:00
friendica
1accf82bd1 clean up more code duplication 2014-07-14 21:21:24 -07:00
friendica
5ad76c4d0c the sending side of clone syncing of collection/privacy_group information. The receiving side is not yet implemented. 2014-07-14 02:37:41 -07:00
friendica
b2abc51929 much better fix to problem yesterday of updates with the wrong ud_addr getting updated. Now we'll
pass in the update table row to import_xchan so we know exactly which ud_addr applies. We still need ud_flags passed in separately.
2014-06-30 21:17:19 -07:00