summaryrefslogtreecommitdiffstats
path: root/modules/baseconfig/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2016-04-29 17:43:58 +0200
committerSimon Rettberg2016-04-29 17:43:58 +0200
commitf8189f4f0bdc79a83e084c56e93e8a2ca073e4c0 (patch)
tree13c41f05ef5920eb13c76be05f749de9a9a809fa /modules/baseconfig/page.inc.php
parentImplemented new menu, added logic for defining dependencies, move translation... (diff)
downloadslx-admin-f8189f4f0bdc79a83e084c56e93e8a2ca073e4c0.tar.gz
slx-admin-f8189f4f0bdc79a83e084c56e93e8a2ca073e4c0.tar.xz
slx-admin-f8189f4f0bdc79a83e084c56e93e8a2ca073e4c0.zip
More Progress; Merged changes from ufpr up to 775cdbd29f5d0f70946d1d5ff09c091e6189c9e9
Diffstat (limited to 'modules/baseconfig/page.inc.php')
-rw-r--r--modules/baseconfig/page.inc.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/baseconfig/page.inc.php b/modules/baseconfig/page.inc.php
index 3d187d30..8f914376 100644
--- a/modules/baseconfig/page.inc.php
+++ b/modules/baseconfig/page.inc.php
@@ -8,7 +8,7 @@ class Page_BaseConfig extends Page
{
User::load();
- // Determine if we're setting global, distro or pool
+ // Determine if we're setting global, distro or location
if (isset($_REQUEST['distroid'])) {
// TODO: Everything
$this->qry_extra[] = array(
@@ -16,11 +16,11 @@ class Page_BaseConfig extends Page
'value' => (int)$_REQUEST['distroid'],
'table' => 'setting_distro',
);
- if (isset($_REQUEST['poolid'])) {
+ if (isset($_REQUEST['locationid'])) {
$this->qry_extra[] = array(
- 'name' => 'poolid',
- 'value' => (int)$_REQUEST['poolid'],
- 'table' => 'setting_pool',
+ 'name' => 'locationid',
+ 'value' => (int)$_REQUEST['locationid'],
+ 'table' => 'setting_location',
);
}
}
@@ -82,12 +82,14 @@ class Page_BaseConfig extends Page
LEFT JOIN setting_global AS tbl USING (setting)
ORDER BY cat_setting.sortval ASC, setting.setting ASC');
while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
- $row['description'] = Util::markup(Dictionary::translate('settings/setting', $row['setting']));
+ $row['description'] = Util::markup(Page::translate($row['setting'], 'setting'));
if (is_null($row['displayvalue'])) $row['displayvalue'] = $row['defaultvalue'];
$row['item'] = $this->makeInput($row['validator'], $row['setting'], $row['displayvalue']);
$settings[$row['catid']]['settings'][] = $row;
- $settings[$row['catid']]['category_name'] = Dictionary::translate('settings/cat_setting', 'cat_' . $row['catid']);
- $settings[$row['catid']]['category_id'] = $row['catid'];
+ if (!isset($settings[$row['catid']]['category_id'])) {
+ $settings[$row['catid']]['category_name'] = Page::translate('cat_' . $row['catid'], 'cat_setting');
+ $settings[$row['catid']]['category_id'] = $row['catid'];
+ }
}
Render::addTemplate('_page', array(
'categories' => array_values($settings)