Commit graph

260 commits

Author SHA1 Message Date
friendica
64191de5e7 generate the correct service permalink 2015-02-08 18:31:51 -08:00
friendica
fe8a08a474 over-ride permissions for sys channel delivery from diaspora 2015-02-05 17:29:35 -08:00
friendica
153719a20a another issue with diaspora postings to sys channel - sys has no connections, hence no abook records. 2015-02-05 16:13:26 -08:00
friendica
646a874390 diaspora public posts not delivering to sys channel if there were no other subscribers 2015-02-04 20:28:36 -08:00
friendica
a7e5c7ce64 issue #885, autoperms not working for diaspora connections 2015-01-31 14:52:29 -08:00
friendica
872b165eb2 implement diaspora profile message (oops) or updated profile photos won't be updated 2015-01-29 00:25:29 -08:00
friendica
54fd8b21db make sure we honour the disable_discover_tab pref 2015-01-28 15:27:58 -08:00
friendica
2c02f1184c allow diaspora posts to be delivered to the discover channel unless prohibited from doing so. 2015-01-28 15:23:00 -08:00
friendica
78cb87343c friendica commenters are currently shown using "Diaspora" app. Try and fix this where we can. 2014-11-20 02:54:55 -08: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
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
1237957dd5 logging changes, untranslated string 2014-11-05 21:02:33 -08: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
65b84e839a back to wrestling with the !@#$ diaspora recursive reshare from hell 2014-10-14 18:47:08 -07:00
friendica
41b74dd7ac diaspora_send_status() - recalculate markdown translation to pickup any later message changes after original submission like wall-to-wall attributions for instance. Normally this would've come from our cached version which was stored prior to tag_deliver being run and therefore isn't yet aware that wall-to-wall status may have changed after delivery. 2014-10-12 21:20:08 -07:00
friendica
0991a5a494 remove remnants of old signing structure - now using diaspora_meta 2014-10-10 14:11:13 -07:00
friendica
aae1d11de8 reset route to parent route on Diaspora comments flowing upstream so they won't be rejected going downstream 2014-10-10 14:04:05 -07:00
friendica
5bfde82258 make sure diaspora comments get the correct route 2014-10-10 13:56:31 -07:00
friendica
202039d389 don't double-encode hashtags 2014-10-08 14:47:24 -07:00
friendica
b595f9d3ee log the recursive reshare from hell at logger_debug until we get through this mess. 2014-10-07 20:42:57 -07:00
friendica
ac77076135 Make a best guess at how to pull the attribution from the recursive reshare from hell. 2014-10-06 21:37:02 -07:00
friendica
bbf88cf639 found one bug trying to fetch the recursive reshare from hell. I still think there's a problem with attribution but we'll have to wait and find that once we have some content to track. Also in private messages, on the message list page, change the text from delete message to delete conversation, because that's what we're really doing. 2014-10-06 20:54:52 -07:00
friendica
34ef3fda76 attempt to deal with the diaspora recursive reshare from hell (Bob reshared Nancy's reshare of George's reshare of Lilly's reshare of Nathan's post). The attribution may be wrong so this is still a work in progress. 2014-10-05 22:17:51 -07:00
friendica
2cadc5a840 send dislike activities to diaspora as comments, also send likes and dislikes of comments as additional comments. We won't go into why this is necessary for a service that claims to support activitystreams. 2014-10-05 17:27:52 -07:00
friendica
d4a6a6b4f5 diaspora share not rendering issue - still have one remaining (the recursive share from hell) 2014-10-05 15:41:03 -07:00
friendica
16b94f1dc0 issues with diaspora comment signatures on relayed comments that are relayed through a redmatrix site (parent post is redmatrix) and involve a private post. 2014-10-02 02:43:07 -07:00
friendica
f203d2a3b0 diaspora private mail seems to work now - but there's an obfuscation leak via the conversation structure that needs to be dealt with. 2014-09-23 20:36:10 -07:00
friendica
2b466ccb8c d* little fixes 2014-09-23 04:40:36 -07:00
friendica
ad86cc24c8 d* PM cont. 2014-09-23 04:34:35 -07:00
friendica
509a85cb12 more work on d* private messages 2014-09-23 03:03:14 -07:00
friendica
2070dbfdea private mail from d* to r# seems to work with these edits. - Now have to go back the other way. 2014-09-22 02:27:52 -07:00
friendica
87a6f25769 try to sort out walltowall translation for diaspora recipients 2014-09-19 02:22:24 -07:00
friendica
19e8d10b7a still some old Friendica database queries in diaspora_signed_retraction 2014-09-16 21:08:34 -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
5042847334 fix diaspora_retraction 2014-09-14 19:04:36 -07:00
friendica
ab7f2db4d7 doc updates and a couple of issues spotted in the logs (diaspora likes, feed author import) 2014-09-12 00:59:23 -07:00
friendica
f1539a65e5 possible solution to diaspora walltowall mistaken attribution 2014-09-10 22:21:19 -07:00
friendica
de89bdc45f encrypt diaspora_meta since it may contain private message contents 2014-09-10 19:02:00 -07:00
friendica
79bd451631 fix the like signatures to the "new ordering" - inbound and outbound 2014-09-10 16:32:19 -07:00
friendica
d891b09b22 don't include plus-sign in the stored term for imported mentions 2014-09-10 01:27:52 -07:00
friendica
e45a9b1522 this should be the final piece of the puzzle 2014-09-09 23:23:52 -07:00
friendica
cb10da3eef Did I ever mention how much I HATE hacking crypto? If you've got a protocol doc that says how you sign something, you damm well better sign it that way. 2014-09-09 22:45:26 -07:00
friendica
c02554ad36 some fixes for auto-perms across networks 2014-09-09 21:38:51 -07:00
friendica
89b65e554c reduce log level of inbound d* posts until we get through some of the more serious federation issues 2014-09-09 20:32:03 -07:00
friendica
f52e754dc6 put back old pointer 2014-09-09 15:53:58 -07:00
friendica
420fd59513 fix empty reshared content 2014-09-09 15:52:52 -07:00
friendica
4384fa8b12 d* friending vsprintf error 2014-09-09 01:14:15 -07:00
friendica
384eace32a heavy lifting on diaspora likes. Still needs much more work - especially as we're ignoring signatures at this time 2014-09-08 22:32:05 -07:00
friendica
b7c1ad8cb2 diaspora_like - sql error 2014-09-08 21:08:50 -07:00