Commit graph

87 commits

Author SHA1 Message Date
redmatrix
ca870dbf31 more work on item table optimisation 2015-06-10 16:59:04 -07:00
redmatrix
7c7a5cba8f Merge branch 'master' into tres 2015-05-17 19:49:36 -07:00
redmatrix
76558df966 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	include/bb2diaspora.php
	include/diaspora.php
	include/enotify.php
	mod/admin.php
	mod/cloud.php
	mod/dav.php
	mod/home.php
	mod/invite.php
	mod/like.php
	mod/mitem.php
	mod/p.php
	mod/pubsites.php
	mod/setup.php
	mod/siteinfo.php
	util/messages.po
2015-05-17 19:48:57 -07:00
redmatrix
91d7b0f7eb more work isolating the projectname from core. 2015-05-17 16:28:16 -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
friendica
f5f194c92b allow complete undo of a vote, not just a change of vote 2015-03-22 14:55:41 -07:00
friendica
6631540d20 provide visual feedback when deleting a like by liking it again. 2015-03-22 12:55:13 -07:00
friendica
1b17b0193e fix multiple vote issues 2015-03-21 17:14:12 -07: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
79da33dafd improvements in duplicate like detection, especially w/r/t event participation 2015-02-10 17:49:46 -08:00
friendica
268691ffb4 correct the object type if it isn't stored/linked to an item yet 2015-02-10 01:05:49 -08:00
friendica
81e7b47b76 more progress on event confirmations 2015-02-10 00:11:37 -08:00
friendica
ff68ea6087 more message restrict conversions 2015-01-29 14:51:41 -08:00
friendica
e46eba1258 heavy lifting converting item flag bits 2015-01-22 17:41:16 -08:00
friendica
29436081a8 slow progress removing bitfields on item table 2015-01-21 16:06:25 -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