aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_module.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2005-10-19 18:00:10 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2005-10-19 18:00:10 +0000
commitb873b37607762868580bdd21b9c90f05db168921 (patch)
treeb759644207a9579a9969a36812d6e8417df45485 /phpBB/includes/functions_module.php
parent719763dec21c431b41adb8855f6fc4cd007b418b (diff)
downloadforums-b873b37607762868580bdd21b9c90f05db168921.tar
forums-b873b37607762868580bdd21b9c90f05db168921.tar.gz
forums-b873b37607762868580bdd21b9c90f05db168921.tar.bz2
forums-b873b37607762868580bdd21b9c90f05db168921.tar.xz
forums-b873b37607762868580bdd21b9c90f05db168921.zip
- updated topic tracking code
- additional changes (mostly bugfixes) - bart, if you update your user table with the user_lastmark field, set it to the user_lastvisit value ;) - and last but not least, introducing some bugs in ucp main front (regarding topic tracking) git-svn-id: file:///svn/phpbb/trunk@5272 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_module.php')
-rw-r--r--phpBB/includes/functions_module.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index f40feb9415..e88a506121 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -105,7 +105,11 @@ class p_master
foreach ($this->module_cache['modules'] as $row)
{
- // Authorisation is required ... not authed, skip
+ /**
+ * Authorisation is required ... not authed, skip
+ * @todo implement $this->is_module_id
+ * @todo put in seperate method for authentication
+ */
if ($row['module_auth'])
{
$is_auth = false;
@@ -141,7 +145,7 @@ class p_master
$right = $row['right_id'];
- $module_data = array(
+ $this->module_ary[$i] = array(
'depth' => $depth,
'id' => (int) $row['module_id'],
@@ -151,15 +155,13 @@ class p_master
'name' => (string) $row['module_name'],
'mode' => (string) $row['module_mode'],
- 'lang' => (function_exists($row['module_name'])) ? $row['module_name']($row['module_mode'], $row['module_langname']) : ((!empty($user->lang[$row['module_langname']])) ? $user->lang[$row['module_langname']] : ucfirst(str_replace('_', ' ', strtolower($row['module_langname'])))),
+ 'lang' => (function_exists($row['module_name'])) ? $row['module_name']($row['module_mode'], $row['module_langname']) : ((!empty($user->lang[$row['module_langname']])) ? $user->lang[$row['module_langname']] : $row['module_langname']),
'langname' => $row['module_langname'],
'left' => $row['left_id'],
'right' => $row['right_id'],
);
- $this->module_ary[$i] = $module_data;
-
$i++;
}
@@ -274,9 +276,7 @@ class p_master
function assign_tpl_vars($module_url)
{
- global $template, $db;
-
- $parents = $this->module_cache['parents'];
+ global $template;
$current_padding = $current_depth = 0;
$linear_offset = 'l_block1';
@@ -305,13 +305,13 @@ class p_master
}
// Only output a categories items if it's currently selected
- if (!$depth || ($depth && (in_array($itep_ary['parent'], array_values($parents)) || $itep_ary['parent'] == $this->p_parent)))
+ if (!$depth || ($depth && (in_array($itep_ary['parent'], array_values($this->module_cache['parents'])) || $itep_ary['parent'] == $this->p_parent)))
{
$use_tabular_offset = (!$depth) ? 't_block1' : $tabular_offset;
$tpl_ary = array(
'L_TITLE' => $itep_ary['lang'],
- 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($parents)) || $itep_ary['id'] == $this->p_id) ? true : false,
+ 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->module_cache['parents'])) || $itep_ary['id'] == $this->p_id) ? true : false,
'U_TITLE' => $module_url . '&amp;i=' . (($itep_ary['cat']) ? $itep_ary['id'] : $itep_ary['name'] . '&amp;mode=' . $itep_ary['mode'])
);
@@ -320,7 +320,7 @@ class p_master
$tpl_ary = array(
'L_TITLE' => $itep_ary['lang'],
- 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($parents)) || $itep_ary['id'] == $this->p_id) ? true : false,
+ 'S_SELECTED' => (in_array($itep_ary['id'], array_keys($this->module_cache['parents'])) || $itep_ary['id'] == $this->p_id) ? true : false,
'U_TITLE' => $module_url . '&amp;i=' . (($itep_ary['cat']) ? $itep_ary['id'] : $itep_ary['name'] . '&amp;mode=' . $itep_ary['mode'])
);