[geeklog-cvs] geeklog: Config Class did not take multiple subgroups into consi...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Apr 5 11:17:53 EDT 2011
changeset 8211:812ffdac34be
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/812ffdac34be
user: Tom <websitemaster at cogeco.net>
date: Tue Apr 05 11:13:33 2011 -0400
description:
Config Class did not take multiple subgroups into consideration when a plugin only supports the orginal configuration interface
diffstat:
system/classes/config.class.php | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 9a29aa3e70b7 -r 812ffdac34be system/classes/config.class.php
--- a/system/classes/config.class.php Tue Apr 05 11:06:12 2011 -0400
+++ b/system/classes/config.class.php Tue Apr 05 11:13:33 2011 -0400
@@ -200,11 +200,13 @@
$result = DB_query($sql);
$tabs = array();
$curr_group_name = '';
+ $curr_subgroup = '';
while ($row = DB_fetchArray($result)) {
// For backwards compatibility, add in a tab for plugins that support the old config
- if ($row['type'] != 'tab' && $row['tab'] == '' && $row['group_name'] != $curr_group_name) {
+ if ($row['type'] != 'tab' && $row['tab'] == '' && ($row['group_name'] != $curr_group_name || $row['subgroup'] != $curr_subgroup)) {
$curr_group_name = $row['group_name'];
- $tab_name = 'tab_default';
+ $curr_subgroup = $row['subgroup'];
+ $tab_name = 'tab_default_' . $curr_subgroup;
$tab_id = 0;
$this->conf_type['tab'][$row[2]][$tab_name] = "config.{$row[2]}.{$tab_name}";
$this->conf_type['tree'][$row[2]][$row[4]][$tab_name] = "config.{$row[2]}.{$tab_name}";
@@ -687,6 +689,7 @@
. "type = 'subgroup' AND group_name = '$group' "
. "ORDER BY subgroup";
$retval = array();
+
$res = DB_query($q_string);
while ($row = DB_fetchArray($res)) {
// check if current user has access to current subgroup
More information about the geeklog-cvs
mailing list