mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 05:37:32 +02:00
Updated DB insert.
This commit is contained in:
@@ -10,8 +10,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/menumanager_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/menumanager_class.php,v $
|
||||||
| $Revision: 1.2 $
|
| $Revision: 1.3 $
|
||||||
| $Date: 2009-08-16 23:58:31 $
|
| $Date: 2009-08-17 14:47:10 $
|
||||||
| $Author: e107coders $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -351,6 +351,7 @@ class e_menuManager {
|
|||||||
$fileList = $efile->get_files(e_PLUGIN,"_menu\.php$",'standard',2);
|
$fileList = $efile->get_files(e_PLUGIN,"_menu\.php$",'standard',2);
|
||||||
foreach($fileList as $file)
|
foreach($fileList as $file)
|
||||||
{
|
{
|
||||||
|
|
||||||
list($parent_dir) = explode('/',str_replace(e_PLUGIN,"",$file['path']));
|
list($parent_dir) = explode('/',str_replace(e_PLUGIN,"",$file['path']));
|
||||||
$file['path'] = str_replace(e_PLUGIN,"",$file['path']);
|
$file['path'] = str_replace(e_PLUGIN,"",$file['path']);
|
||||||
$file['fname'] = str_replace(".php","",$file['fname']);
|
$file['fname'] = str_replace(".php","",$file['fname']);
|
||||||
@@ -364,17 +365,29 @@ class e_menuManager {
|
|||||||
// echo "Include {$parent_dir}:{$file['fname']}<br />";
|
// 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 />";
|
// echo "Default Include {$parent_dir}:{$file['fname']}<br />";
|
||||||
}
|
}
|
||||||
if ($valid_menu)
|
if ($valid_menu)
|
||||||
{
|
{
|
||||||
$menustr .= "&".str_replace(".php", "", $file['fname']);
|
$menustr .= "&".str_replace(".php", "", $file['fname']);
|
||||||
if (!$existing_menu)
|
if (!$existing_menu) // New menu to add to list
|
||||||
{ // New menu to add to list
|
{
|
||||||
if($sql->db_Insert("menus", " 0, '{$file['fname']}', 0, 0, 0, '' ,'{$file['path']}', ''"))
|
$insert = array(
|
||||||
|
'menu_id' => 0,
|
||||||
|
'menu_name' => $file['fname'],
|
||||||
|
'menu_location' => 0,
|
||||||
|
'menu_order' => 0,
|
||||||
|
'menu_class' => 0,
|
||||||
|
'menu_pages' => '',
|
||||||
|
'menu_path' => $file['path'],
|
||||||
|
'menu_layout' => '',
|
||||||
|
'menu_parms' => ''
|
||||||
|
);
|
||||||
|
|
||||||
|
if($sql->db_Insert("menus",$insert))
|
||||||
{
|
{
|
||||||
// Could do admin logging here - but probably not needed
|
// Could do admin logging here - but probably not needed
|
||||||
$message .= MENLAN_10." - ".$file['fname']."<br />";
|
$message .= MENLAN_10." - ".$file['fname']."<br />";
|
||||||
|
Reference in New Issue
Block a user