diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-02 16:35:48 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-02 16:35:48 +0000 |
| commit | 46c9da77a47abba5f0bb314d9a4cd68d1abb32c9 (patch) | |
| tree | 33183de1bf76a073820ffeafc5d9931381ba125d /phpBB/viewonline.php | |
| parent | 1c32dcaeb10292de8fa8de25c8775fbdab25e2c7 (diff) | |
| download | forums-46c9da77a47abba5f0bb314d9a4cd68d1abb32c9.tar forums-46c9da77a47abba5f0bb314d9a4cd68d1abb32c9.tar.gz forums-46c9da77a47abba5f0bb314d9a4cd68d1abb32c9.tar.bz2 forums-46c9da77a47abba5f0bb314d9a4cd68d1abb32c9.tar.xz forums-46c9da77a47abba5f0bb314d9a4cd68d1abb32c9.zip | |
- do not allow setting the parent to currently assigned childs [Bug #6708]
- Allow the display_on_index setting to be specified for link forums [Bug #6660]
- Rank code in functions_display.php [Bug #6656]
- Added some new locations for the viewonline page [Related to bug #6484]
- Do not display attached images inline if user disabled image display in posts; the same with flash files [Bug #6226]
git-svn-id: file:///svn/phpbb/trunk@6829 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewonline.php')
| -rw-r--r-- | phpBB/viewonline.php | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index 85f4749f53..588d753b14 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -83,7 +83,7 @@ $result = $db->sql_query($sql, 600); while ($row = $db->sql_fetchrow($result)) { - $forum_data[$row['forum_id']] = $row['forum_name']; + $forum_data[$row['forum_id']] = $row; } $db->sql_freeresult($result); @@ -209,6 +209,14 @@ while ($row = $db->sql_fetchrow($result)) if ($forum_id && $auth->acl_get('f_list', $forum_id)) { $location = ''; + $location_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id); + + if ($forum_data[$forum_id]['forum_type'] == FORUM_LINK) + { + $location = sprintf($user->lang['READING_LINK'], $forum_data[$forum_id]['forum_name']); + break; + } + switch ($on_page[1]) { case 'posting': @@ -234,8 +242,6 @@ while ($row = $db->sql_fetchrow($result)) $location = sprintf($user->lang['READING_FORUM'], $forum_data[$forum_id]); break; } - - $location_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id); } else { @@ -265,16 +271,30 @@ while ($row = $db->sql_fetchrow($result)) break; case 'mcp': + $location = $user->lang['VIEWING_MCP']; + $location_url = append_sid("{$phpbb_root_path}index.$phpEx"); + break; + case 'ucp': $location = $user->lang['VIEWING_UCP']; - /** - * @todo getting module/mode for ucp and mcp - */ -/* if (strpos($row['session_page'], 'i=pm&mode=compose') !== false) + // Grab some common modules + $url_params = array( + 'mode=register' => 'VIEWING_REGISTER', + 'i=pm&mode=compose' => 'POSTING_PRIVATE_MESSAGE', + 'i=pm&' => 'VIEWING_PRIVATE_MESSAGES', + 'i=profile&' => 'CHANGING_PROFILE', + 'i=prefs&' => 'CHANGING_PREFERENCES', + ); + + foreach ($url_params as $param => $lang) { - $location = 'Composing PM'; - }*/ + if (strpos($row['session_page'], $param) !== false) + { + $location = $user->lang[$lang]; + break; + } + } $location_url = append_sid("{$phpbb_root_path}index.$phpEx"); break; |
