Commit graph

73 commits

Author SHA1 Message Date
redmatrix
6df98f080b fix api/direct_messages/new at least for the json case. We seem to have a missing template for XML 2015-11-16 19:17:39 -08:00
redmatrix
0a34b96e11 bring back colour to abook_self in acl 2015-08-11 01:16:04 -07:00
redmatrix
be0459a98b convert the abook fields 2015-06-14 21:08:00 -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
9067d4c157 taganyone wasn't working 2015-02-15 18:38:26 -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
e157371c39 remote_user => remote_channel 2015-01-28 20:58:59 -08:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
friendica
a2cdd1499c Merge branch 'master' into tres
Conflicts:
	include/socgraph.php
2015-01-27 20:00:43 -08:00
friendica
145b30adfc allow RSS connections in the type 'a' autocomplete results as that is used for channel sources. Without it a feed cannot be selected as a channel source. 2015-01-27 18:34:18 -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
Stefan Parviainen
833d51527b Honor requested count in navbar search 2015-01-08 16:05:00 +01:00
Stefan Parviainen
f2e648308c Return results from acl.php in standard form 2015-01-07 20:45:00 +01:00
Stefan Parviainen
34ecbcceea Make nav search use textcomplete 2015-01-07 19:39:50 +01:00
friendica
3983348b96 the last checkin removed hostname from the address for autocomplete searches. This one allows it if explicitly added with a '@'. So 'mike' will find all mikes. 'mike@z' will find mike@zothub but not mike@popcorn. 2015-01-04 14:51:41 -08:00
friendica
57d8271eba only check the LHS of xchan_addr for autocomplete, don't match on the hostname. 2015-01-04 14:47:08 -08:00
Stefan Parviainen
ac4c17dd4c Typo 2015-01-04 14:31:27 +01:00
Stefan Parviainen
57809f20a4 Sorting of autocomplete 2015-01-04 14:23:23 +01:00
Stefan Parviainen
386f361855 Autocmplete suggestions for non-local users, also suggest from visited channel's connections 2015-01-04 12:54:23 +01:00
Stefan Parviainen
6b5f8bfbe4 Sort acl results according to match position (only type='c' for now) 2015-01-02 12:08:36 +01: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
9cc76cb33d several unrelated things - auto_follow wasn't working for new accounts, error returned in private mention to a collection, and added auto-completion to photo tags; though it only matches people so the hover text is now wrong. Also made the photo edit form XHTML (XML) compliant. 2014-10-27 19:23:40 -07:00
friendica
1a9b8d4f0c don't offer forum (@name+) completion in comments, since it won't do anything. 2014-10-23 22:00:16 -07:00
friendica
ed3310ada6 remove feed items from ACL selector - there's nothing we can do with them and if we were to try we'd have to binary pack all the hashes 2014-09-03 22:15:44 -07:00
friendica
3e8e67df2c Set a default directory server from a hard-wired list if one was not previously chosen. 2014-04-25 18:10:23 -07:00
friendica
1eb8e570bf tag anyone 2014-04-15 18:35:22 -07:00
friendica
e3aa7d2aaf only show forum tags on contact autocomplete, not in the ACL selector 2014-04-13 18:07:19 -07:00
friendica
aa5054d5ba this is looking better, call the forum version of a tag "foobar network", besides altering the icon 2014-04-12 00:41:36 -07:00
friendica
2212ddb913 use icons for identification 2014-04-11 23:54:11 -07:00
friendica
47096df97e not quite right but I need to check it in so I can switch branches 2014-04-11 20:35:25 -07:00
friendica
2b3697c27a the auto-complete part 2014-04-11 20:12:40 -07:00
friendica
41df51a815 add "self" to access control lists with special marking to indicate it's special (for instance you can't really deny access to yourself). But this lets us make something private to our eyes only; whatever it may be. 2014-01-06 17:12:44 -08:00
friendica
f133218b33 don't include deleted folks in acl popup 2013-12-25 23:14:13 -08: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
marijus
b2bb308e24 oups... should not do that... 2013-11-09 18:32:59 +01:00
marijus
3fbf78a859 fix directory leaking to ppl which aint got zot in searchbar-autocomplete if block_public is enabled 2013-11-09 17:56:19 +01:00
friendica
e8cd3b7040 bring back mail list and cleanup some issues which popped out with full PHP warnings 2013-08-27 22:30:06 -07:00
friendica
390a1ce552 more loose ends 2013-08-27 18:40:33 -07:00
friendica
c2f97f7490 populate initial suggestions (ultimately we want to do this at install time as well as from the poller so that new sites have friend suggestions when they create their first channel). 2013-08-05 20:08:35 -07:00
friendica
8aadb9ec3c mail completion issue 2013-07-21 21:48:12 -07:00
friendica
3bd7c1af23 fix some issues that showed up in the logs. 2013-07-15 18:07:23 -07:00
friendica
a37ac8f2f3 flag taggable connections in acl selector 2013-06-16 00:03:22 -07:00
Thomas Willingham
8090177efb Another missing include 2013-06-09 18:16:02 +01:00
friendica
2c1ba66016 make @tags half-ass work 2013-01-23 01:26:38 -08:00
friendica
d8d8dd5ced directory services cleanup 2013-01-19 01:07:35 -08:00
friendica
9725dcf41d distributed directory search from the navbar 2013-01-19 00:43:05 -08:00
friendica
1079c10fa4 progress on the acl selector - it should mostly work, but the returned data isn't yet parsed correctly in mod_item 2012-12-07 13:35:45 -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
186163a5ce check permissions for mail to non-connected people, reject if no permission - but you can try and send mail to any webbie. We probably should check for this before you send the message but perhaps we can find another way to let you know if it's allowed or not without an expensive probe. Like mod_follow, a webbie without an @ is treated as a local address. 2012-12-05 18:39:07 -08:00
friendica
e17ba14696 DB: do the mail table again. Mail almost working onsite, still needs to zot though 2012-12-04 18:24:46 -08:00