[分享]phpBB 2.0.5-2.0.6 差異點

與 phpBB 2.0.x 相關主題。

版主: 版主管理群

蒼浩
竹貓好朋友
竹貓好朋友
文章: 62
註冊時間: 2002-02-26 22:21
來自: 遊戲炸彈
聯繫:

[分享]phpBB 2.0.5-2.0.6 差異點

文章 蒼浩 »

以下文字顏色的說明:
藍色:改變
紅色:追加
棕色:刪除\r
  • /login.php

    Line 9,版本號變更\r

    代碼: 選擇全部

     *   $Id: login.php,v [color=blue]1.47.2.13 2003/06/20 07:40:27[/color] acydburn Exp $
    Line 58
    2.0.5

    代碼: 選擇全部

    		$username = substr(str_replace("\'", "'", $username), 0, 25);
    2.0.6

    代碼: 選擇全部

    		$username = substr(str_replace("[color=blue]\\\[/color]'", "'", $username), 0, 25);
    		[color=red]$username = str_replace("'", "\\\'", $username);[/color]
    Line 63
    2.0.5

    代碼: 選擇全部

    			WHERE username = '" . str_replace("\'", "''", $username) . "'";
    2.0.6

    代碼: 選擇全部

    			WHERE username = '" . str_replace("[color=blue]\\\[/color]'", "''", $username) . "'";
  • /modcp.php

    Line 9,版本號變更\r

    代碼: 選擇全部

     *   $Id: modcp.php,v [color=blue]1.71.2.21 2003/07/26 11:41:35[/color] acydburn Exp $
    Line 229
    2.0.5

    代碼: 選擇全部

    				$topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . $topics[$i];
    			}
    2.0.6

    代碼: 選擇全部

    				$topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . [color=blue]intval($topics[$i])[/color];
    			}
    同時,在下面加上

    代碼: 選擇全部

    			$sql = "SELECT topic_id 
    				FROM " . TOPICS_TABLE . "
    				WHERE topic_id IN ($topic_id_sql)
    					AND forum_id = $forum_id";
    			if ( !($result = $db->sql_query($sql)) )
    			{
    				message_die(GENERAL_ERROR, 'Could not get topic id information', '', __LINE__, __FILE__, $sql);
    			}
    			
    			$topic_id_sql = '';
    			while ($row = $db->sql_fetchrow($result))
    			{
    				$topic_id_sql .= (($topic_id_sql != '') ? ', ' : '') . intval($row['topic_id']);
    			}
    			$db->sql_freeresult($result);
    
    Line 272
    2.0.5

    代碼: 選擇全部

    				$post_id_sql .= ( ( $post_id_sql != '' ) ? ', ' : '' ) . $row['post_id'];
    2.0.6

    代碼: 選擇全部

    				$post_id_sql .= ( ( $post_id_sql != '' ) ? ', ' : '' ) . [color=blue]intval($row['post_id'])[/color];
    Line 436
    2.0.5

    代碼: 選擇全部

    			$new_forum_id = $HTTP_POST_VARS['new_forum'];
    2.0.6

    代碼: 選擇全部

    			$new_forum_id = [color=blue]intval($HTTP_POST_VARS['new_forum'])[/color];
    Line 451
    尋找\r

    代碼: 選擇全部

    					WHERE topic_id IN ($topic_list) 
    在下面加入\r

    代碼: 選擇全部

    						AND forum_id = $old_forum_id
    Line 585
    2.0.5

    代碼: 選擇全部

    			$topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . $topics[$i];
    2.0.6

    代碼: 選擇全部

    			$topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . [color=blue]intval($topics[$i])[/color];
    在下面不遠處尋找\r

    代碼: 選擇全部

    		$sql = "UPDATE " . TOPICS_TABLE . " 
    			SET topic_status = " . TOPIC_LOCKED . " 
    			WHERE topic_id IN ($topic_id_sql)
    在下面加入\r

    代碼: 選擇全部

    				AND forum_id = $forum_id
    Line 629
    2.0.5

    代碼: 選擇全部

    			$topic_id_sql .= ( ( $topic_id_sql != "") ? ', ' : '' ) . $topics[$i];
    2.0.6

    代碼: 選擇全部

    			$topic_id_sql .= ( ( $topic_id_sql != "") ? ', ' : '' ) . [color=blue]intval($topics[$i])[/color];
    在下面不遠處尋找\r

    代碼: 選擇全部

    		$sql = "UPDATE " . TOPICS_TABLE . " 
    			SET topic_status = " . TOPIC_UNLOCKED . " 
    			WHERE topic_id IN ($topic_id_sql)
    在下面加入\r

    代碼: 選擇全部

    				AND forum_id = $forum_id
    尋找\r

    代碼: 選擇全部

    			$sql = "SELECT post_id, poster_id, topic_id, post_time
    				FROM " . POSTS_TABLE . "
    				WHERE post_id IN ($post_id_sql) 
    				ORDER BY post_time ASC";
    			if (!($result = $db->sql_query($sql)))
    在上面加入\r

    代碼: 選擇全部

    			$sql = "SELECT post_id 
    				FROM " . POSTS_TABLE . "
    				WHERE post_id IN ($post_id_sql)
    					AND forum_id = $forum_id";
    			if ( !($result = $db->sql_query($sql)) )
    			{
    				message_die(GENERAL_ERROR, 'Could not get post id information', '', __LINE__, __FILE__, $sql);
    			}
    			
    			$post_id_sql = '';
    			while ($row = $db->sql_fetchrow($result))
    			{
    				$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']);
    			}
    			$db->sql_freeresult($result);
    Line 904
    2.0.5

    代碼: 選擇全部

    			WHERE post_id = $post_id";
    2.0.6

    代碼: 選擇全部

    			[color=blue]WHERE post_id = $post_id[/color]
    				[color=red]AND forum_id = $forum_id[/color]";
    請注意「";」。
  • /search.php

    Line 9,版本號變更\r

    代碼: 選擇全部

     *   $Id: search.php,v [color=blue]1.72.2.10 2003/07/11 17:04:31 psotfx[/color] Exp $
    尋找\r

    代碼: 選擇全部

    					//
    					// If the board has HTML off but the post has HTML
    					// on then we process it, else leave it alone
    					//
    					if ( $return_chars != -1 )
    					{
    						$message = strip_tags($message);
    						$message = preg_replace("/\[.*?:$bbcode_uid:?.*?\]/si", '', $message);
    						$message = preg_replace('/\[url\]|\[\/url\]/si', '', $message);
    						$message = ( strlen($message) > $return_chars ) ? substr($message, 0, $return_chars) . ' ...' : $message;
    
    						[color=brown]if ( count($search_string) )
    						{
    							$message = preg_replace($search_string, $replace_string, $message);
    						}[/color]
    					}
    刪除其中的

    代碼: 選擇全部

    						[color=brown]if ( count($search_string) )
    						{
    							$message = preg_replace($search_string, $replace_string, $message);
    						}[/color]
  • /viewtopic.php

    Line 9,版本號變更\r

    代碼: 選擇全部

     *   $Id: viewtopic.php,v [color=blue]1.186.2.32 2003/06/20 16:34:58 psotfx[/color] Exp $
    尋找\r

    代碼: 選擇全部

    //
    // Start initial var setup
    //
    在下面加上

    代碼: 選擇全部

    $topic_id = $post_id = 0;
    Line 105,尋找\r
    2.0.5

    代碼: 選擇全部

    		$sql = "SELECT t.topic_id
    			[color=blue]FROM " . TOPICS_TABLE . " t, " . TOPICS_TABLE . " t2, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2
    			WHERE t2.topic_id = $topic_id
    				AND p2.post_id = t2.topic_last_post_id[/color]
    				AND t.forum_id = t2.forum_id
    				[color=blue]AND p.post_id = t.topic_last_post_id
    				AND p.post_time $sql_condition p2.post_time[/color]
    				[color=brown]AND p.topic_id = t.topic_id
    			ORDER BY p.post_time $sql_ordering[/color]
    			LIMIT 1";
    2.0.6

    代碼: 選擇全部

    		$sql = "SELECT t.topic_id
    			FROM " . TOPICS_TABLE . " t, " . TOPICS_TABLE . " t2
    			WHERE
    				t2.topic_id = $topic_id
    				AND t.forum_id = t2.forum_id
    				AND t.topic_last_post_id $sql_condition t2.topic_last_post_id
    			ORDER BY t.topic_last_post_id $sql_ordering
    			LIMIT 1";
    Line 137
    2.0.5

    代碼: 選擇全部

    $join_sql_table = ( !isset($post_id) ) ? '' : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 ";
    $join_sql = ( !isset($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";
    $count_sql = ( !isset($post_id) ) ? '' : ", COUNT(p2.post_id) AS prev_posts";
    
    $order_sql = ( !isset($post_id) ) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC";
    2.0.6

    代碼: 選擇全部

    $join_sql_table = ( [color=blue]empty[/color]($post_id) ) ? '' : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 ";
    $join_sql = ( [color=blue]empty[/color]($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";
    $count_sql = ( [color=blue]empty[/color]($post_id) ) ? '' : ", COUNT(p2.post_id) AS prev_posts";
    
    $order_sql = ( [color=blue]empty[/color]($post_id) ) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC";
  • /admin/admin_styles.php

    Line 9,版本號變更\r

    代碼: 選擇全部

     *   $Id: admin_styles.php,v [color=blue]1.27.2.11 2003/06/26 00:08:17[/color] psotfx Exp $
    在下面不遠處尋找\r

    代碼: 選擇全部

    //
    // Load default header
    //
    //
    // Check if the user has cancled a confirmation message.
    //
    $phpbb_root_path = "./../";
    在下面加上

    代碼: 選擇全部

    require($phpbb_root_path . 'extension.inc');
    Line 46
    2.0.5

    代碼: 選擇全部

    if (empty($HTTP_POST_VARS['send_file']))
    {
    	$no_page_header = ( $cancel ) ? TRUE : FALSE;
    	equire($phpbb_root_path . 'extension.inc');
    	require('./pagestart.' . $phpEx);
    }
    2.0.6

    代碼: 選擇全部

    $no_page_header = (!empty($HTTP_POST_VARS['send_file']) || $cancel) ? TRUE : FALSE;
    
    require('./pagestart.' . $phpEx);
  • /admin/admin_users.php

    Line 9,版本號變更\r
    2.0.5

    代碼: 選擇全部

     *   $Id: admin_users.php,v [color=blue]1.57.2.25 2003/06/20 07:40:27[/color] acydburn Exp $
    Line 319
    2.0.5

    代碼: 選擇全部

    				else if ( strtolower(str_replace("\'", "''", $username)) == strtolower($userdata['username']) )
    2.0.6

    代碼: 選擇全部

    				else if ( strtolower(str_replace("[color=blue]\\\[/color]'", "''", $username)) == strtolower($userdata['username']) )
    Line 328
    2.0.5

    代碼: 選擇全部

    				$username_sql = "username = '" . str_replace("\'", "''", $username) . "', ";
    2.0.6

    代碼: 選擇全部

    				$username_sql = "username = '" . str_replace("[color=blue]\\\[/color]'", "''", $username) . "', ";
  • /admin/index.php

    Line 9,版本號變更\r

    代碼: 選擇全部

     *   $Id: index.php,v [color=blue]1.40.2.5 2003/08/03 11:50:51[/color] acydburn Exp $
    Line 458
    2.0.5

    代碼: 選擇全部

    					"U_WHOIS_IP" => "http://www.geektools.com/cgi-bin/proxy.cgi?query=$reg_ip&targetnic=auto", 
    2.0.6

    代碼: 選擇全部

    					"U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$reg_ip", 
    Line 550
    2.0.5

    代碼: 選擇全部

    				"U_WHOIS_IP" => "http://www.geektools.com/cgi-bin/proxy.cgi?query=$guest_ip&targetnic=auto", 
    2.0.6

    代碼: 選擇全部

    				"U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$guest_ip", 
  • /includes/emailer.php

    Line 9,版本號變更\r

    代碼: 選擇全部

        $Id: emailer.php,v [color=blue]1.15.2.33 2003/07/18 16:34:01[/color] acydburn Exp $
    在下面不遠處尋找\r

    代碼: 選擇全部

    	function emailer($use_smtp)
    	{
    		$this->reset();
    		$this->use_smtp = $use_smtp;
    	}
    在 } 之前加上一行

    代碼: 選擇全部

    		$this->reply_to = $this->from = '';
    Line 45
    2.0.5

    代碼: 選擇全部

    		$this->vars = $this->msg = $this->extra_headers = $this->replyto = $this->from = '';
    2.0.6

    代碼: 選擇全部

    		$this->vars = $this->msg = $this->extra_headers = '';
    在下面不遠處尋找\r

    代碼: 選擇全部

    	// Sets an email address to send to
    	function email_address($address, $realname = '')
    	{
    		$pos = sizeof($this->addresses['to']);
    		$this->addresses['to'][$pos]['email'] = trim($address);
    		$this->addresses['to'][$pos]['name'] = trim($realname);
    	}
    
    	function cc($address, $realname = '')
    	{
    		$pos = sizeof($this->addresses['cc']);
    		$this->addresses['cc'][$pos]['email'] = trim($address);
    		$this->addresses['cc'][$pos]['name'] = trim($realname);
    	}
    
    	function bcc($address, $realname = '')
    	{
    		$pos = sizeof($this->addresses['bcc']);
    		$this->addresses['bcc'][$pos]['email'] = trim($address);
    		$this->addresses['bcc'][$pos]['name'] = trim($realname);
    	}
    改為\r

    代碼: 選擇全部

    	// Sets an email address to send to
    	function email_address($address)
    	{
    		$this->addresses['to'] = trim($address);
    	}
    
    	function cc($address)
    	{
    		$this->addresses['cc'][] = trim($address);
    	}
    
    	function bcc($address)
    	{
    		$this->addresses['bcc'][] = trim($address);
    	}
    在下面不遠處尋找\r

    代碼: 選擇全部

    	function replyto($address)
    	{
    		$this->replyto = trim($address);
    	}
    改為\r

    代碼: 選擇全部

    	function replyto($address)
    	{
    		$this->[color=blue]reply_to[/color] = trim($address);
    	}
    在下面不遠處尋找\r

    代碼: 選擇全部

    	// set up subject for mail
    	function set_subject($subject = '')
    	{
    		$this->subject = trim($subject);
    	}
    改為\r

    代碼: 選擇全部

    	// set up subject for mail
    	function set_subject($subject = '')
    	{
    		$this->subject = [color=blue]trim(preg_replace('#[
    
    ]+#s', '', $subject))[/color];
    	}
    Line 194,尋找\r
    2.0.5

    代碼: 選擇全部

    		$to = $cc = $bcc = '';
    		// Build to, cc and bcc strings
    		@reset($this->addresses);
    		while (list($type, $address_ary) = each($this->addresses))
    		{
    			@reset($address_ary);
    			while (list(, $which_ary) = each($address_ary))
    			{
    				$$type .= (($$type != '') ? ',' : '') . (($which_ary['name'] != '') ? '"' . $this->encode($which_ary['name']) . '" <' . $which_ary['email'] . '>' : '<' . $which_ary['email'] . '>');
    			}
    		}
    
    		// Build header
    		$this->extra_headers = (($this->replyto != '') ? "Reply-to: <$this->replyto>
    " : '') . (($this->from != '') ? "From: <$this->from>
    " : "From: <" . $board_config['board_email'] . ">
    ") . "Return-Path: <" . $board_config['board_email'] . ">
    Message-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">
    MIME-Version: 1.0
    Content-type: text/plain; charset=" . $this->encoding . "
    Content-transfer-encoding: 8bit
    Date: " . gmdate('D, d M Y H:i:s Z', time()) . "
    X-Priority: 3
    X-MSMail-Priority: Normal
    X-Mailer: PHP
    X-MimeOLE: Produced By phpBB2
    " . trim($this->extra_headers) . (($cc != '') ? "Cc:$cc
    " : '')  . (($bcc != '') ? "Bcc:$bcc
    " : ''); 
    
    		$empty_to_header = ($to == '') ? TRUE : FALSE;
    		$to = ($to == '') ? (($board_config['sendmail_fix'] && !$this->use_smtp) ? ' ' : 'Undisclosed-recipients:;') : $to;
    2.0.6

    代碼: 選擇全部

    		$to = $this->addresses['to'];
    
    		$cc = (count($this->addresses['cc'])) ? implode(', ', $this->addresses['cc']) : '';
    		$bcc = (count($this->addresses['bcc'])) ? implode(', ', $this->addresses['bcc']) : '';
    
    		// Build header
    		$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to
    " : '') . (($this->from != '') ? "From: $this->from
    " : "From: " . $board_config['board_email'] . "
    ") . "Return-Path: " . $board_config['board_email'] . "
    Message-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">
    MIME-Version: 1.0
    Content-type: text/plain; charset=" . $this->encoding . "
    Content-transfer-encoding: 8bit
    Date: " . date('r', time()) . "
    X-Priority: 3
    X-MSMail-Priority: Normal
    X-Mailer: PHP
    X-MimeOLE: Produced By phpBB2
    " . $this->extra_headers . (($cc != '') ? "Cc: $cc
    " : '')  . (($bcc != '') ? "Bcc: $bcc
    " : ''); 
    在下面不遠處尋找\r

    代碼: 選擇全部

    		// Send message ... removed $this->encode() from subject for time being
    		if ( $this->use_smtp )
    		{
    			if ( !defined('SMTP_INCLUDED') ) 
    			{
    				include($phpbb_root_path . 'includes/smtp.' . $phpEx);
    			}
    
    			$result = smtpmail($to, $this->subject, $this->msg, $this->extra_headers);
    		}
    		else
    		{
    在下面加上

    代碼: 選擇全部

    			$empty_to_header = ($to == '') ? TRUE : FALSE;
    			$to = ($to == '') ? (($board_config['sendmail_fix']) ? ' ' : 'Undisclosed-recipients:;') : $to;
    	
    Line 276
    2.0.5

    代碼: 選擇全部

    		$str = preg_replace('#' . phpbb_preg_quote($spacer) . '$#', '', $str);
    2.0.6

    代碼: 選擇全部

    		$str = preg_replace('#' . phpbb_preg_quote[color=blue]($spacer, '#')[/color] . '$#', '', $str);
  • /includes/functions.php

    Line 9,版本號變更\r

    代碼: 選擇全部

     *   $Id: functions.php,v [color=blue]1.133.2.31 2003/07/20 13:14:27 acydburn[/color] Exp $
    Line 87
    2.0.5

    代碼: 選擇全部

    		$user = substr(str_replace("\'", "'", $user), 0, 25);
    2.0.6

    代碼: 選擇全部

    		$user = substr(str_replace("[color=blue]\\\[/color]'", "'", $user), 0, 25);
    		[color=red]$user = str_replace("'", "\\\'", $user);[/color]
    Line 506
    2.0.5

    代碼: 選擇全部

    			$orig_word[] = '#(' . str_replace('\*', '\w*?', phpbb_preg_quote($row['word'], '#')) . ')#i';
    2.0.6

    代碼: 選擇全部

    			$orig_word[] = '[color=blue]#\b[/color](' . str_replace('\*', '\w*?', phpbb_preg_quote($row['word'], '#')) . ')[color=blue]\b#i[/color]';
  • /includes/functions_post.php

    Line 9,版本號變更\r

    代碼: 選擇全部

     *   $Id: functions_post.php,v [color=blue]1.9.2.34 2003/06/09 15:45:10[/color] psotfx Exp $
    Line 77
    2.0.5

    代碼: 選擇全部

    						$tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[\t ]*?=|on[\w]+[\t ]*?=)#i', $hold_string)) ? false : true;
    2.0.6

    代碼: 選擇全部

    						$tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[ ]*?=|on[\w]+[ ]*?=)#i', $hold_string)) ? false : true;
    Line 94
    2.0.5

    代碼: 選擇全部

    		if (!$end_html || ($end_html != strlen($message) && $tmp_message != ''))
    2.0.6

    代碼: 選擇全部

    		if ($end_html != strlen($message) && $tmp_message != '')
  • /includes/functions_search.php

    Line 9,版本號變更\r

    代碼: 選擇全部

    *     $Id: functions_search.php,v [color=blue]1.8.2.16 2003/06/30 17:18:37[/color] acydburn Exp $
    Line 60
    2.0.5

    代碼: 選擇全部

    		// 'words' that consist of <3 or >20 characters are removed.
    		[color=blue]$entry = explode(' ', $entry);[/color]
    		[color=brown]for ($i = 0; $i < sizeof($entry); $i++)
    		{
    			$entry[$i] = trim($entry[$i]);
    			if ((strlen($entry[$i]) < 3) || (strlen($entry[$i]) > 20))
    			{
    				$entry[$i] = '';
    			}
    		}
    		$entry = implode(' ', $entry);[/color]
    	}
    2.0.6

    代碼: 選擇全部

    		// 'words' that consist of <3 or >20 characters are removed.
    		$entry = preg_replace('/[ ]([\S]{1,2}|[\S]{21,})[ ]/',' ', $entry);
    	}
    Line 110
    2.0.5

    代碼: 選擇全部

    	$split_entries = array();
    	$split = explode(' ', $entry);
    	for ($i = 0; $i < count($split); $i++)
    	{
    		if (trim($split[$i]) != '')
    		{
    			$split_entries[] = trim($split[$i]);
    		}
    	}
    
    	return $split_entries;
    2.0.6

    代碼: 選擇全部

    	// Trim 1+ spaces to one space and split this trimmed string into words.
    	return explode(' ', trim(preg_replace('#\s+#', ' ', $entry)));
    在下面不遠處尋找\r

    代碼: 選擇全部

    function add_search_words($mode, $post_id, $post_text, $post_title = '')
    {
    	global $db, $phpbb_root_path, $board_config, $lang;
    
    	$stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt"); 
    	$synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_synonyms.txt"); 
    
    	$search_raw_words = array();
    	$search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopword_array, $synonym_array));
    	$search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array));
    在下面加上

    代碼: 選擇全部

    	@set_time_limit(0);
    Line 259
    2.0.5

    代碼: 選擇全部

    			$sql = "INSERT INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match) 
    2.0.6

    代碼: 選擇全部

    			$sql = "INSERT IGNORE INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match) 
  • /includes/smtp.php

    Line 9,版本號變更\r

    代碼: 選擇全部

     *   $Id: smtp.php,v [color=blue]1.16.2.9 2003/07/18 16:34:01[/color] acydburn Exp $
    Line 93
    2.0.5

    代碼: 選擇全部

    		$cc = explode(',', $cc);
    		$bcc = explode(',', $bcc);
    2.0.6

    代碼: 選擇全部

    		$cc = explode(', ', $cc);
    		$bcc = explode(', ', $bcc);
    Line 107
    尋找並刪除這一行

    代碼: 選擇全部

    	$mail_to_array = explode(',', $mail_to);
    Line 146
    2.0.5

    代碼: 選擇全部

    	// Specify each user to send to and build to header.
    	@reset($mail_to_array);
    	while(list(, $mail_to_address) = each($mail_to_array))
    2.0.6

    代碼: 選擇全部

    	// Specify each user to send to and build to header.
    	$to_header = '';
    
    	// Add an additional bit of error checking to the To field.
    	$mail_to = (trim($mail_to) == '') ? 'Undisclosed-recipients:;' : trim($mail_to);
    	if (preg_match('#[^ ]+\@[^ ]+#', $mail_to))
    在下面一行尋找\r
    2.0.5

    代碼: 選擇全部

    	{
    		// Add an additional bit of error checking to the To field.
    		$mail_to_address = trim($mail_to_address);
    		if (preg_match('#[^ ]+\@[^ ]+#', $mail_to_address))
    		{
    			fputs($socket, "RCPT TO: $mail_to_address
    ");
    			server_parse($socket, "250", __LINE__);
    		}
    		$to_header .= (($to_header !='') ? ', ' : '') . "$mail_to_address";
    	}
    2.0.6

    代碼: 選擇全部

    	{
    		fputs($socket, "RCPT TO: <$mail_to>
    ");
    		server_parse($socket, "250", __LINE__);
    	}
    Line 168
    2.0.5

    代碼: 選擇全部

    			fputs($socket, "RCPT TO: $bcc_address
    ");
    2.0.6

    代碼: 選擇全部

    			fputs($socket, "RCPT TO: <$bcc_address>
    ");
    Line 180
    2.0.5

    代碼: 選擇全部

    			fputs($socket, "RCPT TO: $cc_address
    ");
    2.0.6

    代碼: 選擇全部

    			fputs($socket, "RCPT TO: <$cc_address>
    ");
    Line 195
    2.0.5

    代碼: 選擇全部

    	fputs($socket, "To: $to_header
    ");
    2.0.6

    代碼: 選擇全部

    	fputs($socket, "To: $mail_to
    ");
  • /includes/usercp_register.php

    Line 9,版本號變更\r

    代碼: 選擇全部

     *   $Id: usercp_register.php,v [color=blue]1.20.2.54 2003/07/18 16:34:01 acydburn[/color] Exp $
    Line 167
    尋找\r

    代碼: 選擇全部

    $user_timezone = ( isset($HTTP_POST_VARS['timezone']) ) ? doubleval($HTTP_POST_VARS['timezone']) : $board_config['board_timezone'];
    在下面加上

    代碼: 選擇全部

    	$sql = "SELECT config_value
    		FROM " . CONFIG_TABLE . "
    		WHERE config_name = 'default_dateformat'";
    	if ( !($result = $db->sql_query($sql)) )
    	{
    		message_die(GENERAL_ERROR, 'Could not select default dateformat', '', __LINE__, __FILE__, $sql);
    	}
    	$row = $db->sql_fetchrow($result);
    	$board_config['default_dateformat'] = $row['config_value'];
    Line 615
    2.0.5

    代碼: 選擇全部

    			if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN )
    			{
    				$sql = "SELECT user_email
    2.0.6

    代碼: 選擇全部

    			if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN )
    			{
    				[color=blue]$sql = "SELECT user_email, user_lang[/color] 
    在下面不遠處尋找\r

    代碼: 選擇全部

    				while ($row = $db->sql_fetchrow($result))
    				{
    					$emailer->bcc(trim($row['user_email']));
    				}
    
    				$emailer->use_template("admin_activate", $board_config['default_lang']);
    				$emailer->email_address($lang['New_account_subject'] . ':;');
    				$emailer->set_subject($lang['New_account_subject']);
    
    				$emailer->assign_vars(array(
    					'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
    					'EMAIL_SIG' => str_replace('<br />', "
    ", "-- 
    " . $board_config['board_email_sig']),
    
    					'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
    				);
    				$emailer->send();
    				$emailer->reset();
    			}
    改為\r

    代碼: 選擇全部

    				while ($row = $db->sql_fetchrow($result))
    				{
    					$emailer->from($board_config['board_email']);
    					$emailer->replyto($board_config['board_email']);
    					
    					$emailer->email_address(trim($row['user_email']));
    					$emailer->use_template("admin_activate", $row['user_lang']);
    					$emailer->set_subject($lang['New_account_subject']);
    
    					$emailer->assign_vars(array(
    						'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
    						'EMAIL_SIG' => str_replace('<br />', "
    ", "-- 
    " . $board_config['board_email_sig']),
    
    						'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
    					);
    					$emailer->send();
    					$emailer->reset();
    				}
    				$db->sql_freeresult($result);
    			}
到此完成,語系檔以及布景主題的部分沒有任何變動。
最後由 蒼浩 於 2003-08-05 21:34 編輯,總共編輯了 4 次。
WeiChou
星球普通子民
星球普通子民
文章: 10
註冊時間: 2003-07-31 02:03

Re: [分享]phpBB 2.0.5-2.0.6 差異點

文章 WeiChou »

謝謝解說!
剛剛在看 phpBB-2.0.5_to_2.0.6.patch 這個檔,但是看不太懂語法
現在對照著看,清楚多了 ~~ :mrgreen:
暖洋
星球普通子民
星球普通子民
文章: 7
註冊時間: 2003-07-03 16:55

Re: [分享]phpBB 2.0.5-2.0.6 差異點

文章 暖洋 »

真是辛苦您了,把update的步驟作的如此詳細 :-D
照做之後,目前一切還算正常

但在我逐步修改的過程中,有些小狀況,特在此提出供大家參考
(我原先的版本為2.0.5)
蒼浩 寫:
  • /admin/admin_styles.php

    在下面不遠處尋找\r

    代碼: 選擇全部

    //
    // Load default header
    //
    //
    // Check if the user has cancled a confirmation message.
    //
    $phpbb_root_path = "./../";
    在下面加上

    代碼: 選擇全部

    require($phpbb_root_path . 'extension.inc');
    Line 46
    2.0.5

    代碼: 選擇全部

    if (empty($HTTP_POST_VARS['send_file']))
    {
    	$no_page_header = ( $cancel ) ? TRUE : FALSE;
    	equire($phpbb_root_path . 'extension.inc');
    	require('./pagestart.' . $phpEx);
    }
    2.0.6

    代碼: 選擇全部

    $no_page_header = (!empty($HTTP_POST_VARS['send_file']) || $cancel) ? TRUE : FALSE;
    
    require('./pagestart.' . $phpEx);
上面兩段系統原先就改好了,不知是不是我之前安裝過的MOD改的... :?:
蒼浩 寫:
  • /includes/functions_search.php

    Line 110
    2.0.5

    代碼: 選擇全部

    	$split_entries = array();
    	$split = explode(' ', $entry);
    	[color=brown]for ($i = 0; $i < count($split); $i++)
    	{
    		if (trim($split[$i]) != '')
    		{
    			$split_entries[] = trim($split[$i]);
    		}
    	}
    
    	return $split_entries;[/color]
    2.0.6

    代碼: 選擇全部

    	// Trim 1+ spaces to one space and split this trimmed string into words.
    	return explode(' ', trim(preg_replace('#\s+#', ' ', $entry)));
這裡應該是單純的「尋找--取代」,那為何還要以「棕色」標記原先部分區域? :roll:
蒼浩 寫:
  • /includes/smtp.php

    Line 195
    2.0.5

    代碼: 選擇全部

    	fputs($socket, "To: $to_header
    ");
找不到這段,我這邊的情況只能找到\r

代碼: 選擇全部

	fputs($socket, "$to_header
");
但應該無妨吧 :-P
暖洋
星球普通子民
星球普通子民
文章: 7
註冊時間: 2003-07-03 16:55

文章 暖洋 »

另外請問一下,是否我只要把上面的步驟完成,就算完整升級到2.0.6呢?
因為我看下載回來的patch壓縮檔裡面還有不少的檔案...
另外mySQL的table是否也要更新?
linekin
星球普通子民
星球普通子民
文章: 21
註冊時間: 2003-05-05 07:19

文章 linekin »

contrib裡面有可以選擇要不要用的快取系統, 跟註冊時須輸入圖片數字的MOD
bu
版面管理員
版面管理員
文章: 443
註冊時間: 2003-02-23 12:46
來自: 25° 4′N 121° 29′E
聯繫:

文章 bu »

每次您的動作都很快呢 ^^
*譯文資料在phpBB 技術文件
bu.femto-size
*和我聯絡,請寄 or Google Talk 圖檔
*作品: Intergrated Toplist & Message Can
蒼浩
竹貓好朋友
竹貓好朋友
文章: 62
註冊時間: 2002-02-26 22:21
來自: 遊戲炸彈
聯繫:

Re: [分享]phpBB 2.0.5-2.0.6 差異點

文章 蒼浩 »

暖洋 寫:上面兩段系統原先就改好了,不知是不是我之前安裝過的MOD改的... :?:
官方網站在釋出 2.0.5 時有公布 admin_styles.php 這個檔案潛在的安全性問題以及修正方法。2.0.6 版修正了這個問題。
暖洋 寫:這裡應該是單純的「尋找--取代」,那為何還要以「棕色」標記原先部分區域? :roll:
你說的沒錯,我作了多餘的事 :oops:
暖洋 寫:找不到這段,我這邊的情況只能找到\r

代碼: 選擇全部

	fputs($socket, "$to_header
");
但應該無妨吧 :-P
2.0.5 版是這樣的

代碼: 選擇全部

	// Now the To Header.
	fputs($socket, "To: $to_header
");
如果是同一列數(Line 195)、同一註解(// Now the To Header),那應該就沒問題。
蒼浩
竹貓好朋友
竹貓好朋友
文章: 62
註冊時間: 2002-02-26 22:21
來自: 遊戲炸彈
聯繫:

文章 蒼浩 »

暖洋 寫:另外請問一下,是否我只要把上面的步驟完成,就算完整升級到2.0.6呢?
因為我看下載回來的patch壓縮檔裡面還有不少的檔案...
另外mySQL的table是否也要更新?
在 phpBB-2.0.6-files.zip 這個檔案中,有個 install 這個目錄,你應該把這個目錄以及其中的檔案完全上傳到 phpBB 的目錄下,然後透過瀏覽器去開啟(舉例)
http://網址/phpBB2/install/update_to_206.php
這個檔案,來更新資料庫。

(說明文件是這樣說的 :P
Mowd
竹貓忠實會員
竹貓忠實會員
文章: 326
註冊時間: 2002-06-26 01:17
來自: 台北
聯繫:

文章 Mowd »

事實上如果你的系統是unix,可以利用patch完成動作,不用手動改。
暖洋
星球普通子民
星球普通子民
文章: 7
註冊時間: 2003-07-03 16:55

文章 暖洋 »

不想用patch完成動作的原因,主要是怕因為MOD裝太多,不知會出什麼問題
手動改雖累,但至少比較踏實點... :-D

附帶請問一下,每頁最下面的Powered by phpBB 2.0.0 © 2001 phpBB Group,其中的版號要如何改?
找了半天就是找不到PHP_VERSION的值...... :-|
蒼浩
竹貓好朋友
竹貓好朋友
文章: 62
註冊時間: 2002-02-26 22:21
來自: 遊戲炸彈
聯繫:

文章 蒼浩 »

..............不會吧????
你每次更新 phpBB 都沒有更新資料庫??

我之前說的
http://網址/phpBB2/install/update_to_206.php
這個檔案的其中一個用途就是更新版本號。
暖洋
星球普通子民
星球普通子民
文章: 7
註冊時間: 2003-07-03 16:55

文章 暖洋 »

我這是第一次更新phpBB....
那個2.0.0的字樣,是從竹貓下面複製的啦
阿維
竹貓忠實會員
竹貓忠實會員
文章: 868
註冊時間: 2003-02-23 13:36
來自: 台南市

文章 阿維 »

那如果我是從2.0.5+MOD改成2.0.6那在資料庫整個程式都是升級成2.0.6了嗎?
提供代客維護 phpBB 3.0.x 以及外掛/風格升級或安裝的服務,如需委託,請與我聯絡,謝謝! ;)
我的 Skype 帳號:gpxjordan
頭像
BUE
星球普通子民
星球普通子民
文章: 21
註冊時間: 2002-04-14 00:28
來自: 寒冷的淡水
聯繫:

文章 BUE »

推一下,這個2.06是一定要修改的,尤其是裝2.05版本的人,
2.05裡面有滿多bug的,比如說無法發信給所有會員,
我更新完到2.06就沒這個問題了!!
道可道,非常道

名可名,非常名


一個在竹貓打混的會員~_~||
頭像
BUE
星球普通子民
星球普通子民
文章: 21
註冊時間: 2002-04-14 00:28
來自: 寒冷的淡水
聯繫:

文章 BUE »

發現從phpbb_plus1.2升級到2.06會有一個小問題,當新註冊者註冊完系統要發信的時候
會出現下面的訊息:\r

Ran into problems sending Mail. Response: 503 5.0.0 Need RCPT (recipient)

DEBUG MODE

Line : 185
File : /var/www/html/thsnew/includes/smtp.php

不過我檢查過卻是emailer.php這個檔的問題,不知道是phpbb_plus1.2裡哪一個檔
跟2.06沖到了,請各位大大幫忙檢查一下!!
道可道,非常道

名可名,非常名


一個在竹貓打混的會員~_~||
回覆文章

回到「2.0」