aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-03-25 00:05:28 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-03-25 00:05:28 +0000
commit18294c2230978831241ad6993c5941f13a964af8 (patch)
tree4909a9b958cdfd9ba2e8307b1d59b8be9797a5ac /phpBB
parent9482bb75ca63c5be50f92a873d9a1818e9cef811 (diff)
downloadforums-18294c2230978831241ad6993c5941f13a964af8.tar
forums-18294c2230978831241ad6993c5941f13a964af8.tar.gz
forums-18294c2230978831241ad6993c5941f13a964af8.tar.bz2
forums-18294c2230978831241ad6993c5941f13a964af8.tar.xz
forums-18294c2230978831241ad6993c5941f13a964af8.zip
Output total posts/topics
git-svn-id: file:///svn/phpbb/trunk@3712 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/language/en/lang_main.php10
-rw-r--r--phpBB/memberlist.php40
-rw-r--r--phpBB/templates/subSilver/memberlist_body.html2
-rw-r--r--phpBB/templates/subSilver/viewforum_body.html6
-rw-r--r--phpBB/templates/subSilver/viewtopic_body.html6
-rw-r--r--phpBB/viewforum.php8
-rw-r--r--phpBB/viewtopic.php46
7 files changed, 60 insertions, 58 deletions
diff --git a/phpBB/language/en/lang_main.php b/phpBB/language/en/lang_main.php
index 45558ec92f..e54ddef0fb 100644
--- a/phpBB/language/en/lang_main.php
+++ b/phpBB/language/en/lang_main.php
@@ -201,9 +201,8 @@ $lang = array(
'POST_TOPIC_LOCKED' => 'Topic is locked',
- 'FOUND_USERS_TOTAL' => '%s Users',
- 'FOUND_TOPIC_TOTAL' => '%s Topics',
- 'FOUND_POSTS_TOTAL' => '%s Posts',
+ 'LIST_USER' => '1 User',
+ 'LIST_USERS' => '%d Users',
'LOGIN' => 'Login',
@@ -270,6 +269,9 @@ $lang = array(
'NOT_WATCHING_FORUM' => 'You are no longer watching this forum',
'ARE_WATCHING_FORUM' => 'You are now watching this forum',
+ 'VIEW_FORUM_TOPIC' => '1 Topic',
+ 'VIEW_FORUM_TOPICS' => '%d Topics',
+
'VIEW_TOPIC' => 'View topic',
'LOGIN_VIEWTOPIC' => 'The board administrator requires you to be registered and logged in to view this topic.',
@@ -327,6 +329,8 @@ $lang = array(
'TOTAL_VOTES' => 'Total Votes',
'VIEW_RESULTS' => 'View Results',
+ 'VIEW_TOPIC_POST' => '1 Post',
+ 'VIEW_TOPIC_POSTS' => '%d Posts',
'MESSAGE_BODY' => 'Message body',
'MESSAGE_BODY_EXPLAIN' => 'Enter your message here, it may contain no more than <b>%d</b> characters.',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 3951a378ea..3de4c9935f 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -158,9 +158,8 @@ switch ($mode)
AND f.forum_id = p.forum_id
$post_count_sql
GROUP BY f.forum_id, f.forum_name
- ORDER BY num_posts DESC
- LIMIT 1";
- $result = $db->sql_query($sql);
+ ORDER BY num_posts DESC";
+ $result = $db->sql_query_limit($sql, 1);
// AND f.forum_id NOT IN ()
$active_f_row = $db->sql_fetchrow($result);
@@ -173,9 +172,8 @@ switch ($mode)
AND f.forum_id = t.forum_id
$post_count_sql
GROUP BY t.topic_id, t.topic_title
- ORDER BY num_posts DESC
- LIMIT 1";
- $result = $db->sql_query($sql);
+ ORDER BY num_posts DESC";
+ $result = $db->sql_query_limit($sql, 1);
$active_t_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -441,22 +439,25 @@ switch ($mode)
}
}
}
- else
- {
- $where_sql = ' AND user_active = 1';
- }
// Sorting and order
$order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
// Count the users ...
- $sql = "SELECT COUNT(user_id) AS total_users
- FROM " . USERS_TABLE . "
- WHERE user_id <> " . ANONYMOUS . "
- $where_sql";
- $result = $db->sql_query($sql);
+ if ($where_sql != '')
+ {
+ $sql = "SELECT COUNT(user_id) AS total_users
+ FROM " . USERS_TABLE . "
+ WHERE user_id <> " . ANONYMOUS . "
+ $where_sql";
+ $result = $db->sql_query($sql);
- $total_users = ($row = $db->sql_fetchrow($result)) ? $row['total_users'] : 0;
+ $total_users = ($row = $db->sql_fetchrow($result)) ? $row['total_users'] : 0;
+ }
+ else
+ {
+ $total_users = $config['num_users'];
+ }
// Pagination string
$pagination_url = "memberlist.$phpEx$SID&amp;mode=$mode";
@@ -518,9 +519,8 @@ switch ($mode)
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
$where_sql
- ORDER BY $order_by
- LIMIT $start, " . $config['topics_per_page'];
- $result = $db->sql_query($sql);
+ ORDER BY $order_by";
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
if ($row = $db->sql_fetchrow($result))
{
@@ -546,7 +546,7 @@ switch ($mode)
$template->assign_vars(array(
'PAGINATION' => generate_pagination($pagination_url, $total_users, $config['topics_per_page'], $start),
'PAGE_NUMBER' => on_page($total_users, $config['topics_per_page'], $start),
- 'TOTAL_USERS' => sprintf($user->lang['FOUND_USERS_TOTAL'], $total_users),
+ 'TOTAL_USERS' => ($total_users == 1) ? $user->lang['LIST_USER'] : sprintf($user->lang['LIST_USERS'], $total_users),
'U_FIND_MEMBER' => "memberlist.$phpEx$SID&amp;mode=searchuser",
'U_SORT_USERNAME' => "memberlist.$phpEx$SID&amp;sk=a&amp;sd=" . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
diff --git a/phpBB/templates/subSilver/memberlist_body.html b/phpBB/templates/subSilver/memberlist_body.html
index 34dfbf5a9d..1c1af89f59 100644
--- a/phpBB/templates/subSilver/memberlist_body.html
+++ b/phpBB/templates/subSilver/memberlist_body.html
@@ -139,7 +139,7 @@ function marklist(status)
<table width="100%" cellspacing="2" cellpadding="0" border="0">
<tr>
- <td class="nav" valign="top">{PAGE_NUMBER} :: {TOTAL_USERS}</td>
+ <td valign="top"><span class="nav">{PAGE_NUMBER}</span> <span class="gensmall">[ <b>{TOTAL_USERS}</b> ]</span></td>
<td align="right"><span class="gensmall"><!-- IF S_SEARCH_USER --><b><a href="javascript:marklist(true);">{L_MARK_ALL}</a> :: <a href="javascript:marklist(false);">{L_UNMARK_ALL}</a></b><br /><br /><!-- ENDIF -->{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
</tr>
</table></form>
diff --git a/phpBB/templates/subSilver/viewforum_body.html b/phpBB/templates/subSilver/viewforum_body.html
index 314b827f06..4bf9423bef 100644
--- a/phpBB/templates/subSilver/viewforum_body.html
+++ b/phpBB/templates/subSilver/viewforum_body.html
@@ -91,10 +91,8 @@
<td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
</tr>
<tr>
- <td class="nav" colspan="3" align="left">{PAGE_NUMBER}</td>
- </tr>
- <tr>
- <td class="gensmall" colspan="2">{S_WATCH_FORUM}</td>
+ <td colspan="2" align="left"><span class="nav">{PAGE_NUMBER}</span> <span class="gensmall">[ <b>{TOTAL_TOPICS}</b> ]</span></td>
+ <td class="nav" align="right" nowrap="nowrap">{S_WATCH_FORUM}</td>
</tr>
</table>
diff --git a/phpBB/templates/subSilver/viewtopic_body.html b/phpBB/templates/subSilver/viewtopic_body.html
index e18c1bcb21..758d03d3ea 100644
--- a/phpBB/templates/subSilver/viewtopic_body.html
+++ b/phpBB/templates/subSilver/viewtopic_body.html
@@ -169,10 +169,8 @@
<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
</tr>
<tr>
- <td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
- </tr>
- <tr>
- <td class="gensmall" colspan="2">{S_WATCH_TOPIC}</td>
+ <td colspan="2" align="left"><span class="nav">{PAGE_NUMBER}</span> <span class="gensmall">[ <b>{TOTAL_POSTS}</b> ]</span></td>
+ <td class="nav" nowrap="nowrap">{S_WATCH_TOPIC}</td>
</tr>
</table>
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index cbe33c3ae2..95086e906e 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -192,7 +192,8 @@ if ($forum_data['forum_postable'])
$sql = "SELECT COUNT(topic_id) AS forum_topics
FROM " . TOPICS_TABLE . "
WHERE forum_id = $forum_id
- AND topic_last_post_time >= $min_topic_time";
+ AND topic_last_post_time >= $min_topic_time
+ AND topic_type <> " . POST_ANNOUNCE;
$result = $db->sql_query($sql);
$start = 0;
@@ -215,7 +216,8 @@ if ($forum_data['forum_postable'])
$template->assign_vars(array(
'PAGINATION' => generate_pagination("viewforum.$phpEx$SID&amp;f=$forum_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $topics_count, $config['topics_per_page'], $start),
'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
- 'MOD_CP' => ($auth->acl_gets('m_', 'a_', $forum_id)) ? sprintf($user->lang['MCP'], '<a href="mcp.' . $phpEx . '?sid=' . $user->session_id . '&amp;f=' . $forum_id . '">', '</a>') : '',
+ 'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count),
+ 'MOD_CP' => ($auth->acl_gets('m_', $forum_id)) ? sprintf($user->lang['MCP'], '<a href="mcp.' . $phpEx . '?sid=' . $user->session_id . '&amp;f=' . $forum_id . '">', '</a>') : '',
'MODERATORS' => (!empty($moderators[$forum_id])) ? implode(', ', $moderators[$forum_id]) : $user->lang['NONE'],
'POST_IMG' => (intval($forum_data['forum_status']) == ITEM_LOCKED) ? $user->img('post_locked', $post_alt) : $user->img('post_new', $post_alt),
@@ -288,7 +290,7 @@ if ($forum_data['forum_postable'])
WHERE t.forum_id = $forum_id
" . (($auth->acl_gets('m_approve', 'a_', $forum_id)) ? '' : 'AND t.topic_approved = 1') . "
AND t.topic_type <> " . POST_ANNOUNCE . "
- $limit_topics_time
+ $limit_topics_time
ORDER BY t.topic_type DESC, $sort_order_sql";
/* }
else
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index b27efd8e02..de952d0fe8 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -67,7 +67,7 @@ if (isset($_GET['view']) && empty($post_id))
WHERE s.session_id = '$user->session_id'
AND u.user_id = s.session_user_id
AND p.topic_id = $topic_id
- " . (($auth->acl_gets('m_approve', 'a_', $forum_id)) ? '' : 'AND p.post_approved = 1') . "
+ " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1') . "
AND p.post_time >= u.user_lastvisit
ORDER BY p.post_time ASC";
$result = $db->sql_query_limit($sql, 1);
@@ -122,7 +122,7 @@ if (!$post_id)
}
else
{
- if ($auth->acl_gets('m_approve', 'a_', $forum_id))
+ if ($auth->acl_get('m_approve', $forum_id))
{
$join_sql = (!$post_id) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id";
}
@@ -171,7 +171,7 @@ extract($topic_data);
// Start auth check
-if (!$auth->acl_gets('f_read', 'm_', 'a_', $forum_id))
+if (!$auth->acl_get('f_read', $forum_id))
{
if ($user->data['user_id'] != ANONYMOUS)
{
@@ -214,7 +214,7 @@ if ($sort_days)
FROM ' . POSTS_TABLE . "
WHERE topic_id = $topic_id
AND post_time >= $min_post_time
- " . (($auth->acl_gets('m_approve', 'a_', $forum_id)) ? '' : 'AND p.post_approved = 1');
+ " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1');
$result = $db->sql_query($sql);
$start = 0;
@@ -276,14 +276,14 @@ gen_forum_rules('topic', $forum_id);
// Quick mod tools
$topic_mod = '';
-$topic_mod .= ($auth->acl_gets('m_lock', 'a_', $forum_id)) ? ((intval($topic_status) == ITEM_UNLOCKED) ? '<option value="lock">' . $user->lang['LOCK_TOPIC'] . '</option>' : '<option value="unlock">' . $user->lang['UNLOCK_TOPIC'] . '</option>') : '';
-$topic_mod .= ($auth->acl_gets('m_delete', 'a_', $forum_id)) ? '<option value="delete">' . $user->lang['DELETE_TOPIC'] . '</option>' : '';
-$topic_mod .= ($auth->acl_gets('m_move', 'a_', $forum_id)) ? '<option value="move">' . $user->lang['MOVE_TOPIC'] . '</option>' : '';
-$topic_mod .= ($auth->acl_gets('m_split', 'a_', $forum_id)) ? '<option value="split">' . $user->lang['SPLIT_TOPIC'] . '</option>' : '';
-$topic_mod .= ($auth->acl_gets('m_merge', 'a_', $forum_id)) ? '<option value="merge">' . $user->lang['MERGE_TOPIC'] . '</option>' : '';
-$topic_mod .= (($topic_type != POST_ANNOUNCE) && $auth->acl_gets('m_', 'a_', $forum_id)) ? '<option value="set_announce">' . $user->lang['CHANGE_TOPIC_TYPE'] . $user->lang['POST_ANNOUNCEMENT'] . '</option>' : '';
-$topic_mod .= (($topic_type != POST_STICKY) && $auth->acl_gets('m_', 'a_', $forum_id)) ? '<option value="set_sticky">' . $user->lang['CHANGE_TOPIC_TYPE'] . $user->lang['POST_STICKY'] . '</option>' : '';
-$topic_mod .= (($topic_type != POST_NORMAL) && $auth->acl_gets('m_', 'a_', $forum_id)) ? '<option value="set_normal">' . $user->lang['CHANGE_TOPIC_TYPE'] . $user->lang['POST_NORMAL'] . '</option>' : '';
+$topic_mod .= ($auth->acl_get('m_lock', $forum_id)) ? ((intval($topic_status) == ITEM_UNLOCKED) ? '<option value="lock">' . $user->lang['LOCK_TOPIC'] . '</option>' : '<option value="unlock">' . $user->lang['UNLOCK_TOPIC'] . '</option>') : '';
+$topic_mod .= ($auth->acl_get('m_delete', $forum_id)) ? '<option value="delete">' . $user->lang['DELETE_TOPIC'] . '</option>' : '';
+$topic_mod .= ($auth->acl_get('m_move', $forum_id)) ? '<option value="move">' . $user->lang['MOVE_TOPIC'] . '</option>' : '';
+$topic_mod .= ($auth->acl_get('m_split', $forum_id)) ? '<option value="split">' . $user->lang['SPLIT_TOPIC'] . '</option>' : '';
+$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '<option value="merge">' . $user->lang['MERGE_TOPIC'] . '</option>' : '';
+$topic_mod .= (($topic_type != POST_ANNOUNCE) && $auth->acl_get('f_announce', $forum_id)) ? '<option value="set_announce">' . $user->lang['CHANGE_TOPIC_TYPE'] . $user->lang['POST_ANNOUNCEMENT'] . '</option>' : '';
+$topic_mod .= (($topic_type != POST_STICKY) && $auth->acl_get('f_sticky', 'a_', $forum_id)) ? '<option value="set_sticky">' . $user->lang['CHANGE_TOPIC_TYPE'] . $user->lang['POST_STICKY'] . '</option>' : '';
+$topic_mod .= (($topic_type != POST_NORMAL) && $auth->acl_get('m_', $forum_id)) ? '<option value="set_normal">' . $user->lang['CHANGE_TOPIC_TYPE'] . $user->lang['POST_NORMAL'] . '</option>' : '';
// If we've got a hightlight set pass it on to pagination.
@@ -337,7 +337,6 @@ get_moderators($forum_moderators, $forum_id);
// This is only used for print view so ...
$server_path = (($config['cookie_secure']) ? 'https://' : 'http://') . trim($config['server_name']) . (($config['server_port'] <> 80) ? ':' . trim($config['server_port']) . '/' : '/') . trim($config['script_path']) . '/';
-
// Send vars to template
$template->assign_vars(array(
'FORUM_ID' => $forum_id,
@@ -347,7 +346,8 @@ $template->assign_vars(array(
'TOPIC_TITLE' => $topic_title,
'PAGINATION' => (isset($_GET['view']) && $_GET['view'] == 'print') ? '' : $pagination,
'PAGE_NUMBER' => (isset($_GET['view']) && $_GET['view'] == 'print') ? '' : on_page($total_posts, $config['posts_per_page'], $start),
- 'MCP' => ($auth->acl_gets('m_', 'a_', $forum_id)) ? sprintf($user->lang['MCP'], "<a href=\"mcp.$phpEx?sid=" . $user->session_id . "&amp;t=$topic_id&amp;start=$start&amp;sort_days=$sort_days&amp;sort_key=$sort_key&amp;sort_dir=$sort_dir&amp;posts_per_page=" . $config['posts_per_page'] . '">', '</a>') : '',
+ 'TOTAL_POSTS' => ($total_posts == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total_posts),
+ 'MCP' => ($auth->acl_get('m_', $forum_id)) ? sprintf($user->lang['MCP'], "<a href=\"mcp.$phpEx?sid=" . $user->session_id . "&amp;t=$topic_id&amp;start=$start&amp;sort_days=$sort_days&amp;sort_key=$sort_key&amp;sort_dir=$sort_dir&amp;posts_per_page=" . $config['posts_per_page'] . '">', '</a>') : '',
'MODERATORS' => (sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : $user->lang['NONE'],
'POST_IMG' => $post_img,
@@ -365,7 +365,7 @@ $template->assign_vars(array(
'S_MOD_ACTION' => "mcp.$phpEx?sid=" . $user->session_id . "&amp;t=$topic_id&amp;quickmod=1",
'S_WATCH_TOPIC' => $s_watching_topic,
- 'S_SHOW_SEARCHBOX' => ($auth->acl_gets('f_search', 'm_', 'a_', $forum_id)) ? true : false,
+ 'S_SHOW_SEARCHBOX' => ($auth->acl_get('f_search', 'a_', $forum_id)) ? true : false,
'S_SEARCHBOX_ACTION' => "search.$phpEx$SID&amp;f=$forum_id",
'U_TOPIC' => $server_path . 'viewtopic.' . $phpEx . '?t=' . $topic_id,
@@ -405,7 +405,7 @@ if (!empty($poll_start))
$voted_id = ($row = $db->sql_fetchrow($result)) ? $row['poll_option_id'] : false;
$db->sql_freeresult($result);
- $display_results = ($voted_id || ($poll_length != 0 && $poll_start + $poll_length < time()) || $_GET['vote'] == 'viewresult' || !$auth->acl_gets('f_vote', 'm_', 'a_', $forum_id) || $topic_status == ITEM_LOCKED || $forum_status == ITEM_LOCKED) ? true : false;
+ $display_results = ($voted_id || ($poll_length != 0 && $poll_start + $poll_length < time()) || $_GET['vote'] == 'viewresult' || !$auth->acl_get('f_vote', 'a_', $forum_id) || $topic_status == ITEM_LOCKED || $forum_status == ITEM_LOCKED) ? true : false;
$poll_total = 0;
foreach ($poll_info as $poll_option)
@@ -458,7 +458,7 @@ $i = 0;
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_karma, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_avatar, u.user_avatar_type, p.*
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.topic_id = $topic_id
- " . (($auth->acl_gets('m_approve', 'a_', $forum_id)) ? '' : 'AND p.post_approved = 1') . "
+ " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1') . "
$limit_posts_time
AND u.user_id = p.poster_id
ORDER BY $sort_order";
@@ -669,7 +669,7 @@ if ($row = $db->sql_fetchrow($result))
$quote_img = '<a href="' . $temp_url . '">' . $user->img('icon_quote', $user->lang['REPLY_WITH_QUOTE']) . '</a>';
$quote = '<a href="' . $temp_url . '">' . $user->lang['REPLY_WITH_QUOTE'] . '</a>';
- if (($user->data['user_id'] == $poster_id && $auth->acl_gets('f_edit', $forum_id)) || $auth->acl_gets('m_edit', 'a_', $forum_id))
+ if (($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id)) || $auth->acl_get('m_edit', $forum_id))
{
$temp_url = "posting.$phpEx$SID&amp;mode=edit&amp;f=" . $row['forum_id'] . "&amp;p=" . $row['post_id'];
$edit_img = '<a href="' . $temp_url . '">' . $user->img('icon_edit', $user->lang['EDIT_DELETE_POST']) . '</a>';
@@ -681,7 +681,7 @@ if ($row = $db->sql_fetchrow($result))
$edit = '';
}
- if ($auth->acl_gets('m_ip', 'a_', $forum_id))
+ if ($auth->acl_get('m_ip', $forum_id))
{
$temp_url = "mcp.$phpEx?sid=" . $user->session_id . "&amp;mode=ip&amp;p=" . $row['post_id'] . "&amp;t=" . $topic_id;
$ip_img = '<a href="' . $temp_url . '">' . $user->img('icon_ip', $user->lang['VIEW_IP']) . '</a>';
@@ -693,7 +693,7 @@ if ($row = $db->sql_fetchrow($result))
$ip = '';
}
- if (($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $forum_topic_data['topic_last_post_id'] == $row['post_id']) || $auth->acl_gets('m_delete', 'a_', $forum_id))
+ if (($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $forum_topic_data['topic_last_post_id'] == $row['post_id']) || $auth->acl_get('m_delete', $forum_id))
{
$temp_url = "posting.$phpEx$SID&amp;mode=delete&amp;p=" . $row['post_id'];
$delpost_img = '<a href="' . $temp_url . '">' . $user->img('icon_delete', $user->lang['DELETE_POST']) . '</a>';
@@ -777,7 +777,7 @@ if ($row = $db->sql_fetchrow($result))
{
$user_sig = ($row['enable_sig'] && $row['user_sig'] != '' && $config['allow_sig']) ? $row['user_sig'] : '';
- if ($user_sig != '' && $auth->acl_gets('f_sigs', 'm_', 'a_', $forum_id))
+ if ($user_sig != '' && $auth->acl_get('f_sigs', $forum_id))
{
if (!$auth->acl_get('f_html', $forum_id) && $user->data['user_allowhtml'])
{
@@ -824,7 +824,7 @@ if ($row = $db->sql_fetchrow($result))
'SIGNATURE' => $user_cache[$poster_id]['sig'],
'EDITED_MESSAGE'=> $l_edited_by,
- 'RATING' => $rating,
+ 'RATING' => $rating,
'MINI_POST_IMG' => $mini_post_img,
'EDIT_IMG' => $edit_img,
@@ -856,7 +856,7 @@ if ($row = $db->sql_fetchrow($result))
'YIM_IMG' => $user_cache[$poster_id]['yim_img'],
'YIM' => $user_cache[$poster_id]['yim'],
- 'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_gets('m_', 'a_', $forum_id)) ? TRUE : FALSE,
+ 'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_gets('m_', $forum_id)) ? TRUE : FALSE,
'U_REPORT' => "report.$phpEx$SID&amp;p=" . $row['post_id'],
'U_MCP_REPORT' => "mcp.$phpEx$SID&amp;mode=post_details&amp;p=" . $row['post_id'],
// no img yet as I could not get the subSilver to work with PSP - Ashe