From e18b0b0c764652d6f77465082eb474330f43915b Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 31 Oct 2019 15:15:03 +0100 Subject: [statistics/baseconfig] Allow per-machine configvar overrides --- .../statistics/inc/statisticshooks.inc.php | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 modules-available/statistics/inc/statisticshooks.inc.php (limited to 'modules-available/statistics/inc') diff --git a/modules-available/statistics/inc/statisticshooks.inc.php b/modules-available/statistics/inc/statisticshooks.inc.php new file mode 100644 index 00000000..ead4917b --- /dev/null +++ b/modules-available/statistics/inc/statisticshooks.inc.php @@ -0,0 +1,37 @@ + $machineuuid]); + } + + public static function getBaseconfigName($machineuuid) + { + self::getRow($machineuuid); + if (self::$row === false) + return false; + return self::$row['hostname'] ? self::$row['hostname'] : self::$row['clientip']; + } + + public static function getBaseconfigParent($machineuuid) + { + return false; // TODO + } + + public static function baseconfigLocationResolver($machineuuid) + { + self::getRow($machineuuid); + if (self::$row === false) + return 0; + return (int)self::$row['locationid']; + } + +} \ No newline at end of file -- cgit v1.2.3-55-g7522