Commit graph

357 commits

Author SHA1 Message Date
friendica
084ca3f4a1 typo 2015-02-12 18:49:42 -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
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
friendica
a93f2b1b8f now that's useful... 2015-01-13 18:41:11 -08:00
friendica
e528483d81 hide friends broken, add parameter for item search by verb 2015-01-13 14:42:54 -08:00
friendica
f28103d595 wall tags 2014-12-15 14:37:31 -08:00
friendica
db3015e34e allow members to set the per-item "show more" height (separately for network and matrix, display and search are system pages and therefore set at 400) 2014-11-17 23:48:03 -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
friendica
591f10e235 module cleanup 2014-11-16 19:08:10 -08:00
friendica
cbaee76dd9 "list mode" (forum and blog mode, no comments or comment boxes displayed on the summary page) 2014-11-16 16:19:24 -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
e8854bb19d better way to deal with effective_uid 2014-09-22 22:03:19 -07:00
friendica
fb05919d90 make discover items interactive 2014-09-22 21:37:19 -07:00
friendica
c061cc0955 sql string unquoted 2014-07-22 04:37:51 -07:00
friendica
68b7dc48bb the "page 2 shows up on top of page 1 when you wake up in the morning" bug. See the comments. 2014-07-21 21:15:03 -07:00
friendica
476675e211 get rid of some old crap 2014-06-17 21:51:20 -07:00
marijus
9f621dac85 change the way jot tools are displayed/hidden 2014-04-08 22:07:06 +02:00
Thomas Willingham
4a2805e12e Missed one 2014-03-30 23:01:31 +01:00
Thomas Willingham
1093e8d83e Default discover to on. 2014-03-30 22:59:37 +01:00
Alexandre Hannud Abdo
fedd19ec95 Let the site admin choose whether to display the Discover tab. 2014-03-30 00:03:12 -03:00
friendica
a0674af416 firehose fixes and optimisations. In particular get rid of the unresponsive script warning when trying to load updates (sine they aren't our posts, we can't check for unseen, hence we can't really load updates). Also make the url selection pluggable. 2014-03-27 15:35:29 -07:00
friendica
a5a55738bc superfluous comma 2014-03-27 00:07:11 -07:00
friendica
3044dc7f6d catch the "new" view as well 2014-03-26 22:11:34 -07:00
friendica
5a3903a40c firehose testing (network?f=&fh=1) - some possible security bugs so testing purposes only 2014-03-26 22:05:19 -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
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
941f81eb30 check that every invocation of htmlspecialchars has the right arg list 2013-12-12 02:01:42 -08:00
friendica
b4e1e8a4a4 The affinity tool is not a "traditional" widget. But it is nevertheless a widget. It just makes fewer page layout decisions which are hard-coded. If you want to shrink it down and put it on the sidebar in your theme, go for it. 2013-12-11 19:43:41 -08:00
friendica
0043ef66b6 mod_network is now running under Comanche. Yay. 2013-12-10 00:25:32 -08:00
friendica
e873f6e95e we're almost ready to turn on comanche for mod_network. All the widgets are done. 2013-12-10 00:05:31 -08:00
friendica
ed9f108722 comanchify the savedsearch widget 2013-12-09 21:20:55 -08:00
friendica
f85cba10eb notes widget 2013-12-09 15:27:46 -08:00
friendica
082ac67778 suggestion widget tweaked to make it comanche capable. Remove old versions of specs that are so obsolete it isn't funny. Zot protocol reference is in red's github wiki, and in the code. We should move the github copy to /doc once it is updated to match the code. There's no point in documenting dfrn in the red code base. 2013-12-08 20:08:50 -08:00
friendica
8959487f1c transition to $a->set_widget in /network on the short term - long term this will be in view/pdl files 2013-12-08 16:16:54 -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
f45b06ffa0 suggestion widget 2013-12-06 21:40:01 -08:00
friendica
78d19f3395 move profile tabs and network/matrix tabs to include/conversation 2013-12-05 21:00:14 -08:00
friendica
28ac593e67 remove some cruft 2013-12-05 20:34:39 -08:00
friendica
b3f6220226 make some "selection-is-selected" classes work again 2013-12-05 19:23:30 -08:00
friendica
1c3c3c64bc issue #224 2013-12-05 19:07:59 -08: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
13538cdd21 pull in some posts when we first connect with a new channel (if allowed to) - if not allowed to, do it if that condition changes 2013-11-17 19:22:24 -08:00
friendica
f3d351621d Saved searches on the matrix/network page just got a lot more interesting. Hint: it's all about autocomplete 2013-10-01 19:54:22 -07:00
friendica
a06f1f9594 Issue #158 2013-09-29 02:47:36 -07:00
friendica
1126d8f2e3 hopefully this will go over a bit better - check post owner permissions as well as local owner permissions for comments during submission, since the comment was being blindly accepted on the local system due to only checking the profile owner. Also change collections query to include only top-level posts by a member of the collection. 2013-09-20 17:58:11 -07:00
friendica
9d49f2a47b make collections work again 2013-09-18 04:06:44 -07:00
friendica
fd5e2c6d6c fix network search - except it can't search private posts. That may be a problem. 2013-09-05 01:18:05 -07:00
friendica
b4bd518e40 silence some warnings at php E_ALL levels 2013-08-28 21:56:01 -07: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
92747366af move js from matrix page 2013-08-15 05:09:19 -07:00