diff options
author | Simon Rettberg | 2019-10-31 15:15:03 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-10-31 15:15:03 +0100 |
commit | e18b0b0c764652d6f77465082eb474330f43915b (patch) | |
tree | 7f3a3e588cc6a5f6a9d4c1c02a615d1ab3cb1c98 /modules-available/statistics/page.inc.php | |
parent | [statistics] Don't try to show room plan for non-leaf rooms (diff) | |
download | slx-admin-e18b0b0c764652d6f77465082eb474330f43915b.tar.gz slx-admin-e18b0b0c764652d6f77465082eb474330f43915b.tar.xz slx-admin-e18b0b0c764652d6f77465082eb474330f43915b.zip |
[statistics/baseconfig] Allow per-machine configvar overrides
Diffstat (limited to 'modules-available/statistics/page.inc.php')
-rw-r--r-- | modules-available/statistics/page.inc.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php index c69198e8..441f0c25 100644 --- a/modules-available/statistics/page.inc.php +++ b/modules-available/statistics/page.inc.php @@ -906,6 +906,13 @@ class Page_Statistics extends Page } $client['rebootcontrol'] = $client['canReboot'] || $client['canShutdown']; } + // Baseconfig + if (Module::get('baseconfig') !== false + && User::hasPermission('.baseconfig.view', (int)$client['locationid'])) { + $cvs = Database::queryFirst('SELECT Count(*) AS cnt FROM setting_machine WHERE machineuuid = :uuid', ['uuid' => $uuid]); + $client['overriddenVars'] = is_array($cvs) ? $cvs['cnt'] : 0; + $client['hasBaseconfig'] = true; + } if (!isset($client['isclient'])) { $client['isclient'] = true; } |