Commit e4b0ab95 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(management) Fix tab edit links by avoiding POST collision

issue #5135
parent 056e6ef9
......@@ -56,7 +56,7 @@ class managementFilter
$this->pid = preg_replace('/[^0-9]/', '', microtime(TRUE));
foreach ($this->parent->objectTypes as $type) {
$this->types[$type] = array(
$this->types['filter_type_'.$type] = array(
'show' => TRUE,
'filters' => array(),
'infos' => objects::infos($type),
......@@ -82,8 +82,8 @@ class managementFilter
{
if (isset($_POST['FILTER_PID']) && ($_POST['FILTER_PID'] == $this->pid)) {
// Load post values and adapt filter, base and scope accordingly
foreach ($this->types as $type => &$data) {
$data['show'] = isset($_POST[$type]);
foreach ($this->types as $key => &$data) {
$data['show'] = isset($_POST[$key]);
}
unset($data);
......@@ -145,10 +145,10 @@ class managementFilter
$entries = array();
$row = 0;
foreach ($this->parent->objectTypes as $type) {
if (!$this->types[$type]['show']) {
if (!$this->types['filter_type_'.$type]['show']) {
continue;
}
$infos = $this->types[$type]['infos'];
$infos = $this->types['filter_type_'.$type]['infos'];
if ($this->scope == 'one') {
$searchBase = (empty($infos['ou']) ? $base : $infos['ou'].$base);
} else {
......
  • SonarQube analysis reported 2 issues

    • 1 major
    • 🔽 1 minor

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. Rename "$tabs" which has the same name as the field declared at line 26. 📘
    2. 🔽 Remove this empty statement. 📘
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment