From 2768262f9386e063efb4d7e276c5a7108c40d44b Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 2 Feb 2014 16:49:09 -0800 Subject: Add switch to allow menus to be used as bookmark collections --- mod/menu.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mod/menu.php') diff --git a/mod/menu.php b/mod/menu.php index 47eed6484..3d6b9939c 100644 --- a/mod/menu.php +++ b/mod/menu.php @@ -8,6 +8,8 @@ function menu_post(&$a) { return; $_REQUEST['menu_channel_id'] = local_user(); + if($_REQUEST['menu_bookmark']) + $_REQUEST['menu_flags'] = MENU_BOOKMARK; $menu_id = ((argc() > 1) ? intval(argv(1)) : 0); if($menu_id) { @@ -76,6 +78,7 @@ function menu_content(&$a) { '$header' => t('New Menu'), '$menu_name' => array('menu_name', t('Menu name'), '', t('Must be unique, only seen by you'), '*'), '$menu_desc' => array('menu_desc', t('Menu title'), '', t('Menu title as seen by others'), ''), + '$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), 0 , t('Menu can be used to store saved bookmarks'), ''), '$submit' => t('Create') )); return $o; @@ -104,6 +107,7 @@ function menu_content(&$a) { '$editcontents' => t('Edit menu contents'), '$menu_name' => array('menu_name', t('Menu name'), $m['menu_name'], t('Must be unique, only seen by you'), '*'), '$menu_desc' => array('menu_desc', t('Menu title'), $m['menu_desc'], t('Menu title as seen by others'), ''), + '$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), (($m['menu_flags'] & MENU_BOOKMARK) ? 1 : 0), t('Menu can be used to store saved bookmarks'), ''), '$submit' => t('Modify') )); return $o; -- cgit v1.2.3 From 3eed73d5195bbf736e2e243b512155b6933108a1 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 2 Feb 2014 16:51:11 -0800 Subject: minor text change "can" -> "may" --- mod/menu.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/menu.php') diff --git a/mod/menu.php b/mod/menu.php index 3d6b9939c..dd8fe8300 100644 --- a/mod/menu.php +++ b/mod/menu.php @@ -78,7 +78,7 @@ function menu_content(&$a) { '$header' => t('New Menu'), '$menu_name' => array('menu_name', t('Menu name'), '', t('Must be unique, only seen by you'), '*'), '$menu_desc' => array('menu_desc', t('Menu title'), '', t('Menu title as seen by others'), ''), - '$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), 0 , t('Menu can be used to store saved bookmarks'), ''), + '$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), 0 , t('Menu may be used to store saved bookmarks'), ''), '$submit' => t('Create') )); return $o; @@ -107,7 +107,7 @@ function menu_content(&$a) { '$editcontents' => t('Edit menu contents'), '$menu_name' => array('menu_name', t('Menu name'), $m['menu_name'], t('Must be unique, only seen by you'), '*'), '$menu_desc' => array('menu_desc', t('Menu title'), $m['menu_desc'], t('Menu title as seen by others'), ''), - '$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), (($m['menu_flags'] & MENU_BOOKMARK) ? 1 : 0), t('Menu can be used to store saved bookmarks'), ''), + '$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), (($m['menu_flags'] & MENU_BOOKMARK) ? 1 : 0), t('Menu may be used to store saved bookmarks'), ''), '$submit' => t('Modify') )); return $o; -- cgit v1.2.3 From 0844110f7b154a0fb5102362fe732c2b091222d7 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 5 Feb 2014 03:44:46 -0800 Subject: preserve system bit when editing menus --- mod/menu.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mod/menu.php') diff --git a/mod/menu.php b/mod/menu.php index dd8fe8300..a2d0c2385 100644 --- a/mod/menu.php +++ b/mod/menu.php @@ -9,7 +9,9 @@ function menu_post(&$a) { $_REQUEST['menu_channel_id'] = local_user(); if($_REQUEST['menu_bookmark']) - $_REQUEST['menu_flags'] = MENU_BOOKMARK; + $_REQUEST['menu_flags'] |= MENU_BOOKMARK; + if($_REQUEST['menu_system']) + $_REQUEST['menu_flags'] |= MENU_SYSTEM; $menu_id = ((argc() > 1) ? intval(argv(1)) : 0); if($menu_id) { @@ -108,6 +110,7 @@ function menu_content(&$a) { '$menu_name' => array('menu_name', t('Menu name'), $m['menu_name'], t('Must be unique, only seen by you'), '*'), '$menu_desc' => array('menu_desc', t('Menu title'), $m['menu_desc'], t('Menu title as seen by others'), ''), '$menu_bookmark' => array('menu_bookmark', t('Allow bookmarks'), (($m['menu_flags'] & MENU_BOOKMARK) ? 1 : 0), t('Menu may be used to store saved bookmarks'), ''), + '$menu_system' => (($m['menu_flags'] & MENU_SYSTEM) ? 1 : 0), '$submit' => t('Modify') )); return $o; -- cgit v1.2.3