Commit graph

101 commits

Author SHA1 Message Date
redmatrix
9abd95fad3 static App 2016-03-31 16:06:03 -07:00
redmatrix
1cd3b41825 deprecate $a->get_baseurl() 2016-03-30 22:13:24 -07:00
redmatrix
9a0f0181a5 issues #306 and #307 2016-03-04 14:38:14 -08:00
redmatrix
dc8c7a2d2e small improvements to profile like activity 2016-02-25 16:21:38 -08:00
redmatrix
a6a2c02b6a duplicated code 2015-09-10 19:21:32 -07:00
redmatrix
d3ee99d677 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	mod/like.php
2015-09-10 19:20:21 -07:00
redmatrix
4abfd4053a sync likes 2015-09-10 19:18:12 -07:00
redmatrix
05e0ed5173 export likes to clones 2015-09-10 19:17:20 -07:00
redmatrix
f2889d24e6 decentralise likes of things so they can be cloned 2015-09-09 22:03:23 -07:00
redmatrix
3852b5ce7f separate objs/things from taxonomy 2015-09-01 17:06:58 -07:00
redmatrix
d7089ab471 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	include/identity.php
	install/update.php
	util/messages.po
	view/nl/messages.po
2015-08-31 21:00:28 -07:00
redmatrix
039f56f390 mostly doc tweaks, some import/export work 2015-08-31 20:58:05 -07:00
redmatrix
d7cf7316be change the likes db structure to make it more easily importable/exportable 2015-08-31 20:55:25 -07:00
Mario Vavti
09f6337930 make likes/dislikes work again 2015-07-17 22:45:35 +02:00
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