From c2ded8a7aa253afaacb63ed6a987e600b0a92af8 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Fri, 22 Mar 2002 23:17:06 +0000 Subject: More header fixing git-svn-id: file:///svn/phpbb/trunk@2411 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 468 ++++++++++++++++++++++++++-------------------------- 1 file changed, 234 insertions(+), 234 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 6cb2c8bca9..3934984526 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -21,7 +21,7 @@ ***************************************************************************/ define('IN_PHPBB', true); -$phpbb_root_path = "./"; +$phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); include($phpbb_root_path . 'includes/bbcode.'.$phpEx); @@ -29,16 +29,16 @@ include($phpbb_root_path . 'includes/bbcode.'.$phpEx); // // Start initial var setup // -if(isset($HTTP_GET_VARS[POST_TOPIC_URL])) +if ( isset($HTTP_GET_VARS[POST_TOPIC_URL]) ) { $topic_id = intval($HTTP_GET_VARS[POST_TOPIC_URL]); } -else if(isset($HTTP_GET_VARS['topic'])) +else if ( isset($HTTP_GET_VARS['topic']) ) { $topic_id = intval($HTTP_GET_VARS['topic']); } -if(isset($HTTP_GET_VARS[POST_POST_URL])) +if ( isset($HTTP_GET_VARS[POST_POST_URL])) { $post_id = intval($HTTP_GET_VARS[POST_POST_URL]); } @@ -104,7 +104,7 @@ if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) ) exit; } } - else if( $HTTP_GET_VARS['view'] == 'next' || $HTTP_GET_VARS['view'] == 'previous' ) + else if ( $HTTP_GET_VARS['view'] == 'next' || $HTTP_GET_VARS['view'] == 'previous' ) { $sql_condition = ( $HTTP_GET_VARS['view'] == 'next' ) ? '>' : '<'; $sql_ordering = ( $HTTP_GET_VARS['view'] == 'next' ) ? 'ASC' : 'DESC'; @@ -121,7 +121,7 @@ if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) ) LIMIT 1"; if ( !($result = $db->sql_query($sql)) ) { - message_die(GENERAL_ERROR, "Couldn't obtain newer/older topic information", "", __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, "Could not obtain newer/older topic information", '', __LINE__, __FILE__, $sql); } if ( !($row = $db->sql_fetchrow($result)) ) @@ -158,12 +158,12 @@ $sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.top WHERE $join_sql AND f.forum_id = t.forum_id $order_sql"; -if( !($result = $db->sql_query($sql)) ) +if ( !($result = $db->sql_query($sql)) ) { - message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, "Could not obtain topic information", '', __LINE__, __FILE__, $sql); } -if( !($forum_row = $db->sql_fetchrow($result)) ) +if ( !($forum_row = $db->sql_fetchrow($result)) ) { message_die(GENERAL_MESSAGE, 'Topic_post_not_exist'); } @@ -190,8 +190,9 @@ if( !$is_auth['auth_view'] || !$is_auth['auth_read'] ) if ( !$userdata['session_logged_in'] ) { $redirect = ( isset($post_id) ) ? POST_POST_URL . "=$post_id" : POST_TOPIC_URL . "=$topic_id"; - $redirect .= ( isset($start) ) ? "&start=$start" : ""; - header("Location: " . append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true)); + $redirect .= ( isset($start) ) ? "&start=$start" : ''; + $header_location = ( @preg_match("/Microsoft|WebSTAR/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; + header($header_location . append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true)); } $message = ( !$is_auth['auth_view'] ) ? $lang['Topic_post_not_exist'] : sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']); @@ -225,29 +226,29 @@ if( $userdata['session_logged_in'] ) AND user_id = " . $userdata['user_id']; if( !($result = $db->sql_query($sql)) ) { - message_die(GENERAL_ERROR, "Couldn't obtain topic watch information", "", __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, "Could not obtain topic watch information", '', __LINE__, __FILE__, $sql); } - if( $row = $db->sql_fetchrow($result) ) + if ( $row = $db->sql_fetchrow($result) ) { - if( isset($HTTP_GET_VARS['unwatch']) ) + if ( isset($HTTP_GET_VARS['unwatch']) ) { - if( $HTTP_GET_VARS['unwatch'] == "topic" ) + if ( $HTTP_GET_VARS['unwatch'] == 'topic' ) { $is_watching_topic = 0; - $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : ""; + $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : ''; $sql = "DELETE $sql_priority FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id AND user_id = " . $userdata['user_id']; - if( !$result = $db->sql_query($sql) ) + if ( !($result = $db->sql_query($sql)) ) { - message_die(GENERAL_ERROR, "Couldn't delete topic watch information", "", __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, "Could not delete topic watch information", '', __LINE__, __FILE__, $sql); } } $template->assign_vars(array( - "META" => '') + 'META' => '') ); $message = $lang['No_longer_watching'] . '

' . sprintf($lang['Click_return_topic'], '', ''); @@ -257,39 +258,39 @@ if( $userdata['session_logged_in'] ) { $is_watching_topic = TRUE; - if( $row['notify_status'] ) + if ( $row['notify_status'] ) { - $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : ""; + $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : ''; $sql = "UPDATE $sql_priority " . TOPICS_WATCH_TABLE . " SET notify_status = 0 WHERE topic_id = $topic_id AND user_id = " . $userdata['user_id']; - if( !$result = $db->sql_query($sql) ) + if ( !($result = $db->sql_query($sql)) ) { - message_die(GENERAL_ERROR, "Couldn't update topic watch information", "", __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, "Could not update topic watch information", '', __LINE__, __FILE__, $sql); } } } } else { - if( isset($HTTP_GET_VARS['watch']) ) + if ( isset($HTTP_GET_VARS['watch']) ) { - if( $HTTP_GET_VARS['watch'] == "topic" ) + if ( $HTTP_GET_VARS['watch'] == 'topic' ) { $is_watching_topic = TRUE; - $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : ""; + $sql_priority = (SQL_LAYER == "mysql") ? "LOW_PRIORITY" : ''; $sql = "INSERT $sql_priority INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status) VALUES (" . $userdata['user_id'] . ", $topic_id, 0)"; - if( !$result = $db->sql_query($sql) ) + if ( !($result = $db->sql_query($sql)) ) { - message_die(GENERAL_ERROR, "Couldn't insert topic watch information", "", __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, "Could not insert topic watch information", '', __LINE__, __FILE__, $sql); } } $template->assign_vars(array( - "META" => '') + 'META' => '') ); $message = $lang['You_are_watching'] . '

' . sprintf($lang['Click_return_topic'], '', ''); @@ -303,11 +304,12 @@ if( $userdata['session_logged_in'] ) } else { - if( isset($HTTP_GET_VARS['unwatch']) ) + if ( isset($HTTP_GET_VARS['unwatch']) ) { - if( $HTTP_GET_VARS['unwatch'] == "topic" ) + if ( $HTTP_GET_VARS['unwatch'] == 'topic' ) { - header("Location: " . append_sid("login.$phpEx?redirect=viewtopic.$phpEx&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic", true)); + $header_location = ( @preg_match("/Microsoft|WebSTAR/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; + header($header_location . append_sid("login.$phpEx?redirect=viewtopic.$phpEx&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic", true)); } } else @@ -334,16 +336,16 @@ if( !empty($HTTP_POST_VARS['postdays']) || !empty($HTTP_GET_VARS['postdays']) ) FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id AND post_time >= $min_post_time"; - if(!$result = $db->sql_query($sql)) + if ( !($result = $db->sql_query($sql)) ) { - message_die(GENERAL_ERROR, "Couldn't obtain limited topics count information", "", __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, "Could not obtain limited topics count information", '', __LINE__, __FILE__, $sql); } $total_replies = ( $row = $db->sql_fetchrow($result) ) ? $row['num_posts'] : 0; $limit_posts_time = "AND p.post_time >= $min_post_time "; - if(!empty($HTTP_POST_VARS['postdays'])) + if ( !empty($HTTP_POST_VARS['postdays'])) { $start = 0; } @@ -352,7 +354,7 @@ else { $total_replies = $forum_row['topic_replies'] + 1; - $limit_posts_time = ""; + $limit_posts_time = ''; $post_days = 0; } @@ -367,19 +369,19 @@ $select_post_days .= ''; // // Decide how to order the post display // -if(!empty($HTTP_POST_VARS['postorder']) || !empty($HTTP_GET_VARS['postorder'])) +if ( !empty($HTTP_POST_VARS['postorder']) || !empty($HTTP_GET_VARS['postorder']) ) { $post_order = (!empty($HTTP_POST_VARS['postorder'])) ? $HTTP_POST_VARS['postorder'] : $HTTP_GET_VARS['postorder']; $post_time_order = ($post_order == "asc") ? "ASC" : "DESC"; } else { - $post_order = "asc"; - $post_time_order = "ASC"; + $post_order = 'asc'; + $post_time_order = 'ASC'; } $select_post_order = ''; } - if( count($orig_word) ) + if ( count($orig_word) ) { $vote_title = preg_replace($orig_word, $replacement_word, $vote_title); } $template->assign_vars(array( - "POLL_QUESTION" => $vote_title, + 'POLL_QUESTION' => $vote_title, - "S_HIDDEN_FIELDS" => ( !empty($s_hidden_fields) ) ? $s_hidden_fields : "", - "S_VOTE_ACTION" => append_sid("posting.$phpEx?" . POST_TOPIC_URL . "=$topic_id")) + 'S_HIDDEN_FIELDS' => ( !empty($s_hidden_fields) ) ? $s_hidden_fields : '', + 'S_VOTE_ACTION' => append_sid("posting.$phpEx?" . POST_TOPIC_URL . "=$topic_id")) ); - $template->assign_var_from_handle("POLL_DISPLAY", "pollbox"); + $template->assign_var_from_handle('POLL_DISPLAY', 'pollbox'); } } @@ -814,9 +814,9 @@ if( !empty($forum_row['topic_vote']) ) $sql = "UPDATE " . TOPICS_TABLE . " SET topic_views = topic_views + 1 WHERE topic_id = $topic_id"; -if(!$update_result = $db->sql_query($sql)) +if ( !$db->sql_query($sql) ) { - message_die(GENERAL_ERROR, "Couldn't update topic views.", "", __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, "Could not update topic views.", '', __LINE__, __FILE__, $sql); } // @@ -830,25 +830,25 @@ for($i = 0; $i < $total_posts; $i++) $post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']); - $poster_posts = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ": " . $postrow[$i]['user_posts'] : ""; + $poster_posts = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $postrow[$i]['user_posts'] : ''; - $poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Location'] . ": " . $postrow[$i]['user_from'] : ""; + $poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : ''; - $poster_joined = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Joined'] . ": " . create_date($lang['DATE_FORMAT'], $postrow[$i]['user_regdate'], $board_config['board_timezone']) : ""; + $poster_joined = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Joined'] . ': ' . create_date($lang['DATE_FORMAT'], $postrow[$i]['user_regdate'], $board_config['board_timezone']) : ''; - $poster_avatar = ""; - if( $postrow[$i]['user_avatar_type'] && $poster_id != ANONYMOUS && $postrow[$i]['user_allowavatar'] ) + $poster_avatar = ''; + if ( $postrow[$i]['user_avatar_type'] && $poster_id != ANONYMOUS && $postrow[$i]['user_allowavatar'] ) { switch( $postrow[$i]['user_avatar_type'] ) { case USER_AVATAR_UPLOAD: - $poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '' : ''; + $poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '' : ''; break; case USER_AVATAR_REMOTE: $poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '' : ''; break; case USER_AVATAR_GALLERY: - $poster_avatar = ( $board_config['allow_avatar_local'] ) ? '' : ''; + $poster_avatar = ( $board_config['allow_avatar_local'] ) ? '' : ''; break; } } @@ -856,7 +856,7 @@ for($i = 0; $i < $total_posts; $i++) // // Define the little post icon // - if( $userdata['session_logged_in'] && $postrow[$i]['post_time'] > $userdata['user_lastvisit'] && $postrow[$i]['post_time'] > $topic_last_read ) + if ( $userdata['session_logged_in'] && $postrow[$i]['post_time'] > $userdata['user_lastvisit'] && $postrow[$i]['post_time'] > $topic_last_read ) { $mini_post_img = '' . $lang['New_post'] . ''; } @@ -865,7 +865,7 @@ for($i = 0; $i < $total_posts; $i++) $mini_post_img = '' . $lang['Post'] . ''; } - $mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $postrow[$i]['post_id']) ."#".$postrow[$i]['post_id']; + $mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#' . $postrow[$i]['post_id']; // // Generate ranks @@ -876,7 +876,7 @@ for($i = 0; $i < $total_posts; $i++) // $poster_rank = ''; $rank_image = ''; - if( $postrow[$i]['user_id'] == ANONYMOUS ) + if ( $postrow[$i]['user_id'] == ANONYMOUS ) { // // This is redundant, but some day we might wanna stick in a rank for anon. posts. @@ -884,11 +884,11 @@ for($i = 0; $i < $total_posts; $i++) $poster_rank = ''; $rank_image = ''; } - else if( $postrow[$i]['user_rank'] ) + else if ( $postrow[$i]['user_rank'] ) { for($j = 0; $j < count($ranksrow); $j++) { - if( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] ) + if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] ) { $poster_rank = $ranksrow[$j]['rank_title']; $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '' . $poster_rank . '
' : ''; @@ -899,7 +899,7 @@ for($i = 0; $i < $total_posts; $i++) { for($j = 0; $j < count($ranksrow); $j++) { - if( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] ) + if ( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] ) { $poster_rank = $ranksrow[$j]['rank_title']; $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '' . $poster_rank . '
' : ''; @@ -910,21 +910,21 @@ for($i = 0; $i < $total_posts; $i++) // // Handle anon users posting with usernames // - if($poster_id == ANONYMOUS && $postrow[$i]['post_username'] != '') + if ( $poster_id == ANONYMOUS && $postrow[$i]['post_username'] != '' ) { $poster = $postrow[$i]['post_username']; $poster_rank = $lang['Guest']; } - if( $poster_id != ANONYMOUS ) + if ( $poster_id != ANONYMOUS ) { $profile_img = '' . $lang['Read_profile'] . ''; $pm_img = '' . $lang['Send_private_message'] . ''; - if( !empty($postrow[$i]['user_viewemail']) || $is_auth['auth_mod'] ) + if ( !empty($postrow[$i]['user_viewemail']) || $is_auth['auth_mod'] ) { - $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL ."=" . $poster_id) : "mailto:" . $postrow[$i]['user_email']; + $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $poster_id) : 'mailto:' . $postrow[$i]['user_email']; $email_img = '' . $lang['Send_email'] . ''; } @@ -935,7 +935,7 @@ for($i = 0; $i < $total_posts; $i++) $www_img = ($postrow[$i]['user_website']) ? '' . $lang['Visit_website'] . '' : ''; - if( !empty($postrow[$i]['user_icq']) ) + if ( !empty($postrow[$i]['user_icq']) ) { $icq_status_img = ''; $icq_add_img = '' . $lang['ICQ'] . ''; @@ -969,7 +969,7 @@ for($i = 0; $i < $total_posts; $i++) $search_img = ''; - if( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] ) + if ( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] ) { $edit_img = '' . $lang['Edit_delete_post'] . ''; } @@ -978,7 +978,7 @@ for($i = 0; $i < $total_posts; $i++) $edit_img = ''; } - if( $is_auth['auth_mod'] ) + if ( $is_auth['auth_mod'] ) { $ip_img = '' . $lang['View_IP'] . ''; @@ -988,7 +988,7 @@ for($i = 0; $i < $total_posts; $i++) { $ip_img = ''; - if( $userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $i == $total_replies - 1 ) + if ( $userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $i == $total_replies - 1 ) { $delpost_img = '' . $lang['Delete_post'] . ''; } @@ -998,12 +998,12 @@ for($i = 0; $i < $total_posts; $i++) } } - $post_subject = ( $postrow[$i]['post_subject'] != "" ) ? $postrow[$i]['post_subject'] : ""; + $post_subject = ( $postrow[$i]['post_subject'] != '' ) ? $postrow[$i]['post_subject'] : ''; $message = $postrow[$i]['post_text']; $bbcode_uid = $postrow[$i]['bbcode_uid']; - $user_sig = ( $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig'] != "" && $board_config['allow_sig'] ) ? $postrow[$i]['user_sig'] : ""; + $user_sig = ( $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig'] != '' && $board_config['allow_sig'] ) ? $postrow[$i]['user_sig'] : ''; $user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid']; // @@ -1016,36 +1016,36 @@ for($i = 0; $i < $total_posts; $i++) // If the board has HTML off but the post has HTML // on then we process it, else leave it alone // - if( !$board_config['allow_html'] ) + if ( !$board_config['allow_html'] ) { - if( $user_sig != "" && $userdata['user_allowhtml'] ) + if ( $user_sig != '' && $userdata['user_allowhtml'] ) { - $user_sig = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $user_sig); + $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig); } - if( $postrow[$i]['enable_html'] ) + if ( $postrow[$i]['enable_html'] ) { - $message = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $message); + $message = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $message); } } // // Parse message and/or sig for BBCode if reqd // - if( $board_config['allow_bbcode'] ) + if ( $board_config['allow_bbcode'] ) { - if( $user_sig != "" && $user_sig_bbcode_uid != "" ) + if ( $user_sig != '' && $user_sig_bbcode_uid != '' ) { - $user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:[0-9a-z\:]+\]/si", "]", $user_sig); + $user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $user_sig); } - if( $bbcode_uid != "" ) + if ( $bbcode_uid != '' ) { - $message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace("/\:[0-9a-z\:]+\]/si", "]", $message); + $message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message); } } - if( $user_sig != "" ) + if ( $user_sig != '' ) { $user_sig = make_clickable($user_sig); } @@ -1054,7 +1054,7 @@ for($i = 0; $i < $total_posts; $i++) // // Highlight active words (primarily for search) // - if( $highlight_active ) + if ( $highlight_active ) { $message = preg_replace($highlight_match, $highlight_replace, $message); } @@ -1062,9 +1062,9 @@ for($i = 0; $i < $total_posts; $i++) // // Replace naughty words // - if( count($orig_word) ) + if ( count($orig_word) ) { - if( $user_sig != "" ) + if ( $user_sig != '' ) { $user_sig = preg_replace($orig_word, $replacement_word, $user_sig); } @@ -1076,14 +1076,14 @@ for($i = 0; $i < $total_posts; $i++) // // Parse smilies // - if( $board_config['allow_smilies'] ) + if ( $board_config['allow_smilies'] ) { - if( $postrow[$i]['user_allowsmile'] && $user_sig != "" ) + if ( $postrow[$i]['user_allowsmile'] && $user_sig != '' ) { $user_sig = smilies_pass($user_sig); } - if( $postrow[$i]['enable_smilies'] ) + if ( $postrow[$i]['enable_smilies'] ) { $message = smilies_pass($message); } @@ -1093,9 +1093,9 @@ for($i = 0; $i < $total_posts; $i++) // Replace newlines (we use this rather than nl2br because // till recently it wasn't XHTML compliant) // - if( $user_sig != "" ) + if ( $user_sig != '' ) { - $user_sig = "
_________________
" . str_replace("\n", "\n
", $user_sig); + $user_sig = '
_________________
' . str_replace("\n", "\n
", $user_sig); } $message = str_replace("\n", "\n
\n", $message); @@ -1103,15 +1103,15 @@ for($i = 0; $i < $total_posts; $i++) // // Editing information // - if( $postrow[$i]['post_edit_count'] ) + if ( $postrow[$i]['post_edit_count'] ) { $l_edit_time_total = ( $postrow[$i]['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total']; - $l_edited_by = "

" . sprintf($l_edit_time_total, $poster, create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']), $postrow[$i]['post_edit_count']); + $l_edited_by = '

' . sprintf($l_edit_time_total, $poster, create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']), $postrow[$i]['post_edit_count']); } else { - $l_edited_by = ""; + $l_edited_by = ''; } // @@ -1121,50 +1121,50 @@ for($i = 0; $i < $total_posts; $i++) $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; - $template->assign_block_vars("postrow", array( - "ROW_COLOR" => "#" . $row_color, - "ROW_CLASS" => $row_class, - "MINI_POST_IMG" => $mini_post_img, - - "POSTER_NAME" => $poster, - "POSTER_RANK" => $poster_rank, - "RANK_IMAGE" => $rank_image, - "POSTER_JOINED" => $poster_joined, - "POSTER_POSTS" => $poster_posts, - "POSTER_FROM" => $poster_from, - "POSTER_AVATAR" => $poster_avatar, - - "POST_DATE" => $post_date, - "POST_SUBJECT" => $post_subject, - "MESSAGE" => $message, - "SIGNATURE" => $user_sig, - "EDITED_MESSAGE" => $l_edited_by, - - "PROFILE_IMG" => $profile_img, - "SEARCH_IMG" => $search_img, - "PM_IMG" => $pm_img, - "EMAIL_IMG" => $email_img, - "WWW_IMG" => $www_img, - "ICQ" => ( !empty($postrow[$i]['user_icq']) ) ? $postrow[$i]['user_icq'] : " ", - "ICQ_IMG" => ( !empty($postrow[$i]['user_icq']) ) ? $images['icon_icq'] : " ", - "ICQ_STATUS_IMG" => $icq_status_img, - "ICQ_ADD_IMG" => $icq_add_img, - "AIM_IMG" => $aim_img, - "MSN_IMG" => $msn_img, - "YIM_IMG" => $yim_img, - - "EDIT_IMG" => $edit_img, - "QUOTE_IMG" => $quote_img, - "IP_IMG" => $ip_img, - "DELETE_IMG" => $delpost_img, - - "U_MINI_POST" => $mini_post_url, - - "U_POST_ID" => $postrow[$i]['post_id']) + $template->assign_block_vars('postrow', array( + 'ROW_COLOR' => '#' . $row_color, + 'ROW_CLASS' => $row_class, + 'MINI_POST_IMG' => $mini_post_img, + + 'POSTER_NAME' => $poster, + 'POSTER_RANK' => $poster_rank, + 'RANK_IMAGE' => $rank_image, + 'POSTER_JOINED' => $poster_joined, + 'POSTER_POSTS' => $poster_posts, + 'POSTER_FROM' => $poster_from, + 'POSTER_AVATAR' => $poster_avatar, + + 'POST_DATE' => $post_date, + 'POST_SUBJECT' => $post_subject, + 'MESSAGE' => $message, + 'SIGNATURE' => $user_sig, + 'EDITED_MESSAGE' => $l_edited_by, + + 'PROFILE_IMG' => $profile_img, + 'SEARCH_IMG' => $search_img, + 'PM_IMG' => $pm_img, + 'EMAIL_IMG' => $email_img, + 'WWW_IMG' => $www_img, + 'ICQ' => ( !empty($postrow[$i]['user_icq']) ) ? $postrow[$i]['user_icq'] : ' ', + 'ICQ_IMG' => ( !empty($postrow[$i]['user_icq']) ) ? $images['icon_icq'] : ' ', + 'ICQ_STATUS_IMG' => $icq_status_img, + 'ICQ_ADD_IMG' => $icq_add_img, + 'AIM_IMG' => $aim_img, + 'MSN_IMG' => $msn_img, + 'YIM_IMG' => $yim_img, + + 'EDIT_IMG' => $edit_img, + 'QUOTE_IMG' => $quote_img, + 'IP_IMG' => $ip_img, + 'DELETE_IMG' => $delpost_img, + + 'U_MINI_POST' => $mini_post_url, + + 'U_POST_ID' => $postrow[$i]['post_id']) ); } -$template->pparse("body"); +$template->pparse('body'); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); -- cgit v1.2.1