diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-06-09 11:11:20 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-06-09 11:11:20 +0000 |
commit | 455536773fd34f72e371386b5b0d9a517e0fc1e7 (patch) | |
tree | b92b8cb07045e0aac93749f4e419d9d3a1f1654d /phpBB/includes/functions_display.php | |
parent | cbf7b00cb801bc7cbed5735452fc680c85cd9669 (diff) | |
download | forums-455536773fd34f72e371386b5b0d9a517e0fc1e7.tar forums-455536773fd34f72e371386b5b0d9a517e0fc1e7.tar.gz forums-455536773fd34f72e371386b5b0d9a517e0fc1e7.tar.bz2 forums-455536773fd34f72e371386b5b0d9a517e0fc1e7.tar.xz forums-455536773fd34f72e371386b5b0d9a517e0fc1e7.zip |
ok, mess around with the templates + fixing some bugs + adjusting headers for those files already modified to circumvent conflicts for those having their editor set to remove trailing spaces (not recommended!)
git-svn-id: file:///svn/phpbb/trunk@7736 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r-- | phpBB/includes/functions_display.php | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index f56de24a24..b87cf31d04 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1,10 +1,10 @@ <?php -/** +/** * * @package phpBB3 * @version $Id$ -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ @@ -476,24 +476,27 @@ function generate_forum_nav(&$forum_data) $forum_parents = get_forum_parents($forum_data); // Build navigation links - foreach ($forum_parents as $parent_forum_id => $parent_data) + if (!empty($forum_parents)) { - list($parent_name, $parent_type) = array_values($parent_data); - - // Skip this parent if the user does not have the permission to view it - if (!$auth->acl_get('f_list', $parent_forum_id)) + foreach ($forum_parents as $parent_forum_id => $parent_data) { - continue; - } + list($parent_name, $parent_type) = array_values($parent_data); - $template->assign_block_vars('navlinks', array( - 'S_IS_CAT' => ($parent_type == FORUM_CAT) ? true : false, - 'S_IS_LINK' => ($parent_type == FORUM_LINK) ? true : false, - 'S_IS_POST' => ($parent_type == FORUM_POST) ? true : false, - 'FORUM_NAME' => $parent_name, - 'FORUM_ID' => $parent_forum_id, - 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $parent_forum_id)) - ); + // Skip this parent if the user does not have the permission to view it + if (!$auth->acl_get('f_list', $parent_forum_id)) + { + continue; + } + + $template->assign_block_vars('navlinks', array( + 'S_IS_CAT' => ($parent_type == FORUM_CAT) ? true : false, + 'S_IS_LINK' => ($parent_type == FORUM_LINK) ? true : false, + 'S_IS_POST' => ($parent_type == FORUM_POST) ? true : false, + 'FORUM_NAME' => $parent_name, + 'FORUM_ID' => $parent_forum_id, + 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $parent_forum_id)) + ); + } } $template->assign_block_vars('navlinks', array( @@ -1057,6 +1060,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $for { $s_watching['link'] = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&" . (($is_watching) ? 'unwatch' : 'watch') . "=$mode&start=$start"); $s_watching['title'] = $user->lang[(($is_watching) ? 'STOP' : 'START') . '_WATCHING_' . strtoupper($mode)]; + $s_watching['is_watching'] = $is_watching; } return; |