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

feat(management) Ease the use of non-standard base selector

Used by FAI management

issue #5980
parent a8e8c134
......@@ -59,7 +59,7 @@ class managementListing
*/
function __construct (management $parent, bool $baseMode = TRUE, bool $multiSelect = TRUE)
{
global $config, $ui;
global $config;
$this->parent = $parent;
$this->baseMode = $baseMode;
......@@ -68,6 +68,18 @@ class managementListing
// Initialize pid
$this->pid = preg_replace('/[^0-9]/', '', microtime(TRUE));
$this->setUpBaseSelector();
// Move footer information
$this->showFooter = ($config->get_cfg_value('listSummary') == 'TRUE');
$this->reloadColumns();
}
function setUpBaseSelector ()
{
global $config, $ui;
// Set base for filter
if ($this->baseMode) {
$this->base = $ui->getCurrentBase();
......@@ -78,11 +90,6 @@ class managementListing
} else {
$this->base = $config->current['BASE'];
}
// Move footer information
$this->showFooter = ($config->get_cfg_value('listSummary') == 'TRUE');
$this->reloadColumns();
}
function getBaseMode (): bool
......
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