diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-05-10 13:18:04 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-05-10 13:18:04 -0700 |
commit | 2cb8b19972eb6a023eca1297f281ef9f68934c64 (patch) | |
tree | 91897ec0f7e1ed4ed0aba652e3deea23082f13ab /mod | |
parent | 3140650b8f057b6e88827908a71cecbe68494a10 (diff) | |
parent | 70e5bf04e160bf1e3f2673f4405ac6a6adecb485 (diff) | |
download | volse-hubzilla-2cb8b19972eb6a023eca1297f281ef9f68934c64.tar.gz volse-hubzilla-2cb8b19972eb6a023eca1297f281ef9f68934c64.tar.bz2 volse-hubzilla-2cb8b19972eb6a023eca1297f281ef9f68934c64.zip |
Merge https://github.com/redmatrix/redmatrix into pending_merge
Diffstat (limited to 'mod')
-rw-r--r-- | mod/editlayout.php | 2 | ||||
-rw-r--r-- | mod/mitem.php | 17 |
2 files changed, 14 insertions, 5 deletions
diff --git a/mod/editlayout.php b/mod/editlayout.php index 706720667..8ab5aab22 100644 --- a/mod/editlayout.php +++ b/mod/editlayout.php @@ -130,7 +130,7 @@ function editlayout_content(&$a) { // FIXME A return path with $_SESSION doesn't always work for observer - it may WSoD // instead of loading a sensible page. So, send folk to the webpage list. - $rp = '/layouts/' . $which; + $rp = 'layouts/' . $which; $o .= replace_macros($tpl,array( '$return_path' => $rp, diff --git a/mod/mitem.php b/mod/mitem.php index 06c66a323..e4a4b7030 100644 --- a/mod/mitem.php +++ b/mod/mitem.php @@ -124,6 +124,13 @@ function mitem_content(&$a) { $m = menu_fetch($a->data['menu']['menu_name'],$uid,$ob_hash); $a->data['menu_item'] = $m; + $menu_list = menu_list($uid); + + foreach($menu_list as $menus) { + if($menus['menu_name'] != $m['menu']['menu_name']) + $menu_names[] = $menus['menu_name']; + } + $perm_defaults = array( 'allow_cid' => $channel['channel_allow_cid'], 'allow_gid' => $channel['channel_allow_gid'], @@ -152,14 +159,15 @@ function mitem_content(&$a) { '$permdesc' => t("\x28click to open/close\x29"), '$aclselect' => populate_acl($perm_defaults,false), '$mitem_desc' => array('mitem_desc', t('Link Name'), '', 'Visible name of the link','*'), - '$mitem_link' => array('mitem_link', t('Link Target'), '', 'URL of the link', '*'), + '$mitem_link' => array('mitem_link', t('Link or Submenu Target'), '', 'Enter URL of the link or select a menu name to create a submenu', '*', 'list="menu-names"'), '$usezid' => array('usezid', t('Use RedMatrix magic-auth if available'), true, ''), '$newwin' => array('newwin', t('Open link in new window'), false,''), '$mitem_order' => array('mitem_order', t('Order in list'),'0',t('Higher numbers will sink to bottom of listing')), '$submit' => t('Submit and finish'), '$submit_more' => t('Submit and continue'), '$display' => $display, - '$lockstate' => $lockstate + '$lockstate' => $lockstate, + '$menu_names' => $menu_names )); $o .= replace_macros(get_markup_template('mitemlist.tpl'),array( @@ -222,12 +230,13 @@ function mitem_content(&$a) { '$aclselect' => populate_acl($mitem,false), '$mitem_id' => intval(argv(2)), '$mitem_desc' => array('mitem_desc', t('Link text'), $mitem['mitem_desc'], '','*'), - '$mitem_link' => array('mitem_link', t('URL of link'), $mitem['mitem_link'], '', '*'), + '$mitem_link' => array('mitem_link', t('Link or Submenu Target'), $mitem['mitem_link'], 'Enter URL of the link or select a menu name to create a submenu', '*', 'list="menu-names"'), '$usezid' => array('usezid', t('Use RedMatrix magic-auth if available'), (($mitem['mitem_flags'] & MENU_ITEM_ZID) ? 1 : 0), ''), '$newwin' => array('newwin', t('Open link in new window'), (($mitem['mitem_flags'] & MENU_ITEM_NEWWIN) ? 1 : 0),''), '$mitem_order' => array('mitem_order', t('Order in list'),$mitem['mitem_order'],t('Higher numbers will sink to bottom of listing')), '$submit' => t('Submit'), - '$lockstate' => $lockstate + '$lockstate' => $lockstate, + '$menu_names' => $menu_names )); return $o; |