mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
prepared (and fixed) topic review.
git-svn-id: file:///svn/phpbb/trunk@4010 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7aa9eaeeb9
commit
33b0446650
3 changed files with 43 additions and 47 deletions
|
@ -24,6 +24,7 @@ class bbcode
|
||||||
var $bbcode_uid = '';
|
var $bbcode_uid = '';
|
||||||
var $bbcode_bitfield = 0;
|
var $bbcode_bitfield = 0;
|
||||||
var $bbcode_cache = array();
|
var $bbcode_cache = array();
|
||||||
|
var $bbcode_tpl = array();
|
||||||
|
|
||||||
function bbcode($bitfield = 0)
|
function bbcode($bitfield = 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1134,9 +1134,22 @@ page_footer();
|
||||||
// Topic Review
|
// Topic Review
|
||||||
function topic_review($topic_id, $is_inline_review = false)
|
function topic_review($topic_id, $is_inline_review = false)
|
||||||
{
|
{
|
||||||
|
global $template;
|
||||||
|
|
||||||
|
if ($is_inline_review)
|
||||||
|
{
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_DISPLAY_INLINE' => true)
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
global $user, $auth, $db, $template, $bbcode;
|
global $user, $auth, $db, $template, $bbcode;
|
||||||
global $censors, $config, $phpbb_root_path, $phpEx, $SID;
|
global $censors, $config, $phpbb_root_path, $phpEx, $SID;
|
||||||
|
|
||||||
|
$user->setup();
|
||||||
|
|
||||||
// Define censored word matches
|
// Define censored word matches
|
||||||
if (empty($censors))
|
if (empty($censors))
|
||||||
{
|
{
|
||||||
|
@ -1144,8 +1157,6 @@ function topic_review($topic_id, $is_inline_review = false)
|
||||||
obtain_word_list($censors);
|
obtain_word_list($censors);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$is_inline_review)
|
|
||||||
{
|
|
||||||
// Get topic info ...
|
// Get topic info ...
|
||||||
$sql = "SELECT t.topic_title, f.forum_id
|
$sql = "SELECT t.topic_title, f.forum_id
|
||||||
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
|
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
|
||||||
|
@ -1170,13 +1181,8 @@ function topic_review($topic_id, $is_inline_review = false)
|
||||||
{
|
{
|
||||||
$topic_title = preg_replace($censors['match'], $censors['replace'], $topic_title);
|
$topic_title = preg_replace($censors['match'], $censors['replace'], $topic_title);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
$page_title = $user->lang['TOPIC_REVIEW'] . ' - ' . $topic_title;
|
||||||
{
|
|
||||||
$template->assign_vars(array(
|
|
||||||
'S_DISPLAY_INLINE' => true)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($bbcode))
|
if (!isset($bbcode))
|
||||||
{
|
{
|
||||||
|
@ -1242,17 +1248,7 @@ function topic_review($topic_id, $is_inline_review = false)
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
page_header($page_title);
|
||||||
'L_MESSAGE' => $user->lang['MESSAGE'],
|
|
||||||
'L_POSTED' => $user->lang['POSTED'],
|
|
||||||
'L_POST_SUBJECT'=> $user->lang['POST_SUBJECT'],
|
|
||||||
'L_TOPIC_REVIEW'=> $user->lang['TOPIC_REVIEW'])
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!$is_inline_review)
|
|
||||||
{
|
|
||||||
$page_title = $user->lang['TOPIC_REVIEW'] . ' - ' . $topic_title;
|
|
||||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
|
||||||
|
|
||||||
$template->set_filenames(array(
|
$template->set_filenames(array(
|
||||||
'body' => 'posting_topic_review.html')
|
'body' => 'posting_topic_review.html')
|
||||||
|
@ -1260,7 +1256,6 @@ function topic_review($topic_id, $is_inline_review = false)
|
||||||
|
|
||||||
page_footer();
|
page_footer();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Temp Function - strtolower (will have a look at iconv later) - borrowed from php.net
|
// Temp Function - strtolower (will have a look at iconv later) - borrowed from php.net
|
||||||
function phpbb_strtolower($string)
|
function phpbb_strtolower($string)
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
|
|
||||||
<!-- INCLUDE simple_header.html -->
|
<!-- INCLUDE simple_header.html -->
|
||||||
|
|
||||||
<!-- ENDIF -->
|
|
||||||
|
|
||||||
<table class="tablebg" width="100%" cellpadding="2" cellspacing="1" border="0">
|
<table class="tablebg" width="100%" cellpadding="2" cellspacing="1" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="22%" height="26">{L_AUTHOR}</th>
|
<th width="22%" height="26">{L_AUTHOR}</th>
|
||||||
|
@ -43,6 +41,8 @@
|
||||||
<!-- END postrow -->
|
<!-- END postrow -->
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF S_DISPLAY_INLINE -->
|
<!-- IF S_DISPLAY_INLINE -->
|
||||||
</iframe></td>
|
</iframe></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Add table
Reference in a new issue