Skip to content
Snippets Groups Projects
Commit 33eeb75a authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX #5876 remove "null" in history

parent cb8533d0
No related branches found
No related tags found
No related merge requests found
......@@ -51,12 +51,12 @@ $core_tools2->manage_location_bar($page_path, $page_label, $page_id, $init, $lev
/***********************************************************/
$db = new Database();
$where = '';
$where = '';
$arrayPDO = array();
$label = '';
$tab = array();
$modules = array();
$stmt = $db->query("SELECT DISTINCT id_module FROM ".$_SESSION['tablename']['history']);
$label = '';
$tab = array();
$modules = array();
$stmt = $db->query("SELECT DISTINCT ON(lower(id_module)) id_module FROM history WHERE id_module NOT IN ('null') ORDER BY lower(id_module)");
while ($res = $stmt->fetchObject()) {
if ($res->id_module == 'admin') {
array_push($modules, array('id' => 'admin', 'label' => _ADMIN));
......@@ -124,7 +124,7 @@ if (isset($_REQUEST['search']) ||
$history_module=$_SESSION['m_admin']['history']['module'];
}
if (!empty($history_module)) {
$where .= " ".$_SESSION['tablename']['history'].".id_module = ? and";
$where .= " lower(".$_SESSION['tablename']['history'].".id_module) = lower(?) and";
$arrayPDO = array_merge($arrayPDO, array($history_module));
}
}
......
......@@ -435,6 +435,9 @@ else if(empty($_POST['values']) || !isset($_POST['action_id']) || empty($_POST['
}
$_SESSION['info'] = $what . ' ';
$_SESSION['cpt_info_basket'] = 0;
if($_POST['module'] == 'null'){
$_POST['module'] = '';
}
$hist->add(
$_POST['table'],
$arr_res[$i],'ACTION#'.$id_action, $id_action,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment