mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
menu: change as discussed in 7749c098381
PR: https://github.com/opnsense/core/issues/4016
This commit is contained in:
parent
2c3da19953
commit
e9eb81a87f
@ -267,11 +267,19 @@ class MenuSystem
|
||||
}
|
||||
|
||||
foreach ($ifgroups as $key => $groupings) {
|
||||
$first = true;
|
||||
foreach ($groupings as $grouping) {
|
||||
$this->appendItem('Interfaces.' . $grouping, $key, array(
|
||||
'url' => '/interfaces.php?group=' . $grouping . '&if=' . $key,
|
||||
'url' => '/interfaces.php?if=' . $key . '&group=' . $grouping,
|
||||
'visiblename' => '[' . $iftargets['if'][$key] . ']',
|
||||
));
|
||||
if ($first) {
|
||||
$this->appendItem('Interfaces.' . $grouping . '.' . $key, 'Origin', array(
|
||||
'url' => '/interfaces.php?if=' . $key,
|
||||
'visibility' => 'hidden',
|
||||
));
|
||||
$first = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -612,7 +612,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
}
|
||||
@unlink('/tmp/.interfaces.apply');
|
||||
if (!empty($ifgroup)) {
|
||||
header(url_safe('Location: /interfaces.php?group=%s&if=%s', array($ifgroup, $if)));
|
||||
header(url_safe('Location: /interfaces.php?if=%s&group=%s', array($if, $ifgroup)));
|
||||
} else {
|
||||
header(url_safe('Location: /interfaces.php?if=%s', array($if)));
|
||||
}
|
||||
@ -647,7 +647,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
file_put_contents('/tmp/.interfaces.apply', serialize($toapplylist));
|
||||
}
|
||||
if (!empty($ifgroup)) {
|
||||
header(url_safe('Location: /interfaces.php?group=%s&if=%s', array($ifgroup, $if)));
|
||||
header(url_safe('Location: /interfaces.php?if=%s&group=%s', array($if, $ifgroup)));
|
||||
} else {
|
||||
header(url_safe('Location: /interfaces.php?if=%s', array($if)));
|
||||
}
|
||||
@ -1410,7 +1410,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
mark_subsystem_dirty('interfaces');
|
||||
|
||||
if (!empty($ifgroup)) {
|
||||
header(url_safe('Location: /interfaces.php?group=%s&if=%s', array($ifgroup, $if)));
|
||||
header(url_safe('Location: /interfaces.php?if=%s&group=%s', array($if, $ifgroup)));
|
||||
} else {
|
||||
header(url_safe('Location: /interfaces.php?if=%s', array($if)));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user