|
|
|
@@ -272,28 +272,28 @@ class e_menuManager {
|
|
|
|
|
$menu_count = $sql->count("menus", "(*)", " WHERE menu_location='{$location}' AND menu_layout = '".$this->dbLayout."' ");
|
|
|
|
|
$sql->db_Update("menus", "menu_order=".($menu_count+1)." WHERE menu_order='{$position}' AND menu_location='{$location}' AND menu_layout = '$this->dbLayout' ");
|
|
|
|
|
$sql->db_Update("menus", "menu_order=menu_order-1 WHERE menu_location='{$location}' AND menu_order > {$position} AND menu_layout = '".$this->dbLayout."' ");
|
|
|
|
|
$admin_log->log_event('MENU_06',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
e107::getLog()->add('MENU_06',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($menu_act == "top")
|
|
|
|
|
{
|
|
|
|
|
$sql->db_Update("menus", "menu_order=menu_order+1 WHERE menu_location='{$location}' AND menu_order < {$position} AND menu_layout = '".$this->dbLayout."' ",$this->debug);
|
|
|
|
|
$sql->db_Update("menus", "menu_order=1 WHERE menu_id='{$this->menuId}' ");
|
|
|
|
|
$admin_log->log_event('MENU_05',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
e107::getLog()->add('MENU_05',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($menu_act == "dec")
|
|
|
|
|
{
|
|
|
|
|
$sql->db_Update("menus", "menu_order=menu_order-1 WHERE menu_order='".($position+1)."' AND menu_location='{$location}' AND menu_layout = '".$this->dbLayout."' ",$this->debug);
|
|
|
|
|
$sql->db_Update("menus", "menu_order=menu_order+1 WHERE menu_id='{$this->menuId}' AND menu_location='{$location}' AND menu_layout = '".$this->dbLayout."' ");
|
|
|
|
|
$admin_log->log_event('MENU_08',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
e107::getLog()->add('MENU_08',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($menu_act == "inc")
|
|
|
|
|
{
|
|
|
|
|
$sql->db_Update("menus", "menu_order=menu_order+1 WHERE menu_order='".($position-1)."' AND menu_location='{$location}' AND menu_layout = '".$this->dbLayout."' ",$this->debug);
|
|
|
|
|
$sql->db_Update("menus", "menu_order=menu_order-1 WHERE menu_id='{$this->menuId}' AND menu_location='{$location}' AND menu_layout = '".$this->dbLayout."' ");
|
|
|
|
|
$admin_log->log_event('MENU_07',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
e107::getLog()->add('MENU_07',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!isset($_GET['configure']))
|
|
|
|
@@ -345,7 +345,7 @@ class e_menuManager {
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$sql->db_Insert("menus",$insert);
|
|
|
|
|
$admin_log->log_event('MENU_01',$row['menu_name'].'[!br!]'.$location.'[!br!]'.$menu_count.'[!br!]'.$row['menu_path'],E_LOG_INFORMATIVE,'');
|
|
|
|
|
e107::getLog()->add('MENU_01',$row['menu_name'].'[!br!]'.$location.'[!br!]'.$menu_count.'[!br!]'.$row['menu_path'],E_LOG_INFORMATIVE,'');
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -657,7 +657,7 @@ class e_menuManager {
|
|
|
|
|
|
|
|
|
|
$sql->db_Insert("menus",$insert, $this->debug);
|
|
|
|
|
|
|
|
|
|
$admin_log->log_event('MENU_01',$row['menu_name'].'[!br!]'.$location.'[!br!]'.$menu_count.'[!br!]'.$row['menu_path'],E_LOG_INFORMATIVE,'');
|
|
|
|
|
e107::getLog()->add('MENU_01',$row['menu_name'].'[!br!]'.$location.'[!br!]'.$menu_count.'[!br!]'.$row['menu_path'],E_LOG_INFORMATIVE,'');
|
|
|
|
|
$menu_count++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -774,7 +774,7 @@ class e_menuManager {
|
|
|
|
|
{
|
|
|
|
|
return array('msg'=>'All Okay','error'=>false);
|
|
|
|
|
// FIXME - menu log
|
|
|
|
|
//$admin_log->log_event('MENU_02',$_POST['menu_parms'].'[!br!]'.$parms.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
//e107::getLog()->add('MENU_02',$_POST['menu_parms'].'[!br!]'.$parms.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
// $this->menuAddMessage(LAN_SAVED,E_MESSAGE_SUCCESS);
|
|
|
|
|
}
|
|
|
|
|
elseif(false === $check)
|
|
|
|
@@ -808,7 +808,7 @@ class e_menuManager {
|
|
|
|
|
|
|
|
|
|
if($sql->db_Update("menus", "menu_class='".intval($_POST['menu_class'])."', menu_pages='{$pageparms}' WHERE menu_id=".intval($_POST['menu_id'])))
|
|
|
|
|
{
|
|
|
|
|
$admin_log->log_event('MENU_02',$_POST['menu_class'].'[!br!]'.$pageparms.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
e107::getLog()->add('MENU_02',$_POST['menu_class'].'[!br!]'.$pageparms.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
|
|
|
|
|
return array('msg'=>LAN_UPDATED, 'error'=> false);
|
|
|
|
|
//$this->menuAddMessage($message,E_MESSAGE_SUCCESS);
|
|
|
|
@@ -862,7 +862,7 @@ class e_menuManager {
|
|
|
|
|
}
|
|
|
|
|
//Move all menus up (reduces order number) that have a higher menu order number than one deactivated, in the selected location.
|
|
|
|
|
$sql->db_Update("menus", "menu_order=menu_order-1 WHERE menu_location={$row['menu_location']} AND menu_order > {$row['menu_order']} AND menu_layout = '".$this->dbLayout."' ");
|
|
|
|
|
$admin_log->log_event('MENU_04',$row['menu_name'].'[!br!]'.$row['menu_location'].'[!br!]'.$row['menu_order'].'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
e107::getLog()->add('MENU_04',$row['menu_name'].'[!br!]'.$row['menu_location'].'[!br!]'.$row['menu_order'].'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@@ -892,7 +892,7 @@ class e_menuManager {
|
|
|
|
|
$sql->db_Update("menus", "menu_location='{$this->menuNewLoc}', menu_order=".($menu_count+1)." WHERE menu_id=".$this->menuId);
|
|
|
|
|
$sql->db_Update("menus", "menu_order=menu_order-1 WHERE menu_location='{$location}' AND menu_order > {$position} AND menu_layout='".$this->dbLayout ."' ");
|
|
|
|
|
}
|
|
|
|
|
$admin_log->log_event('MENU_03',$row['menu_name'].'[!br!]'.$this->menuNewLoc.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
e107::getLog()->add('MENU_03',$row['menu_name'].'[!br!]'.$this->menuNewLoc.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|