mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
- adjusted coding guidelines
- fixed custom bbcode {TEXT} token - added unapproved item/info for unapproved posts in a topic git-svn-id: file:///svn/phpbb/trunk@5982 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
ebf4f4ec8e
commit
19a36ed364
12 changed files with 95 additions and 84 deletions
|
@ -348,7 +348,7 @@ class ...
|
|||
|
||||
<a name="code"></a><h1>2. Code Layout/Guidelines</h1>
|
||||
|
||||
<p>Please note that these Guidelines also applies to js code.</p>
|
||||
<p>Please note that these Guidelines also applies to javascript code.</p>
|
||||
|
||||
<a name="namingvars"></a><b>2.i. Variable/Function Naming</b>
|
||||
<br /><br />
|
||||
|
@ -691,6 +691,7 @@ switch ($mode)
|
|||
}
|
||||
</pre></blockquote>
|
||||
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
<br /><br />
|
||||
|
@ -892,10 +893,21 @@ trigger_error('NO_FORUM');
|
|||
|
||||
<p>All urls pointing to internal files need to be prepended by the <code>$phpbb_root_path</code> variable. Within the administration control panel all urls pointing to internal files need to be prepended by the <code>$phpbb_admin_path</code> variable. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended.</p>
|
||||
|
||||
<h3>General Functions: </h3>
|
||||
<p>Use <code>sizeof</code> instead of <code>count</code>, this is just a general preference and guideline and has no other benefit than to be consistent.</p>
|
||||
<h3>General function usage: </h3>
|
||||
|
||||
<p>Use <code>strpos</code> instead of <code>strstr</code>.</p>
|
||||
<p>Some of these functions are only chosen over others because of a personal preference and are having no other benefit than to be consistant over the code.</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>Use <code>sizeof</code> instead of <code>count</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Use <code>strpos</code> instead of <code>strstr</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Use <code>else if</code> instead of <code>elseif</code></p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
|
@ -1158,33 +1170,12 @@ markup
|
|||
<a name="changes"></a><h1>5. Guidelines Changelog</h1>
|
||||
<div class="paragraph">
|
||||
|
||||
<h2>Revision 1.7</h2>
|
||||
|
||||
<ul class="menu">
|
||||
<li>Updated <a href="#locations">1.iii. File Locations</a> to reflect recent updates</li>
|
||||
<li>Added paragraph about switch statements to <a href="#codelayout">2.ii. Code Layout</a></li>
|
||||
<li>Updated <a href="#sql">2.iii. SQL/SQL Layout</a></li>
|
||||
<li>Added paragraph about url formatting to <a href="#general">2.v. General Guidelines</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Revision 1.6</h2>
|
||||
|
||||
<ul class="menu">
|
||||
<li>Added more information to Tabs vs. Spaces paragraph</li>
|
||||
</ul>
|
||||
|
||||
<h2>Revision 1.5</h2>
|
||||
|
||||
<ul class="menu">
|
||||
<li>$user->start now $user->session_begin</li>
|
||||
<li>Changed General function usage paragraph in <a href="#general">2.v. General Guidelines</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Revision 1.3</h2>
|
||||
|
||||
<ul class="menu">
|
||||
<li>Updated Section 1.iii. - dbal layout</li>
|
||||
<li>Extended Section 2.v. - usage of request_var()</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<a href="#top">Top</a>
|
||||
|
|
|
@ -233,7 +233,7 @@ class acp_bbcodes
|
|||
'!([a-z0-9]+[a-z0-9\-\._]*@(?:(?:[0-9]{1,3}\.){3,5}[0-9]{1,3}|[a-z0-9]+[a-z0-9\-\._]*\.[a-z]+))!i' => '$1'
|
||||
),
|
||||
'TEXT' => array(
|
||||
'!(.*?)!es' => "str_replace('\\\"', '"', str_replace('\\'', ''', '\$1'))"
|
||||
'!(.*?)!es' => "str_replace(\"\\r\\n\",\"\\n\", str_replace('\\\"', '\"', str_replace('\\'', ''', trim('\$1'))))"
|
||||
),
|
||||
'COLOR' => array(
|
||||
'!([a-z]+|#[0-9abcdef]+)!i' => '$1'
|
||||
|
|
|
@ -107,11 +107,6 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
{
|
||||
$topic_title = '';
|
||||
|
||||
if ($auth->acl_get('m_approve', $row['forum_id']))
|
||||
{
|
||||
$row['topic_replies'] = $row['topic_replies_real'];
|
||||
}
|
||||
|
||||
if ($row['topic_status'] == ITEM_LOCKED)
|
||||
{
|
||||
$folder_img = 'folder_locked';
|
||||
|
@ -165,12 +160,16 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
|
||||
$topic_title = censor_text($row['topic_title']);
|
||||
|
||||
$topic_unapproved = (!$row['topic_approved'] && $auth->acl_gets('m_approve', $row['forum_id'])) ? true : false;
|
||||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_gets('m_approve', $row['forum_id'])) ? true : false;
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? $url . '&i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . '&t=' . $row['topic_id'] : '';
|
||||
|
||||
$template->assign_block_vars('topicrow', array(
|
||||
'U_VIEW_TOPIC' => "{$phpbb_root_path}mcp.$phpEx$SID&i=$id&f=$forum_id&t={$row['topic_id']}&mode=topic_view",
|
||||
|
||||
'S_SELECT_TOPIC' => ($action == 'merge_select' && $row['topic_id'] != $topic_id) ? true : false,
|
||||
'U_SELECT_TOPIC' => $url . "&i=$id&mode=topic_view&action=merge&to_topic_id=" . $row['topic_id'] . $selected_ids,
|
||||
'U_MCP_QUEUE' => $url . '&i=queue&mode=approve_details&t=' . $row['topic_id'],
|
||||
'U_MCP_QUEUE' => $u_mcp_queue,
|
||||
'U_MCP_REPORT' => "{$phpbb_root_path}mcp.$phpEx$SID&i=main&mode=topic_view&t={$row['topic_id']}&action=reports",
|
||||
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
|
@ -179,16 +178,18 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
|
||||
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
|
||||
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
|
||||
|
||||
'TOPIC_TYPE' => $topic_type,
|
||||
'TOPIC_TITLE' => $topic_title,
|
||||
'REPLIES' => $row['topic_replies'],
|
||||
'REPLIES' => ($auth->acl_get('m_approve', $row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'],
|
||||
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
|
||||
'TOPIC_ID' => $row['topic_id'],
|
||||
'S_TOPIC_CHECKED' => ($topic_id_list && in_array($row['topic_id'], $topic_id_list)) ? 'checked="checked" ' : '',
|
||||
|
||||
'S_TOPIC_REPORTED' => ($row['topic_reported']) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED'=> ($row['topic_approved']) ? false : true)
|
||||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_gets('m_report', $row['forum_id'])) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
|
||||
'S_POSTS_UNAPPROVED' => $posts_unapproved)
|
||||
);
|
||||
}
|
||||
unset($topic_rows);
|
||||
|
|
|
@ -312,7 +312,7 @@ function mcp_post_details($id, $mode, $action)
|
|||
*/
|
||||
function change_poster(&$post_info, $userdata)
|
||||
{
|
||||
global $auth, $db;
|
||||
global $auth, $db, $config;
|
||||
|
||||
if (empty($userdata) || $userdata['user_id'] == $post_info['user_id'])
|
||||
{
|
||||
|
@ -383,6 +383,9 @@ function change_poster(&$post_info, $userdata)
|
|||
|
||||
// Do not change the poster_id within the attachments table, since they were still posted by the original user
|
||||
|
||||
$from_username = $post_info['username'];
|
||||
$to_username = $userdata['username'];
|
||||
|
||||
// Renew post info
|
||||
$post_info = get_post_data(array($post_id));
|
||||
|
||||
|
@ -394,7 +397,7 @@ function change_poster(&$post_info, $userdata)
|
|||
$post_info = $post_info[$post_id];
|
||||
|
||||
// Now add log entry
|
||||
add_log('mod', $post_info['forum_id'], $post_info['topic_id'], 'LOG_MCP_CHANGE_POSTER', $post_info['topic_title'], $post_info['username'], $userdata['username']);
|
||||
add_log('mod', $post_info['forum_id'], $post_info['topic_id'], 'LOG_MCP_CHANGE_POSTER', $post_info['topic_title'], $from_username, $to_username);
|
||||
}
|
||||
|
||||
?>
|
|
@ -800,7 +800,8 @@ function compose_pm($id, $mode, $action)
|
|||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
|
||||
'S_CLOSE_PROGRESS_WINDOW' => isset($_POST['add_file']),
|
||||
'U_PROGRESS_BAR' => "{$phpbb_root_path}posting.$phpEx$SID&f=0&mode=popup", // do NOT replace & with & here
|
||||
'U_PROGRESS_BAR' => "{$phpbb_root_path}posting.$phpEx$SID&f=0&mode=popup",
|
||||
'UA_PROGRESS_BAR' => "{$phpbb_root_path}posting.$phpEx$SID&f=0&mode=popup",
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -312,6 +312,7 @@ $lang = array_merge($lang, array(
|
|||
'POST_STICKY' => 'Sticky',
|
||||
'POSTED' => 'Posted',
|
||||
'POSTS' => 'Posts',
|
||||
'POSTS_UNAPPROVED' => 'At least one post in this topic has not been approved',
|
||||
'POST_BY_FOE' => 'This post was made by <b>%1$s</b> who is currently on your ignore list. To display this post click %2$sHERE%3$s.',
|
||||
'POST_DAY' => '%.2f posts per day',
|
||||
'POST_DETAILS' => 'Post details',
|
||||
|
|
|
@ -86,6 +86,7 @@ $lang = array_merge($lang, array(
|
|||
'AVATAR_CATEGORY' => 'Category',
|
||||
'AVATAR_EXPLAIN' => 'Maximum dimensions; width %1$d pixels, height %2$d pixels, filesize %3$dkB.',
|
||||
'AVATAR_GALLERY' => 'Local gallery',
|
||||
'AVATAR_GENERAL_UPLOAD_ERROR' => 'Could not upload avatar to %s',
|
||||
'AVATAR_PAGE' => 'Page',
|
||||
|
||||
'BACK_TO_DRAFTS' => 'Back to saved drafts',
|
||||
|
|
|
@ -618,6 +618,10 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
|
||||
$unread_topic = (isset($topic_tracking_info[$forum_id][$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$forum_id][$row['topic_id']]) ? true : false;
|
||||
|
||||
$topic_unapproved = (!$row['topic_approved'] && $auth->acl_gets('m_approve', $forum_id)) ? true : false;
|
||||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_gets('m_approve', $forum_id)) ? true : false;
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? "{$phpbb_root_path}mcp.$phpEx?sid={$user->session_id}&i=queue&mode=" . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id" : '';
|
||||
|
||||
$tpl_ary = array(
|
||||
'TOPIC_AUTHOR' => topic_topic_author($row),
|
||||
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
|
||||
|
@ -634,6 +638,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
|
||||
|
||||
'S_TOPIC_GLOBAL' => (!$forum_id) ? true : false,
|
||||
'S_TOPIC_TYPE' => $row['topic_type'],
|
||||
|
@ -641,13 +646,14 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
'S_UNREAD_TOPIC' => $unread_topic,
|
||||
|
||||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_gets('m_report', $forum_id)) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED' => (!$row['topic_approved'] && $auth->acl_gets('m_approve', $forum_id)) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
|
||||
'S_POSTS_UNAPPROVED' => $posts_unapproved,
|
||||
|
||||
'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
|
||||
'U_LAST_POST_AUTHOR'=> ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u={$row['topic_last_poster_id']}" : '',
|
||||
'U_NEWEST_POST' => $view_topic_url . '&view=unread#unread',
|
||||
'U_MCP_REPORT' => "{$phpbb_root_path}mcp.$phpEx?sid={$user->session_id}&i=reports&mode=reports&t=$result_topic_id",
|
||||
'U_MCP_QUEUE' => "{$phpbb_root_path}mcp.$phpEx?sid={$user->session_id}&i=queue&mode=approve_details&t=$result_topic_id"
|
||||
'U_MCP_QUEUE' => $u_mcp_queue,
|
||||
);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -23,13 +23,14 @@
|
|||
<!-- IF topicrow.S_SELECT_TOPIC -->
|
||||
<span class="genmed">[ <a href="{topicrow.U_SELECT_TOPIC}">{L_SELECT}</a> ] </span>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF topicrow.S_TOPIC_UNAPPROVED -->
|
||||
<a href="{topicrow.U_MCP_QUEUE}">{UNAPPROVED_IMG}</a>
|
||||
<p class="topictitle">{topicrow.NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a>
|
||||
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
|
||||
<a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF topicrow.S_TOPIC_REPORTED -->
|
||||
<a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a>
|
||||
<!-- ENDIF -->
|
||||
<p class="topictitle">{topicrow.NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p>
|
||||
</p>
|
||||
</td>
|
||||
<td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
|
||||
<td class="row1" width="120" align="center"><p class="topicdetails">{topicrow.LAST_POST_TIME}</p></td>
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
<td class="row1">
|
||||
<!-- IF searchresults.S_UNREAD_TOPIC --><a href="{searchresults.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
|
||||
{topicrow.ATTACH_ICON_IMG} <a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a>
|
||||
<!-- IF searchresults.S_TOPIC_UNAPPROVED -->
|
||||
<a href="{searchresults.U_MCP_QUEUE}">{UNAPPROVED_IMG}</a>
|
||||
<!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED -->
|
||||
<a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF searchresults.S_TOPIC_REPORTED -->
|
||||
<a href="{searchresults.U_MCP_REPORT}">{REPORTED_IMG}</a>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<td class="row1">
|
||||
<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
|
||||
{topicrow.ATTACH_ICON_IMG} <!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_MOVED --><b>{topicrow.TOPIC_TYPE}</b> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
|
||||
<!-- IF topicrow.S_TOPIC_UNAPPROVED -->
|
||||
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
|
||||
<a href="{topicrow.U_MCP_QUEUE}">{UNAPPROVED_IMG}</a>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF topicrow.S_TOPIC_REPORTED -->
|
||||
|
@ -162,8 +162,8 @@
|
|||
<td class="row1">
|
||||
<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
|
||||
{topicrow.ATTACH_ICON_IMG} <!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_MOVED --><b>{topicrow.TOPIC_TYPE}</b> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
|
||||
<!-- IF topicrow.S_TOPIC_UNAPPROVED -->
|
||||
<a href="{topicrow.U_MCP_QUEUE}">{UNAPPROVED_IMG}</a>
|
||||
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
|
||||
<a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF topicrow.S_TOPIC_REPORTED -->
|
||||
<a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a>
|
||||
|
|
|
@ -473,6 +473,10 @@ if (sizeof($topic_list))
|
|||
// Generate all the URIs ...
|
||||
$view_topic_url = "{$phpbb_root_path}viewtopic.$phpEx$SID&f=" . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id";
|
||||
|
||||
$topic_unapproved = (!$row['topic_approved'] && $auth->acl_gets('m_approve', $forum_id)) ? true : false;
|
||||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_gets('m_approve', $forum_id)) ? true : false;
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? "{$phpbb_root_path}mcp.$phpEx?sid={$user->session_id}&i=queue&mode=" . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$topic_id" : '';
|
||||
|
||||
// Send vars to template
|
||||
$template->assign_block_vars('topicrow', array(
|
||||
'FORUM_ID' => $forum_id,
|
||||
|
@ -494,12 +498,14 @@ if (sizeof($topic_list))
|
|||
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
|
||||
|
||||
'S_TOPIC_TYPE' => $row['topic_type'],
|
||||
'S_USER_POSTED' => (isset($row['topic_posted']) && $row['topic_posted']) ? true : false,
|
||||
'S_UNREAD_TOPIC' => $unread_topic,
|
||||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_gets('m_report', $forum_id)) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED' => (!$row['topic_approved'] && $auth->acl_gets('m_approve', $forum_id)) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
|
||||
'S_POSTS_UNAPPROVED' => $posts_unapproved,
|
||||
'S_HAS_POLL' => ($row['poll_start']) ? true : false,
|
||||
'S_POST_ANNOUNCE' => ($row['topic_type'] == POST_ANNOUNCE) ? true : false,
|
||||
'S_POST_GLOBAL' => ($row['topic_type'] == POST_GLOBAL) ? true : false,
|
||||
|
@ -511,7 +517,7 @@ if (sizeof($topic_list))
|
|||
'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u={$row['topic_last_poster_id']}" : '',
|
||||
'U_VIEW_TOPIC' => $view_topic_url,
|
||||
'U_MCP_REPORT' => "{$phpbb_root_path}mcp.$phpEx?sid={$user->session_id}&i=reports&mode=reports&t=$topic_id",
|
||||
'U_MCP_QUEUE' => "{$phpbb_root_path}mcp.$phpEx?sid={$user->session_id}&i=queue&mode=approve_details&t=$topic_id",
|
||||
'U_MCP_QUEUE' => $u_mcp_queue,
|
||||
|
||||
'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test)
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue