Commit graph

37 commits

Author SHA1 Message Date
redmatrix
50d7554ccd add sync packets for menus 2015-09-08 18:40:19 -07:00
Mario Vavti
5040506184 should not redefine $var in the function call 2015-05-29 17:59:31 +02:00
Mario Vavti
2514af6524 fix menu render for menu item edit - menu preview 2015-05-29 17:51:50 +02:00
Mario Vavti
b8d3280763 some fixes to make menu sharing work and expose it in the ui. 2015-05-29 13:08:01 +02:00
redmatrix
9ff988e3d7 parse error 2015-05-28 21:27:48 -07:00
redmatrix
07203c1de3 another case of committing with unsaved changes in a second window 2015-05-28 20:54:57 -07:00
redmatrix
0f09a4499b add menu_created, menu_edited fields to DB 2015-05-28 16:59:56 -07:00
redmatrix
12c17f1265 menu encoding for sharing/exchange 2015-05-27 21:09:21 -07:00
Mario Vavti
70e5bf04e1 uid > channel id to make submenus visible for observers 2015-05-10 21:52:48 +02:00
Mario Vavti
616338c17e provide ability to create submenus 2015-05-10 15:00:18 +02:00
Mario Vavti
cd8ecb8649 provide wrap variable for comanche menus 2015-05-07 23:02:14 +02:00
Mario Vavti
71117628bc attach an id to menues, allow $menu_title to be empty, if no custom menu class is provided use default redbasic classes 2015-04-19 15:22:50 +02:00
Mario Vavti
dd5b97639e Introduce wrap variable in comanche blocks (if set to none the block will not be wrapped in a div), fix menu item permissions (it was not possible to set them visible for everybody) and a typo 2015-04-19 13:25:05 +02:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -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
marijus
bd54358aa6 show bookmarks menu only if we have any bookmarks already 2014-09-20 16:31:56 +02:00
friendica
364fc9f163 comanche: provide an option to add a menu class for different theming choices on some menus (e.g. horizontal, tabbed, etc.) 2014-02-25 20:58:20 -08:00
friendica
9a51f8ce65 edit bookmarks 2014-02-18 14:26:23 -08:00
friendica
63589d4f2e from olivier: use double quotes in js strings, updated FR translation
from me: provide future ability to have an optional edit link/icon next to menus (such as bookmarks)
2014-02-07 13:39:13 -08:00
friendica
c80325b427 order menu_list by description, not name 2014-02-07 01:49:34 -08:00
friendica
1b406be544 allow bookmarks to use richtext 2014-02-05 16:28:51 -08:00
friendica
aede006970 bookmarks - mop up and go home 2014-02-04 17:12:13 -08:00
friendica
3665bc38ef bookmarking 2014-02-04 16:06:56 -08:00
friendica
46b9352a84 fix the search for system bookmarks 2014-02-04 01:42:43 -08:00
friendica
2768262f93 Add switch to allow menus to be used as bookmark collections 2014-02-02 16:49:09 -08:00
friendica
d6a9497e4a cleanup include/menu in preparation for the next phase of bookmarking 2014-01-27 14:46:39 -08:00
friendica
db67f08d3c some more bookmark infrastructure plus a doc update 2014-01-18 21:45:42 -08:00
friendica
6dc157a9f9 finish ACL's in personal menus 2013-12-07 13:05:17 -08:00
Michael Johnston
ec7b462b18 set menu_channel_id before we use it in a query 2013-09-14 18:16:54 -04:00
Michael Johnston
0c4857e1a9 let me edit menu_desc even if menu_name has not changed 2013-09-14 17:59:44 -04:00
friendica
03e1a0cc15 really truly bare-bones comanche 2013-08-28 20:03:01 -07:00
friendica
9508967c73 menu management is now functional with the exception of acl's (and of course a way to display the menus you create, and probably a bit more input sanity checking) 2013-08-13 20:57:03 -07:00
friendica
680baff73d menu management complete (as opposed to menu *content* management, which is not). As usual, this means functionally complete - as theming and presentation have been left for those more suited to the task. 2013-08-13 18:10:03 -07:00
friendica
55cb322489 a bit more work on menus 2013-08-13 01:24:02 -07:00
friendica
98c5bce56a more menu manage functions - should be everything we need to get started 2013-08-11 21:18:32 -07:00
friendica
1600e72158 debugging user menus 2013-08-11 19:20:05 -07:00
friendica
6191cfef2a check these in so I can go back and find out why the stylsheet is horked 2013-08-11 19:04:07 -07:00