summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/baseconfig/getconfig.inc.php
blob: ea351d15561fcc9b2b09ac93a882dace21dcaaeb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

// Location handling: figure out location
if (Request::any('force', 0, 'int') === 1 && Request::any('module', false, 'string') === 'statistics') {
	// Force location for testing, but require logged in admin
	if (User::load()) {
		$uuid = Request::any('value', '', 'string');
	}
}

// Query machine specific settings
$res = Database::simpleQuery("SELECT setting, value FROM setting_machine WHERE machineuuid  = :uuid", ['uuid' => $uuid]);
while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
	ConfigHolder::add($row['setting'], $row['value'], 500);
}