mirror of
https://github.com/e107inc/e107.git
synced 2025-07-15 12:06:19 +02:00
Menu handler didn't pick up plugin menus
This commit is contained in:
@ -10,9 +10,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $
|
||||||
| $Revision: 1.1 $
|
| $Revision: 1.2 $
|
||||||
| $Date: 2009-07-16 02:55:19 $
|
| $Date: 2009-07-16 19:19:07 $
|
||||||
| $Author: e107coders $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
@ -354,19 +354,18 @@ class menuManager{
|
|||||||
$file['fname'] = str_replace(".php","",$file['fname']);
|
$file['fname'] = str_replace(".php","",$file['fname']);
|
||||||
$valid_menu = FALSE;
|
$valid_menu = FALSE;
|
||||||
$existing_menu = $sql->db_Count("menus", "(*)", "WHERE menu_name='{$file['fname']}'");
|
$existing_menu = $sql->db_Count("menus", "(*)", "WHERE menu_name='{$file['fname']}'");
|
||||||
if (file_exists(e_PLUGIN.$parent_dir."/plugin.xml") ||
|
if (file_exists(e_PLUGIN.$parent_dir.'/plugin.xml') || file_exists(e_PLUGIN.$parent_dir.'/plugin.php'))
|
||||||
file_exists(e_PLUGIN.$parent_dir."/plugin.php"))
|
|
||||||
{
|
{
|
||||||
// include(e_PLUGIN.$parent_dir."/plugin.php");
|
if (plugInstalled($parent_dir))
|
||||||
if (isset($pref['plug_installed'][$parent_dir]))
|
|
||||||
// if ($sql->db_Select("plugin", "*", "plugin_path='".$eplug_folder."' AND plugin_installflag='1' "))
|
|
||||||
{ // Its a 'new style' plugin with a plugin.php file, or an even newer one with plugin.xml file - only include if plugin installed
|
{ // Its a 'new style' plugin with a plugin.php file, or an even newer one with plugin.xml file - only include if plugin installed
|
||||||
$valid_menu = TRUE; // Whether new or existing, include in list
|
$valid_menu = TRUE; // Whether new or existing, include in list
|
||||||
|
// echo "Include {$parent_dir}:{$file['fname']}<br />";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Just add the menu anyway
|
{ // Just add the menu anyway
|
||||||
$valid_menu = TRUE;
|
$valid_menu = TRUE;
|
||||||
|
// echo "Default Include {$parent_dir}:{$file['fname']}<br />";
|
||||||
}
|
}
|
||||||
if ($valid_menu)
|
if ($valid_menu)
|
||||||
{
|
{
|
||||||
@ -696,7 +695,7 @@ class menuManager{
|
|||||||
$text .= "<tr><td style='width:50%;text-align:center;padding-bottom:4px'>".MENLAN_36."...</td><td style='width:50%;padding-bottom:4px;text-align:center'>...".MENLAN_37."</td></tr>";
|
$text .= "<tr><td style='width:50%;text-align:center;padding-bottom:4px'>".MENLAN_36."...</td><td style='width:50%;padding-bottom:4px;text-align:center'>...".MENLAN_37."</td></tr>";
|
||||||
$text .= "<tr><td style='width:50%;vertical-align:top;text-align:center'>";
|
$text .= "<tr><td style='width:50%;vertical-align:top;text-align:center'>";
|
||||||
|
|
||||||
$sql->db_Select("menus", "menu_name, menu_id, menu_pages", "1 GROUP BY menu_name ORDER BY menu_name ASC");
|
$sql->db_Select("menus", "menu_name, menu_id, menu_pages, menu_path", "1 GROUP BY menu_name ORDER BY menu_name ASC");
|
||||||
|
|
||||||
if(!$this->dragDrop)
|
if(!$this->dragDrop)
|
||||||
{
|
{
|
||||||
@ -721,7 +720,7 @@ class menuManager{
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$row['menu_name'] = preg_replace("#_menu$#i", "", $row['menu_name']);
|
$row['menu_name'] = preg_replace("#_menu$#i", "", $row['menu_name']);
|
||||||
if($pnum = $this->checkMenuPreset($menuPreset,$row['menu_name']."_menu"))
|
if($pnum = $this->checkMenuPreset($menuPreset,$row['menu_name'].'_menu'))
|
||||||
{
|
{
|
||||||
$pdeta = MENLAN_39." {$pnum}";
|
$pdeta = MENLAN_39." {$pnum}";
|
||||||
}
|
}
|
||||||
@ -729,8 +728,9 @@ class menuManager{
|
|||||||
|
|
||||||
if(!$this->dragDrop)
|
if(!$this->dragDrop)
|
||||||
{
|
{
|
||||||
|
$menuInf = (strlen($row['menu_path']) > 1) ? ' ('.substr($row['menu_path'],0,-1).')' : '';
|
||||||
$text .= "<tr style='background-color:$color;color:black'>
|
$text .= "<tr style='background-color:$color;color:black'>
|
||||||
<td style='text-align:left; color:black;'><input type='checkbox' name='menuselect[]' value='{$row['menu_id']}' />".$row['menu_name']."</td>
|
<td style='text-align:left; color:black;'><input type='checkbox' name='menuselect[]' value='{$row['menu_id']}' />".$row['menu_name'].$menuInf."</td>
|
||||||
<td style='color:black'> ".$pdeta." </td>
|
<td style='color:black'> ".$pdeta." </td>
|
||||||
</tr>\n";
|
</tr>\n";
|
||||||
}
|
}
|
||||||
@ -738,7 +738,7 @@ class menuManager{
|
|||||||
{
|
{
|
||||||
$text .= "<div class='block block-archive' id='block-archive-".$row['menu_id']."--".$this->dbLayout."' style='border:1px outset black;text-align:left;color:black'>
|
$text .= "<div class='block block-archive' id='block-archive-".$row['menu_id']."--".$this->dbLayout."' style='border:1px outset black;text-align:left;color:black'>
|
||||||
|
|
||||||
<div class='block-toggle'><input type='checkbox' name='menuselect[]' value='{$row['menu_id']}' />".$row['menu_name']." $pdeta</div>
|
<div class='block-toggle'><input type='checkbox' name='menuselect[]' value='{$row['menu_id']}' />".$row['menu_name']." {$pdeta}</div>
|
||||||
<div class='content'>";
|
<div class='content'>";
|
||||||
$text .= $this->menuRenderMenu($row,$menu_count);
|
$text .= $this->menuRenderMenu($row,$menu_count);
|
||||||
$text .= "</div></div>\n";
|
$text .= "</div></div>\n";
|
||||||
|
Reference in New Issue
Block a user