aboutsummaryrefslogtreecommitdiffstats
path: root/include/menu.php
Commit message (Collapse)AuthorAgeFilesLines
* PostgreSQL support initial commitHabeas Codice2014-11-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* show bookmarks menu only if we have any bookmarks alreadymarijus2014-09-201-0/+10
|
* comanche: provide an option to add a menu class for different theming ↵friendica2014-02-251-1/+2
| | | | choices on some menus (e.g. horizontal, tabbed, etc.)
* edit bookmarksfriendica2014-02-181-1/+1
|
* from olivier: use double quotes in js strings, updated FR translationfriendica2014-02-071-1/+2
| | | | from me: provide future ability to have an optional edit link/icon next to menus (such as bookmarks)
* order menu_list by description, not namefriendica2014-02-071-1/+1
|
* allow bookmarks to use richtextfriendica2014-02-051-1/+4
|
* bookmarks - mop up and go homefriendica2014-02-041-1/+1
|
* bookmarkingfriendica2014-02-041-12/+15
|
* fix the search for system bookmarksfriendica2014-02-041-3/+9
|
* Add switch to allow menus to be used as bookmark collectionsfriendica2014-02-021-1/+1
|
* cleanup include/menu in preparation for the next phase of bookmarkingfriendica2014-01-271-41/+9
|
* some more bookmark infrastructure plus a doc updatefriendica2014-01-181-9/+44
|
* finish ACL's in personal menusfriendica2013-12-071-12/+58
|
* set menu_channel_id before we use it in a queryMichael Johnston2013-09-141-3/+2
|
* let me edit menu_desc even if menu_name has not changedMichael Johnston2013-09-141-2/+4
|
* really truly bare-bones comanchefriendica2013-08-281-0/+1
|
* menu management is now functional with the exception of acl's (and of course ↵friendica2013-08-131-1/+3
| | | | a way to display the menus you create, and probably a bit more input sanity checking)
* menu management complete (as opposed to menu *content* management, which is ↵friendica2013-08-131-0/+23
| | | | not). As usual, this means functionally complete - as theming and presentation have been left for those more suited to the task.
* a bit more work on menusfriendica2013-08-131-0/+8
|
* more menu manage functions - should be everything we need to get startedfriendica2013-08-111-0/+187
|
* debugging user menusfriendica2013-08-111-6/+4
|
* check these in so I can go back and find out why the stylsheet is horkedfriendica2013-08-111-0/+40