diff options
author | Simon Rettberg | 2022-05-02 18:49:09 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-05-02 18:49:09 +0200 |
commit | 5eb8df7432a708284862e4b126e418265d36b4ab (patch) | |
tree | d8812cc2bd6245e0b02ca6866a4c14e977e1bb62 /modules-available/statistics | |
parent | [rebootcontrol] Show time of execution for WOL/reboot/shutdown (diff) | |
download | slx-admin-5eb8df7432a708284862e4b126e418265d36b4ab.tar.gz slx-admin-5eb8df7432a708284862e4b126e418265d36b4ab.tar.xz slx-admin-5eb8df7432a708284862e4b126e418265d36b4ab.zip |
[inc/Util] Add types, move error printing functions to their own class
Diffstat (limited to 'modules-available/statistics')
-rw-r--r-- | modules-available/statistics/inc/statistics.inc.php | 2 | ||||
-rw-r--r-- | modules-available/statistics/inc/statisticsfilter.inc.php | 4 | ||||
-rw-r--r-- | modules-available/statistics/pages/projectors.inc.php | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/modules-available/statistics/inc/statistics.inc.php b/modules-available/statistics/inc/statistics.inc.php index e3eaccc0..d27c1a6a 100644 --- a/modules-available/statistics/inc/statistics.inc.php +++ b/modules-available/statistics/inc/statistics.inc.php @@ -19,7 +19,7 @@ class Statistics } elseif ($returnData === Machine::RAW_DATA) { self::$machineFields['data'] = true; } else { - Util::traceError('Invalid $returnData option passed'); + ErrorHandler::traceError('Invalid $returnData option passed'); } return implode(',', array_keys(self::$machineFields)); } diff --git a/modules-available/statistics/inc/statisticsfilter.inc.php b/modules-available/statistics/inc/statisticsfilter.inc.php index f33c423f..a53ef4d1 100644 --- a/modules-available/statistics/inc/statisticsfilter.inc.php +++ b/modules-available/statistics/inc/statisticsfilter.inc.php @@ -107,7 +107,7 @@ abstract class StatisticsFilter if (empty($this->ops)) return; if (!in_array($operator, $this->ops)) { - Util::traceError("Invalid op '$operator' for " . get_class($this) . '::' . $this->column); + ErrorHandler::traceError("Invalid op '$operator' for " . get_class($this) . '::' . $this->column); } } @@ -574,7 +574,7 @@ class LocationStatisticsFilter extends EnumStatisticsFilter $operator = str_replace('~', '=', $operator); if ($recursive && is_array($argument)) { - Util::traceError('Cannot use ~ operator for location with array'); + ErrorHandler::traceError('Cannot use ~ operator for location with array'); } if ($recursive) { $argument = array_keys(Location::getRecursiveFlat($argument)); diff --git a/modules-available/statistics/pages/projectors.inc.php b/modules-available/statistics/pages/projectors.inc.php index 91abfe9c..01be2971 100644 --- a/modules-available/statistics/pages/projectors.inc.php +++ b/modules-available/statistics/pages/projectors.inc.php @@ -16,7 +16,7 @@ class SubPage User::assertPermission('hardware.projectors.edit'); $hwid = Request::post('hwid', false, 'int'); if ($hwid === false) { - Util::traceError('Param hwid missing'); + ErrorHandler::traceError('Param hwid missing'); } if ($action === 'addprojector') { Database::exec('INSERT IGNORE INTO statistic_hw_prop (hwid, prop, value)' |