Commit graph

128 commits

Author SHA1 Message Date
redmatrix
a497d8ee66 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	mod/editpost.php
	util/messages.po
	view/nl/messages.po
	view/nl/strings.php
2015-07-10 14:27:41 -07:00
Mario Vavti
b6f28900e6 show status editor in /display on share action. 2015-07-10 21:48:24 +02:00
Mario Vavti
c7b55f7753 revert
do not show status editor in /display - we most probably want to read the thread or comment.
2015-07-09 22:31:21 +02:00
Mario Vavti
0bec45e570 do not show status editor in /display - we most probably want to read the thread or comment. 2015-07-09 21:03:10 +02:00
redmatrix
ca870dbf31 more work on item table optimisation 2015-06-10 16:59:04 -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
a2e3ca6fd8 add loadtime search to channel and fix it for home. display and search need further investigation 2015-03-21 16:46:28 -07:00
zottel
48080d4103 correct indent 2015-02-20 14:11:28 +01:00
zottel
2c7e8bea88 show item title in channel/mid and display pages 2015-02-20 14:07:56 +01: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
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
ff68ea6087 more message restrict conversions 2015-01-29 14:51:41 -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
4c2a1e572a start on item_restrict conversion 2015-01-22 21:04:54 -08:00
friendica
e46eba1258 heavy lifting converting item flag bits 2015-01-22 17:41:16 -08:00
friendica
e528483d81 hide friends broken, add parameter for item search by verb 2015-01-13 14:42:54 -08:00
friendica
9c445e9817 incorrect check for sys ownership 2014-12-19 00:28:36 -08:00
friendica
f28103d595 wall tags 2014-12-15 14:37: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
d4759a5883 repeated content collapse on update from display page under rare conditions (when the conversation hasn't changed) 2014-09-18 16:32:05 -07:00
friendica
3d7d6ec21f honour sys channel permissions for who can view the sys owned content 2014-07-26 18:48:25 -07:00
friendica
00904d4994 cleanup 2014-06-19 16:09:02 -07:00
friendica
0f6c321e3f only show jotnets when posting conversation items 2014-06-14 20:16:40 -07:00
friendica
3dfcfbf85c issue #433 2014-06-10 22:35:15 -07:00
friendica
04cd60a0e3 add sys channel (discover) posts to "anonymous" search. They will by default be public. 2014-06-03 17:17:26 -07:00
friendica
6f570a7df3 mod_display: match "message_id begins with xxxx" as well as "message_id = xxxx" 2014-05-22 16:35:43 -07:00
marijus
9f621dac85 change the way jot tools are displayed/hidden 2014-04-08 22:07:06 +02:00
friendica
7b24b78af9 add fh to other page templates 2014-03-27 00:35:46 -07:00
friendica
7910221832 preparatory work for supporting a "list view" mode for conversations. This would be useful for forum-like channels and/or block-oriented themes. 2014-01-08 15:20:12 -08:00
zottel
b3e3073b99 JS-less display 2013-12-17 12:23:39 +01:00
friendica
1c5f98440d quite a bit of work on default acl permissions and various acl quirks 2013-11-29 14:09:21 -08:00
friendica
4415ed7820 mod_display - if we are given the mid of a webpage, redirect to that webpage. This lets us include webpages in searches and 'view in context' will do the right thing. 2013-10-28 18:20:04 -07:00
friendica
4ce948731a doc - complete hook list, still need detailed functional descriptions with parameters and examples for each 2013-10-18 15:48:59 -07:00
friendica
3772682204 Put a status editor on the display page if you're logged in. This fixes issue #113 and also provides the ability to reshare from that page. 2013-10-18 14:25:55 -07:00
friendica
454aa6bff3 turn off endless scroll if we have no more content to load - currently for mod_display, need to add to other content modules 2013-10-13 20:09:11 -07:00
friendica
a2b20bd58f one more edge case in the public perms - don't match perms = 0 which is private, this and prior checkin are for issue #114 2013-09-22 23:00:55 -07:00
friendica
956d275693 fixes for display and search privacy enforcement 2013-09-22 22:52:48 -07:00
friendica
de777d2f9c remove old debugging cruft 2013-09-10 21:17:33 -07:00
friendica
d194ee091a encode and decode channel names containing HTML special characters and quotes so they will survive a reshare without mangling 2013-09-06 05:25:10 -07:00
friendica
c0cc494bf3 fix mod-display when not logged in. 2013-06-18 02:06:16 -07:00
friendica
d3b5e67890 odds and ends in prepearation for photo abstraction, plus red-to-friendica addon 2013-04-25 01:55:35 -07:00
Thomas Willingham
fb8a0e06c4 Updated build_query for mid 2013-03-25 19:20:12 +00:00
friendica
23cd14329d fix mod_display breakage. 2013-03-24 19:51:23 -07:00
friendica
ddf5bf8968 rename 'uri' (and parent_uri) to 'mid' (and parent_mid) since these no longer remotely resemble uri's and are actually message_id's. This change is potentially destabilising because it touches a lot of code and structure. But it has to get done and there's no better time than the present. 2013-03-21 18:25:41 -07:00
friendica
1aa7561a2c improve mod/display for local users - use their own copy if possible 2013-03-02 14:46:09 -08:00
friendica
ba3cff6d9a progress on tag delivery 2013-02-11 00:20:14 -08:00
friendica
90c1ecca24 taming the wild mod_display 2013-02-10 17:03:33 -08:00
friendica
2cfd73c57d progress on mod/display - slow but any progress is good 2013-02-10 16:04:03 -08:00
friendica
99c5f88963 mod_display - no fun. Not working at all. But a bit of progress. 2013-02-10 04:55:29 -08:00