Commit graph

73 commits

Author SHA1 Message Date
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -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
Christian Vogeley
f7c77c7821 Add link to system notifications page
to mark notifications seen
2014-05-04 18:17:11 +02:00
Christian Vogeley
b2e0b6f11d system notifications mark seen link 2014-05-04 17:28:43 +02:00
friendica
5382f607d9 yeah - that's what I'm going to do. we'll just keep system notifications. If somebody wants web pages for the others we'll start fresh. It's easier than starting with curfty friendica code that doesn't work anymore and will never work without starting over. 2013-12-06 00:11:15 -08:00
friendica
1aa79d9ee6 some code cleanup - gad I forgot what a mess the "other" notifications tabs (everything but system) were in. Maybe I'll just remove them so we can start over. 2013-12-06 00:02:39 -08:00
friendica
19f674c29d remove obsolete notifications 2013-07-21 17:45:36 -07:00
friendica
22841e1566 start implementing zot-id 2012-11-08 19:07:19 -08:00
friendica
e3c2e58979 "profile url" e.g. the wall/stream is now "channel url". "Profile URL" goes to the profile details. 2012-10-29 17:14:02 -07:00
friendica
80bd128425 more DB cleanup 2012-08-30 18:47:07 -07:00
friendica
bfb821e918 well that was a silly mistake... 2012-04-13 16:12:06 -07:00
friendica
d1b57d6e74 setting wasn't being applied 2012-04-13 15:37:25 -07:00
friendica
32cd62ff0a allow setting default new friend notify 2012-04-12 18:15:46 -07:00
friendica
7e2d4d4026 turn off new friend activity by default 2012-04-12 16:51:57 -07: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
cfdfcb37cb don't delete contact from a friend request if friendship was already established 2012-03-30 15:10:50 -07:00
friendica
d83bfd464b zrl into people searches 2012-03-29 22:20:14 -07:00
friendica
a72a23b6d6 missed a default profile photo replacement in notifications 2012-03-20 15:43:34 -07:00
friendica
894278dbcc change default profile photo to something more interesting than a reddish brown square 2012-03-20 15:41:06 -07:00
friendica
110e8f2919 basic ssl_policy for important modules 2012-03-14 21:20:20 -07:00
friendica
65ddefe9c5 system notifications to notify module, untranslated string in notifications.tpl 2012-02-23 17:37:03 -08:00
friendica
41636a50aa new notify sort of working in testbubble 2012-02-22 23:34:30 -08:00
friendica
76308eca67 add toggle to choose sending "friends with" activity even if contact is not hidden 2012-02-06 16:41:05 -08:00
friendica
e2d0eb4a88 redirect to a useful location after deleting or ignoring a friend request, begin comment moderation logic 2012-01-24 18:59:55 -08: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
friendica
c735582ead hide contacts on approval 2011-12-29 00:23:05 -08:00
friendica
0c24784f5e include diaspora mentions in personal (requires adding a Diaspora profile url because they don't use ours) 2011-12-06 15:24:01 -08:00
friendica
f1af2c224f personal notifications 2011-11-30 22:26:02 -08:00
Fabio Comuni
5830682e0c another fix to tabs in notifications 2011-10-17 17:14:10 +02:00
Fabio Comuni
a2dc8bad2e fix tabs in notifications 2011-10-17 16:54:21 +02:00
Fabio Comuni
2116943964 Merge remote-tracking branch 'friendika/master' 2011-10-17 16:37:37 +02:00
Friendika
df7702709b common tabs to notifications and mail 2011-10-11 21:30:23 -07:00
Fabio Comuni
906addf865 common_tabs in notifications.php 2011-10-10 17:01:14 +02:00
Friendika
1cfeb61ddc more notification cleanup duepuntozero 2011-10-09 21:34:07 -07:00
Friendika
26f2c868da some notification text cleanup and notification page layout fixes for duepuntozero 2011-10-09 20:26:17 -07:00
Devlon Duthie
8eedbf30f1 added posts to network section of the notifications page 2011-10-08 22:45:48 -05:00
Devlon Duthie
2cba65bd38 fix for 'show all notifications' on notifications drop-down to handle installations in sub-directories + fix for friend notifications (eg: joe became friends with sam) 2011-10-08 16:57:00 -05:00
Devlon Duthie
f5fc8dabe5 Anne set testbubble banner to be fixed, I added the other notification types to /notifcations, added link to notifcations drop-down for all notifications and added notifications drop-down to testbubble theme 2011-10-07 01:25:08 -05:00
fabrixxm
07b6c868b3 remove javascript to set selectect nav item. enanche img template prefetch ignoring 2011-08-17 18:36:24 +02:00
fabrixxm
bdf42473a0 Merge remote-tracking branch 'friendika/master' into newui 2011-08-17 17:35:37 +02:00
Friendika
8e3506048a diaspora confirm cleanup 2011-08-15 19:31:45 -07:00
Friendika
a6d88fb8f7 diaspora friend approvals 2011-08-15 18:17:19 -07:00
Friendika
2637831d90 some more zot changes migrating back to f9a mainline 2011-08-01 21:02:25 -07:00
Fabio Comuni
e6444adafd change nav selected css class 2011-07-25 16:52:30 +02:00
Friendika
3eb0b4be2a now that we have admin interface, completely remove register approvals from notifications 2011-06-29 22:38:30 -07:00
Friendika
23f00aaab4 recipient ui, friend suggestions 2011-06-26 21:55:24 -07:00
Fabio Comuni
e1107b55c6 add info() function. Works like notice() but show messages in a div with class info-message.
update code to use info() instead of notice() when appropriate (non-error message)
add info-message class style in themes
2011-05-23 11:39:57 +02:00
Friendika
5f20925220 deny link not clickable on admin approval notification page 2011-05-20 15:11:36 -07:00
Friendika
b2e92e0af3 deprecate load_view_file 2011-05-11 04:37:13 -07:00
Friendika
c052d68828 don't use load_view_file() except in email templates and install of htconfig - to avoid getting wrong file when package is updated by copying over an older version. 2011-05-10 16:12:50 -07:00