From 46af817cb058e2eecd89081af4a40075426a32ef Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 9 Jul 2006 16:23:57 +0000 Subject: - tackle some usability issues - fix bug #3147 - added the lock-images made by SHS` - fixed MSSQL errors (adding the correct ESCAPE sequence) git-svn-id: file:///svn/phpbb/trunk@6161 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/mcp/mcp_forum.php | 55 +++++----------------------------------- 1 file changed, 6 insertions(+), 49 deletions(-) (limited to 'phpBB/includes/mcp/mcp_forum.php') diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index ceb2dcbff7..c68f36aefc 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -16,6 +16,8 @@ function mcp_forum_view($id, $mode, $action, $forum_info) global $template, $db, $user, $auth, $cache; global $phpEx, $phpbb_root_path, $config; + include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx); + $url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url()); if ($action == 'merge_select') @@ -107,56 +109,11 @@ function mcp_forum_view($id, $mode, $action, $forum_info) { $topic_title = ''; - if ($row['topic_status'] == ITEM_LOCKED) - { - $folder_img = 'folder_locked'; - $folder_alt = 'VIEW_TOPIC_LOCKED'; - } - else - { - if ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) - { - $folder_img = 'folder_announce'; - $folder_alt = 'VIEW_TOPIC_ANNOUNCEMENT'; - } - else if ($row['topic_type'] == POST_STICKY) - { - $folder_img = 'folder_sticky'; - $folder_alt = 'VIEW_TOPIC_STICKY'; - } - else if ($row['topic_status'] == ITEM_MOVED) - { - $folder_img = 'folder_moved'; - $folder_alt = 'VIEW_TOPIC_MOVED'; - } - else - { - $folder_img = 'folder'; - $folder_alt = 'NO_NEW_POSTS'; - } - } - - if ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) - { - $topic_type = $user->lang['VIEW_TOPIC_ANNOUNCEMENT'] . ' '; - } - else if ($row['topic_type'] == POST_STICKY) - { - $topic_type = $user->lang['VIEW_TOPIC_STICKY'] . ' '; - } - else if ($row['topic_status'] == ITEM_MOVED) - { - $topic_type = $user->lang['VIEW_TOPIC_MOVED'] . ' '; - } - else - { - $topic_type = ''; - } + $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; - if (intval($row['poll_start'])) - { - $topic_type .= $user->lang['VIEW_TOPIC_POLL'] . ' '; - } + // Get folder img, topic status/type related informations + $folder_img = $folder_alt = $topic_type = ''; + topic_status($row, $replies, false, $folder_img, $folder_alt, $topic_type); $topic_title = censor_text($row['topic_title']); -- cgit v1.2.1