mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 05:48:51 +00:00
Fixed some undefined variables
git-svn-id: file:///svn/phpbb/trunk@3947 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
c3e4f02d49
commit
b939242c3a
4 changed files with 13 additions and 12 deletions
|
@ -174,7 +174,7 @@ function get_forum_parents($forum_data)
|
||||||
// Obtain list of moderators of each forum
|
// Obtain list of moderators of each forum
|
||||||
function get_moderators(&$forum_moderators, $forum_id = false)
|
function get_moderators(&$forum_moderators, $forum_id = false)
|
||||||
{
|
{
|
||||||
global $config, $template, $db;
|
global $config, $template, $db, $phpEx, $SID;
|
||||||
|
|
||||||
// Have we disabled the display of moderators? If so, then return
|
// Have we disabled the display of moderators? If so, then return
|
||||||
// from whence we came ...
|
// from whence we came ...
|
||||||
|
@ -618,9 +618,9 @@ function markread($mode, $forum_id = 0, $topic_id = 0, $post_id = 0)
|
||||||
SET $type_update forum_id = $forum_id, mark_time = " . time() . "
|
SET $type_update forum_id = $forum_id, mark_time = " . time() . "
|
||||||
WHERE topic_id = $topic_id
|
WHERE topic_id = $topic_id
|
||||||
AND user_id = " . $user->data['user_id'];
|
AND user_id = " . $user->data['user_id'];
|
||||||
$db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
if ($db->sql_affectedrows($result) == 0)
|
if (!$db->sql_affectedrows($result))
|
||||||
{
|
{
|
||||||
// Couldn't update. Row probably doesn't exist. Insert one.
|
// Couldn't update. Row probably doesn't exist. Insert one.
|
||||||
if(isset($type) && $type = 1)
|
if(isset($type) && $type = 1)
|
||||||
|
@ -908,10 +908,10 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||||
switch ($errno)
|
switch ($errno)
|
||||||
{
|
{
|
||||||
case E_WARNING:
|
case E_WARNING:
|
||||||
// if (defined('DEBUG'))
|
if (defined('DEBUG_EXTRA'))
|
||||||
// {
|
{
|
||||||
// echo "PHP Warning on line <b>$errline</b> in <b>$errfile</b> :: <b>$msg_text</b>";
|
// echo "PHP Warning on line <b>$errline</b> in <b>$errfile</b> :: <b>$msg_text</b><br />";
|
||||||
// }
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_NOTICE:
|
case E_NOTICE:
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
|
|
||||||
function display_forums($root_data = '', $display_moderators = TRUE)
|
function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
{
|
{
|
||||||
global $db, $template, $auth, $user, $phpEx, $SID, $forum_moderators;
|
global $db, $template, $auth, $user;
|
||||||
|
global $config, $phpEx, $SID, $forum_moderators;
|
||||||
|
|
||||||
$visible_forums = 0;
|
$visible_forums = 0;
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$lastread_select = '';
|
$lastread_select = '';
|
||||||
$lastread_sql = '';
|
$sql_lastread = '';
|
||||||
|
|
||||||
// Cookie based tracking
|
// Cookie based tracking
|
||||||
}
|
}
|
||||||
|
@ -238,7 +239,7 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$last_post = $user->lang['NO_POSTS'];
|
$last_post_time = $last_poster = $last_poster_url = $last_post_url = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -262,7 +263,6 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
'TOPICS' => $row['forum_topics'],
|
'TOPICS' => $row['forum_topics'],
|
||||||
'LAST_POST_TIME' => $last_post_time,
|
'LAST_POST_TIME' => $last_post_time,
|
||||||
'LAST_POSTER' => $last_poster,
|
'LAST_POSTER' => $last_poster,
|
||||||
'LAST_POST' => $last_post,
|
|
||||||
'MODERATORS' => $moderators_list,
|
'MODERATORS' => $moderators_list,
|
||||||
'SUBFORUMS' => $subforums_list,
|
'SUBFORUMS' => $subforums_list,
|
||||||
|
|
||||||
|
|
|
@ -1166,7 +1166,7 @@ include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
|
||||||
function topic_review($topic_id, $is_inline_review = false)
|
function topic_review($topic_id, $is_inline_review = false)
|
||||||
{
|
{
|
||||||
global $user, $auth, $db, $template, $bbcode;
|
global $user, $auth, $db, $template, $bbcode;
|
||||||
global $censors, $config, $phpbb_root_path, $phpEx;
|
global $censors, $config, $phpbb_root_path, $phpEx, $SID;
|
||||||
|
|
||||||
// Define censored word matches
|
// Define censored word matches
|
||||||
if (empty($censors))
|
if (empty($censors))
|
||||||
|
|
|
@ -312,6 +312,7 @@ if ($forum_data['forum_postable'])
|
||||||
foreach ($row_ary as $row)
|
foreach ($row_ary as $row)
|
||||||
{
|
{
|
||||||
$topic_id = $row['topic_id'];
|
$topic_id = $row['topic_id'];
|
||||||
|
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||||
|
|
||||||
// Type and folder
|
// Type and folder
|
||||||
$topic_type = '';
|
$topic_type = '';
|
||||||
|
|
Loading…
Add table
Reference in a new issue