Commit graph

122 commits

Author SHA1 Message Date
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
f2127d4ba7 limit notification detail queries for items and events 2015-03-23 15:36:17 -07:00
friendica
d83460cd2a The never ending saga of parent = 0 bugs on Dreamhost. 2015-03-01 18:58:50 -08:00
friendica
da2349bb6a provide relief to sites that are severely impacted by the slow ITEM_UNSEEN searches. This does not incorporate any other flag optimisations as that will require a major DB update and possibly involve significant downtime. This is just to bite off a little chunk now and provide some much needed relief. 2015-02-12 17:45:25 -08:00
friendica
08b757a22c Merge branch 'master' into tres
Conflicts:
	mod/events.php
	view/css/mod_events.css
2015-02-08 20:57:37 -08:00
friendica
9b1c09fe83 restrict "mark all events seen" to only the events that are presented in the notification view. 2015-02-08 13:52:46 -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
a496036066 local_user => local_channel 2015-01-28 20:56:04 -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
friendica
e46eba1258 heavy lifting converting item flag bits 2015-01-22 17:41:16 -08:00
marijus
e874376268 this will require more fixing in include/enotify 2015-01-23 02:09:28 +01: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
Stefan Parviainen
2710510392 Sort notifications 2014-12-30 15:21:29 +01:00
friendica
3065650683 filter posts you author from unseen notifications - note there are other ways to do this, but involve some code complexity. This is easier to implement but may have a slight impact on the ping query performance. It's not horrid, just mentioning for the record. 2014-12-28 23:21:49 -08:00
friendica
7e8f3e4dfb requote ignore 2014-11-17 18:46:57 -08:00
friendica
13a7637d9d whitespace 2014-11-17 15:26:32 -08:00
friendica
c0ad4763b3 add unseen count and way to mark unseen to list mode. Also fix automatic mark of unseen so as to work with list mode. 2014-11-17 15:18:06 -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
0b4575a40b class is a reserved word 2014-11-10 14:23:06 -08:00
friendica
ba7f1bb8ee configurable visual alerts/notifications 2014-11-04 15:24:24 -08:00
friendica
2cd6b2cb2a make the pending connections query consistent between mod/ping and mod/connections 2014-07-05 21:45:13 -07:00
friendica
4fbe63aaeb more doco on mod/ping - plus fix a birthday notification which was a day off. 2014-06-30 17:03:00 -07:00
Klaus Weidenbach
13098ba8d8 Some documentation in mod/ping.php an reduced default logging.
It is now LOGGER_DATA as it returns the json data contents.
2014-06-30 22:21:10 +02:00
friendica
dfe0d230f5 got the presence bit. 2014-04-26 16:47:43 -07:00
friendica
075b7fa9c8 This should resolve the dav authentication loop (correctly) 2014-02-22 13:33:18 -08:00
friendica
9c4c0e6d23 prevent mod/cloud looping (ping gets a new session on each call [wtf?] which triggers our "changed uid" detector) 2014-02-22 03:38:23 -08:00
friendica
b779400218 mod/ping - don't perform any database calls if installing 2014-02-06 21:31:42 -08:00
friendica
49f07bd90f mod/ping should only update basic_presence - and clearing stale entries. otherwise let rooms handle presence for themselves. 2014-01-30 19:01:03 -08:00
friendica
c95f65e092 prevent runaway presence indication 2014-01-29 02:36:01 -08:00
friendica
10b51a9471 issues uncovered whilst testing the chatroom API 2014-01-29 02:25:21 -08:00
friendica
0013e59086 chatpresence timing out too quickly 2014-01-28 20:19:16 -08:00
friendica
8efac0cfd6 fix sql query and provide setting to hide online status 2014-01-28 16:16:55 -08:00
friendica
6e22aa25cc basic presence indication 2014-01-28 15:52:54 -08:00
Thomas Willingham
c35034bfe1 Fix new connection nav URL 2014-01-08 19:32:06 +00:00
friendica
d32bbaf599 split private messages into two modules - "message" is just for message lists, "mail" is for reading and writing conversations. This is so we can Comanchify it cleanly. 2013-12-21 23:47:44 -08:00
friendica
4e9103830c clicking on an event notification from somebody else should take you to view event - not edit event. Need to also check permissions on event module because reaching this form shouldn't have been possible without event write permissions. 2013-11-13 14:18:07 -08:00
friendica
23f897b8ae fix marking events seen 2013-04-16 19:59:12 -07:00
friendica
5754d18286 replace old intro link 2013-03-06 02:01:57 -08:00
friendica
b92cdd2a27 prevent repeated channel names in system notifications 2013-02-10 19:34:02 -08:00
friendica
e0cbbbf918 smarty support in intltext, fix old pending accounts query in ping, log failed email register notify 2013-02-09 13:20:10 -08:00
friendica
421921d4d0 debugging mark all seen for various notification types 2013-02-04 00:03:19 -08:00
friendica
9dcecb6b37 finish up the "mark all xyz seen" for all known values of xyz 2013-02-03 19:07:01 -08:00
friendica
af066d7383 mopping up the events issues so I can move on to other stuff 2013-01-16 03:18:32 -08:00
friendica
f1afe68052 typo 2013-01-16 02:01:23 -08:00
friendica
ddd8a0e062 still some bugs but events are happening again. 2013-01-15 20:13:25 -08:00
friendica
f0a08a05ae fix the "personal" network filter and introduction notifications 2013-01-09 23:07:13 -08:00
friendica
a96d3ac66f The rest of the front end for the new notifications - now only missing "mark all seen" for some types, ajax loader for a couple of types, and perhaps a birthday cake icon if any birthdays today, a bit of css cleanup of duplicated or obsolete stuff 2013-01-08 11:59:29 -08:00
friendica
3b213c5fc7 remove debugging 2013-01-08 02:50:12 -08:00
friendica
ba20913c2b lots of notification tweaks 2013-01-08 02:49:08 -08:00