Commit graph

70 commits

Author SHA1 Message Date
friendica
81e7b47b76 more progress on event confirmations 2015-02-10 00:11:37 -08:00
friendica
0259051a87 basic backend work for creating consensus items 2015-01-11 14:41:33 -08:00
friendica
11f0b45a90 blog mode - turn the comment link into a button and group with the likes/dislikes 2014-11-18 16:58:36 -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
d2af45d206 use intval rather than dbesc since these are ints. Should work regardless, but this makes it consistent with the way we do most other queries. 2014-10-26 15:49:00 -07:00
friendica
5abd01f072 allow photos without comments to be liked 2014-10-26 15:34:18 -07:00
friendica
b19176169c provide a specific permission for liking profiles (reuse the obsolete bookmark permission), also remove the unused 'unconnected contacts' view for now. 2014-07-17 20:54:30 -07:00
friendica
0cb81714d8 better handling of interactive likes 2014-07-17 19:07:39 -07:00
friendica
39632f65b6 confirm that something was done. 2014-07-17 18:25:52 -07:00
friendica
bfe4bdc30b make mod_like interactive if requested 2014-07-17 18:20:12 -07:00
friendica
0cfcb02311 ability to like things 2014-06-23 05:19:28 -07:00
friendica
c4c1c37bd3 profile likes 2014-06-22 22:16:26 -07:00
friendica
1dacfb375e honour the admin censored flag in the directory, and some slow progress on extended likes 2014-06-22 17:15:42 -07:00
friendica
d820fa155b possible fix for issue #398 2014-04-07 18:32:22 -07:00
friendica
db8ebc9f37 some minor cleanup on plinks for some very subtle permissions issues 2014-01-09 15:45:17 -08:00
friendica
3e5414cf35 provide detailed error to remote site for the myriad of things that can go wrong inside item_store(), !! this changes the return of item_store !! 2013-09-10 19:06:06 -07:00
friendica
7b27add546 issue #106 2013-08-28 20:51:08 -07:00
friendica
b9314935e6 localize_item() thinks all likes on posts are likes on comments because we didn't pass any info in the activity object to distinguish them from each other. 2013-08-19 19:05:11 -07:00
friendica
4f06905a18 infrastructure for future stuff 2013-06-19 18:06:14 -07:00
friendica
7a011a99c7 wrong attribution on likes of comments in email notifications. Let's also call the thing they liked a comment instead of a status 2013-05-28 01:40:27 -07:00
friendica
7e6890832b turn all Red links into zrls (not the old zrls, the new bbcode zrl which means we can zidify them) 2013-04-15 03:00:08 -07:00
friendica
15ceaeb624 magic auth doco 2013-04-10 23:00:41 -07:00
friendica
989e78137e wrapper function to create arbitrary activities (e.g. for plugins and apps) with a minimal amount of fuss, though the amount of fuss could increase significantly depending on the nature of the activity. For a simple wall post, just set the $arr['body'] to the desired text and we'll do the rest. If the activity requires special verbs, objects or targets, these will all need to be constructed. 2013-04-04 18:54:24 -07:00
friendica
f353b9ae3d liking comments were reverted to liking the parent after sending item to another channel 2013-04-03 18:04:48 -07:00
friendica
ddf5bf8968 rename 'uri' (and parent_uri) to 'mid' (and parent_mid) since these no longer remotely resemble uri's and are actually message_id's. This change is potentially destabilising because it touches a lot of code and structure. But it has to get done and there's no better time than the present. 2013-03-21 18:25:41 -07:00
friendica
bcf4592cb0 likes were somewhat confused. Unconfuse them. 2013-03-11 00:14:12 -07:00
friendica
0aaa95fc25 owner's like reversed instead of observer's. 2013-02-05 14:12:00 -08:00
friendica
55df0452b6 finish off like/dislike localisation except for zrl/magic_link 2012-11-06 16:16:26 -08:00
friendica
9050faa487 add author info to like activity object for localisation 2012-11-06 03:26:55 -08:00
friendica
417d1080d4 likes working a bit better - not translateable yet 2012-11-06 00:30:40 -08:00
friendica
82e74e3520 likes are quasi working again - at least an activity item is stored and it mostly has correct data, but displaying it needs improvement. 2012-11-05 23:52:01 -08:00
friendica
90e70d9674 start on the like/dislike activities 2012-11-05 20:42:12 -08:00
friendica
e124c9fa5c Can't see any posts currently - after the big shakeup, but we can now post top level activities and store them. 2012-10-03 22:28:19 -07:00
friendica
846a9813b2 here's where the heavy lifting begins - everything is likely to be broken for quite some time as we add location and db independence to items and conversations and work through the rest of the permissions and how to federate the buggers. 2012-10-01 18:02:11 -07:00
friendica
f7c6a6ff90 item table rename parent-uri, target-type, object-type (more to come later) 2012-08-15 22:33:37 -07:00
friendica
d92a4a686d eliminate the obsolete "last-child" indicator 2012-07-18 17:08:03 -07:00
friendica
d683df17bd Removing connectors we won't be needing - this is probably going to break some shit. 2012-07-18 04:49:15 -07:00
friendica
03209d2d0d updates 2012-07-14 20:39:46 -07:00
friendica
a20a637727 merge upstream, slider work, refactor ping module, language selection work 2012-07-13 07:09:29 -07:00
friendica
31c218e785 catchup 2012-07-10 20:44:17 -07:00
Zach Prezkuta
28526dbf21 remove possibly unnecessary checks for likes or comments created by Diaspora users 2012-06-25 19:03:03 -06:00
Zach Prezkuta
9e8573507e store signature info for remote users too 2012-06-25 19:03:03 -06:00
Zach Prezkuta
f495ba2bcb was passing the wrong arguments to the signature storage function 2012-06-25 19:03:03 -06:00
Zach Prezkuta
5773241537 add some debug logging 2012-06-25 19:03:03 -06:00
Zach Prezkuta
8bb7ab88fb Clean up the Diaspora connectivity:
- Move Diaspora code into separate functions to make it more modular
- Create more checks for whether Diaspora connectivity has been enabled
2012-06-25 19:03:03 -06:00
friendica
22ca358a8c like comments 2012-06-23 05:46:15 -07:00
Zach Prezkuta
9920fb39e5 Debugged implementation of Diaspora relayable_retractions
Diaspora "relayable_retraction" is now supported by Friendica.
The following should now work:

	Friendica top-level post:
	Diaspora comment deleted, disappears in Friendica
	Friendica comment deleted, disappears in Diaspora
	Diaspora like retracted, disappears in Friendica
	Friendica like retracted, disappears in Diaspora

	Diaspora top-level post:
	Same

There are still exceptions, however. First, Friendica and Diaspora
seem to frequently reject comments with an "invalid signature" error.
This can probably be fixed.

Also, some comments/likes/retractions seem to just disappear on the
Diaspora side. In the Diaspora log these seem to be accompanied by a
"not a valid object" error, often preceeded by a "received a comment
but no corresponding post" error. These seem to be purely internal,
since sometimes it works for some Diaspora contacts but not others.
2012-06-03 14:53:30 -06:00
Zach Prezkuta
cde0de965f first shot at getting like/unlike functions to work consistently 2012-06-03 14:53:30 -06:00
Alexander Kampmann
355c42cb30 Merge branch 'master' of https://github.com/friendica/friendica
Conflicts:
	include/config.php
	update.php
2012-04-05 13:39:15 +02:00
friendica
8aa2552372 add remove_user hook (it looks like dreamhost changed all my file permissions, this will make a nasty commit) 2012-01-18 16:21:30 -08:00