From 72b32efdb64dee84f78f251d2d52e95784001c8d Mon Sep 17 00:00:00 2001 From: acydburn Date: Sun, 8 Jun 2008 21:44:59 +0000 Subject: [PATCH] merge... git-svn-id: http://code.phpbb.com/svn/phpbb/trunk@8624 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 14 +++++++------- phpBB/includes/mcp/mcp_warn.php | 6 +++--- phpBB/includes/ucp/ucp_pm_compose.php | 8 +++----- phpBB/install/convertors/convert_phpbb20.php | 18 ++++++++++-------- phpBB/posting.php | 3 --- 5 files changed, 23 insertions(+), 26 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4a42d4a21..3e1b3cf90 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1775,7 +1775,7 @@ function redirect($url, $return = false) { if ($url_parts['host'] !== $user->host) { - $url = generate_board_url(true); + $url = generate_board_url(); } } else if ($url[0] == '/') @@ -1996,7 +1996,7 @@ function meta_refresh($time, $url) $template->assign_vars(array( 'META' => '') ); - + return $url; } @@ -2182,7 +2182,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true) { global $db, $user, $template, $auth, $config; - + $err = ''; @@ -2191,7 +2191,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa { $user->setup(); } - + if (defined('ADMIN_START')) { // Set custom template for admin area @@ -2411,7 +2411,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'USERNAME_CREDENTIAL' => 'username', 'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password', )); - + if (defined('ADMIN_START')) { $template->set_filenames(array( @@ -2431,7 +2431,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa ); page_header($user->lang['LOGIN'], false); } - + make_jumpbox(append_sid('viewforum')); if (defined('ADMIN_START') && isset($user->data['session_admin']) && $user->data['session_admin']) { @@ -2441,7 +2441,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa { page_footer(); } - + } /** diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index 1ca40cb84..4d38d05b5 100644 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -167,7 +167,7 @@ class mcp_warn 'USERNAME' => $row['username'], 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', 'U_USER' => append_sid('memberlist', 'mode=viewprofile&u=' . $row['user_id']), - + 'WARNING_TIME' => $user->format_date($row['user_last_warning']), 'WARNINGS' => $row['user_warnings'], )); @@ -258,11 +258,11 @@ class mcp_warn } $redirect = append_sid('mcp', "i=notes&mode=user_notes&u=$user_id"); meta_refresh(2, $redirect); - trigger_error($user->lang['USER_WARNING_ADDED'] . '

' . sprintf($user->lang['RETURN_PAGE'], '', '')); + trigger_error($msg . '

' . sprintf($user->lang['RETURN_PAGE'], '', '')); } // OK, they didn't submit a warning so lets build the page for them to do so - + // We want to make the message available here as a reminder // Parse the message and subject $message = censor_text($user_row['post_text']); diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 298fd6ef1..cfdb7c65b 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -635,7 +635,6 @@ function compose_pm($id, $mode, $action) 'filename_data' => $message_parser->filename_data, 'address_list' => $address_list ); - unset($message_parser); // ((!$message_subject) ? $subject : $message_subject) $msg_id = submit_pm($action, $subject, $pm_data); @@ -769,7 +768,6 @@ function compose_pm($id, $mode, $action) $attachment_data = $message_parser->attachment_data; $filename_data = $message_parser->filename_data; $message_text = $message_parser->message; - unset($message_parser); // MAIN PM PAGE BEGINS HERE @@ -891,8 +889,8 @@ function compose_pm($id, $mode, $action) // Build hidden address list $s_hidden_address_field = build_address_field($address_list); - - + + $bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : (($config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode')) ? !$user->optionget('bbcode') : 1); $smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : (($config['allow_smilies'] && $auth->acl_get('u_pm_smilies')) ? !$user->optionget('smilies') : 1); $urls_checked = (isset($enable_urls)) ? !$enable_urls : 0; @@ -1113,7 +1111,7 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove } } -/** +/** * Build the hidden field for the recipients. Needed, as the variable is not read via request_var. */ function build_address_field($address_list) diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index eb7166743..3b62abacb 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -31,8 +31,8 @@ unset($dbpasswd); */ $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', - 'version' => '1.0.0', - 'phpbb_version' => '3.0.0', + 'version' => '1.0.2', + 'phpbb_version' => '3.0.2', 'author' => 'phpBB Group', 'dbms' => $dbms, 'dbhost' => $dbhost, @@ -191,7 +191,7 @@ if (!$get_info) { $src_db->sql_freeresult($result); } - + /** * Tests for further MODs can be included here. @@ -265,7 +265,7 @@ if (!$get_info) * - empty string == execute nothing * - string == function to execute * - array == complex execution instructions -* +* * Complex execution instructions: * @todo test complex execution instructions - in theory they will work fine * @@ -307,7 +307,7 @@ if (!$get_info) array('target', $convert->truncate_statement . SEARCH_WORDMATCH_TABLE), array('target', $convert->truncate_statement . LOG_TABLE), ), - + // with this you are able to import all attachment files on the fly. For large boards this is not an option, therefore commented out by default. // Instead every file gets copied while processing the corresponding attachment entry. // if (defined("MOD_ATTACHMENT")) { import_attachment_files(); phpbb_copy_thumbnails(); } @@ -489,7 +489,9 @@ if (!$get_info) array('poll_max_options', 1, ''), array('poll_vote_change', 0, ''), - 'left_join' => 'topics LEFT JOIN vote_desc ON topics.topic_id = vote_desc.topic_id AND topics.topic_vote = 1', + 'left_join' => array ( 'topics LEFT JOIN vote_desc ON topics.topic_id = vote_desc.topic_id AND topics.topic_vote = 1', + 'topics LEFT JOIN posts ON topics.topic_last_post_id = posts.post_id', + ), 'where' => 'topics.topic_moved_id = 0', ), @@ -685,7 +687,7 @@ if (!$get_info) array('user_id', 'users.user_id', 'phpbb_user_id'), array('folder_name', $user->lang['CONV_SAVED_MESSAGES'], ''), array('pm_count', 0, ''), - + 'where' => 'users.user_id <> -1', ), @@ -709,7 +711,7 @@ if (!$get_info) 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id AND (privmsgs.privmsgs_type = 0 OR privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)', ), - + // Outbox array( 'target' => PRIVMSGS_TO_TABLE, diff --git a/phpBB/posting.php b/phpBB/posting.php index af7e26d0d..076a9d764 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -998,8 +998,6 @@ if ($submit || $preview || $refresh) $data['topic_replies'] = (int) $post_data['topic_replies']; } - unset($message_parser); - $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message); $post_need_approval = (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? true : false; @@ -1155,7 +1153,6 @@ if (sizeof($post_data['poll_options']) && $post_data['poll_title']) $message_parser->decode_message(); $post_data['poll_options'] = explode("\n", $message_parser->message); } -unset($message_parser); // MAIN POSTING PAGE BEGINS HERE -- 2.11.4.GIT