Add switch to allow menus to be used as bookmark collections

This commit is contained in:
friendica
2014-02-02 16:49:09 -08:00
parent abb68e846d
commit 2768262f93
3 changed files with 6 additions and 2 deletions

View File

@@ -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;