Commit graph

90 commits

Author SHA1 Message Date
zotlabs
ccdfbc721f Create virtual privacy groups for private profile member lists 2017-02-12 15:56:33 -08:00
Florian Steinel
c1c96e01fa sql: limit 1 for UPDATE and DELETE is not supported by the SQL standard and postgresql
(see: https://www.postgresql.org/message-id/flat/1291109101.26137.35.camel%40pcd12478 )
2016-10-27 02:41:32 +02:00
redmatrix
4e07b4c0e8 even more backslashes 2016-10-03 22:01:14 -07:00
redmatrix
30841d9470 Don't use count() to check DB results 2016-06-19 18:57:56 -07:00
redmatrix
b1259876bf more db column renames 2016-05-31 21:45:33 -07:00
Mario Vavti
9fcd470aca fix #328 by using a seperate query instead of group_concat 2016-03-20 20:26:55 +01:00
Mario Vavti
5ad9b48f1d revert f62ec4132e - allow one self to be added to a privacy group. 2016-02-25 23:59:57 +01:00
redmatrix
d83b907cdc rename collections to privacy groups 2016-01-26 23:44:15 -08:00
redmatrix
419b4ecfde use consistent terminology 2015-08-19 21:17:24 -07:00
redmatrix
be0459a98b convert the abook fields 2015-06-14 21:08:00 -07:00
redmatrix
e521da05da consensus items not working correctly and make the collections widget abide by the corresponding feature setting. This needs to be backported as it is borken in redmatrix. Also provide the ability to change the number of most recent expanded comments to conversations on a site-wide basis, increase it to 3 by default. We may also want this as a personal setting. 2015-05-18 21:32:55 -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
6199af6a79 revert iconic change to collection list widget 2015-04-01 01:07:38 -07:00
friendica
cff7696e98 change "create new collection" to iconic, document the account table 2015-03-30 00:51:03 -07:00
friendica
2010d6a332 Explicitly force link for 'All Collections' on the network page to gid=0 so it can be used with a default page over-ride for gid. 2015-03-19 16:22:08 -07: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
51848c6190 working through the xchan table to remove bitfields, mostly complete except for updating the updater 2015-01-20 19:33:19 -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
1b3196862d issue #588 can't add feeds to collections using connedit page group sidebar widget 2014-09-11 02:19:21 -07:00
friendica
5ad76c4d0c the sending side of clone syncing of collection/privacy_group information. The receiving side is not yet implemented. 2014-07-14 02:37:41 -07:00
marijus
f62ec4132e let oneself be added to a collection in exchange for deleted contacts 2014-02-07 21:28:39 +01:00
marijus
eb868f6df8 make network tabs regard selected group (collection) and vice versa 2014-01-22 17:18:40 +01:00
friendica
1a42580ad4 remove a couple of mysql reserved words from being used as table or row names. For this round we're getting 'group' and 'desc'. Warning: potentially destabilising as this touches a lot of code. 2013-12-22 18:37:39 -08:00
friendica
2c0fbc508e comanchify connedit, group 2013-12-19 23:56:37 -08:00
friendica
d32e05fb5e starting on the journey to comanche everywhere - beginning with widget conversions. There are approximately 20 which need to be wrapped for accessibility to comanche. 2013-12-08 16:04:28 -08:00
friendica
3e0ac769aa white screen 2013-11-21 17:23:14 -08:00
friendica
5b48ab772b fix private group delivery 2013-11-05 14:26:31 -08:00
friendica
4cda133e89 Add public visibility setting to privacy groups (collections). This doesn't yet make them visible, but allows them to be visible (like a Cc: instead of a Bcc:) 2013-08-07 17:51:10 -07:00
friendica
281d73b03a issue #55 (number 2) 2013-05-28 16:32:31 -07:00
friendica
b33c15d045 members_of_group() output not entirely correct 2013-05-02 20:51:58 -07:00
friendica
810a60b912 add new connections to default group (if any) 2013-03-27 19:35:34 -07:00
friendica
8d442e6fc1 fix timeago (again), webfinger new spec implemented, some theme work 2013-03-04 20:58:39 -08:00
friendica
ea3940c4b0 start formatting for Doxygen 2013-02-25 17:09:40 -08:00
friendica
ce95b1f68c clean up some sql errors from the logs 2013-02-08 16:26:00 -08:00
friendica
d43591fb0f fixed contactgroup editor 2013-01-22 20:13:20 -08:00
Olaf Conradi
acbf822bbd Stringify groups before imploding 2012-12-25 16:01:32 +01:00
friendica
37974e5288 db query looping without bounds if group table wasn't manually updated to add the 'hash' column. 2012-12-14 15:08:55 -08:00
friendica
8f864ebd19 Fixing the acl widget is going to be hard. Here's a start. 2012-12-06 19:18:38 -08:00
friendica
f7ff2de132 add pending check on group queries 2012-11-29 23:06:03 -08:00
friendica
160258fd5d make the visual group editor work again in the new world 2012-11-14 20:55:05 -08:00
friendica
fcb89c6311 groups now take xchans, so you can have groups containing channels that you aren't connected with 2012-11-14 18:18:28 -08:00
friendica
2fa93655c4 a lot more changes of terminology 2012-11-03 02:34:12 -07:00
friendica
e29618ee0d contact group is now 'channel group' 2012-10-27 03:54:44 -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
b0f1d03a8a convert all network search params to get requests (no url path args) 2012-07-23 17:35:58 -07:00
friendica
a20a637727 merge upstream, slider work, refactor ping module, language selection work 2012-07-13 07:09:29 -07:00
friendica
34b79b4f2b theming for default group selector 2012-05-18 01:38:11 -07:00
friendica
7b0ded3f14 more private forums, default privacy group for new contacts 2012-05-17 22:44:52 -07:00
friendica
3c4e6d3461 bug #369 - show contacts who are not in any groups 2012-04-12 23:06:41 -07:00