git-svn-id: file:///svn/phpbb/trunk@8624 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2008-06-08 21:44:59 +00:00
parent 6a59f3efd6
commit 1aa40171e0
5 changed files with 23 additions and 26 deletions

View file

@ -1775,7 +1775,7 @@ function redirect($url, $return = false)
{ {
if ($url_parts['host'] !== $user->host) if ($url_parts['host'] !== $user->host)
{ {
$url = generate_board_url(true); $url = generate_board_url();
} }
} }
else if ($url[0] == '/') else if ($url[0] == '/')
@ -1996,7 +1996,7 @@ function meta_refresh($time, $url)
$template->assign_vars(array( $template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="' . $time . ';url=' . $url . '" />') 'META' => '<meta http-equiv="refresh" content="' . $time . ';url=' . $url . '" />')
); );
return $url; 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) function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
{ {
global $db, $user, $template, $auth, $config; global $db, $user, $template, $auth, $config;
$err = ''; $err = '';
@ -2191,7 +2191,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
{ {
$user->setup(); $user->setup();
} }
if (defined('ADMIN_START')) if (defined('ADMIN_START'))
{ {
// Set custom template for admin area // Set custom template for admin area
@ -2411,7 +2411,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
'USERNAME_CREDENTIAL' => 'username', 'USERNAME_CREDENTIAL' => 'username',
'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password', 'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password',
)); ));
if (defined('ADMIN_START')) if (defined('ADMIN_START'))
{ {
$template->set_filenames(array( $template->set_filenames(array(
@ -2431,7 +2431,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
); );
page_header($user->lang['LOGIN'], false); page_header($user->lang['LOGIN'], false);
} }
make_jumpbox(append_sid('viewforum')); make_jumpbox(append_sid('viewforum'));
if (defined('ADMIN_START') && isset($user->data['session_admin']) && $user->data['session_admin']) 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(); page_footer();
} }
} }
/** /**

View file

@ -167,7 +167,7 @@ class mcp_warn
'USERNAME' => $row['username'], 'USERNAME' => $row['username'],
'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '',
'U_USER' => append_sid('memberlist', 'mode=viewprofile&amp;u=' . $row['user_id']), 'U_USER' => append_sid('memberlist', 'mode=viewprofile&amp;u=' . $row['user_id']),
'WARNING_TIME' => $user->format_date($row['user_last_warning']), 'WARNING_TIME' => $user->format_date($row['user_last_warning']),
'WARNINGS' => $row['user_warnings'], 'WARNINGS' => $row['user_warnings'],
)); ));
@ -258,11 +258,11 @@ class mcp_warn
} }
$redirect = append_sid('mcp', "i=notes&amp;mode=user_notes&amp;u=$user_id"); $redirect = append_sid('mcp', "i=notes&amp;mode=user_notes&amp;u=$user_id");
meta_refresh(2, $redirect); meta_refresh(2, $redirect);
trigger_error($user->lang['USER_WARNING_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>')); trigger_error($msg . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
} }
// OK, they didn't submit a warning so lets build the page for them to do so // 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 // We want to make the message available here as a reminder
// Parse the message and subject // Parse the message and subject
$message = censor_text($user_row['post_text']); $message = censor_text($user_row['post_text']);

View file

@ -635,7 +635,6 @@ function compose_pm($id, $mode, $action)
'filename_data' => $message_parser->filename_data, 'filename_data' => $message_parser->filename_data,
'address_list' => $address_list 'address_list' => $address_list
); );
unset($message_parser);
// ((!$message_subject) ? $subject : $message_subject) // ((!$message_subject) ? $subject : $message_subject)
$msg_id = submit_pm($action, $subject, $pm_data); $msg_id = submit_pm($action, $subject, $pm_data);
@ -769,7 +768,6 @@ function compose_pm($id, $mode, $action)
$attachment_data = $message_parser->attachment_data; $attachment_data = $message_parser->attachment_data;
$filename_data = $message_parser->filename_data; $filename_data = $message_parser->filename_data;
$message_text = $message_parser->message; $message_text = $message_parser->message;
unset($message_parser);
// MAIN PM PAGE BEGINS HERE // MAIN PM PAGE BEGINS HERE
@ -891,8 +889,8 @@ function compose_pm($id, $mode, $action)
// Build hidden address list // Build hidden address list
$s_hidden_address_field = build_address_field($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); $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); $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; $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. * Build the hidden field for the recipients. Needed, as the variable is not read via request_var.
*/ */
function build_address_field($address_list) function build_address_field($address_list)

View file

@ -31,8 +31,8 @@ unset($dbpasswd);
*/ */
$convertor_data = array( $convertor_data = array(
'forum_name' => 'phpBB 2.0.x', 'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.0', 'version' => '1.0.2',
'phpbb_version' => '3.0.0', 'phpbb_version' => '3.0.2',
'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>', 'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>',
'dbms' => $dbms, 'dbms' => $dbms,
'dbhost' => $dbhost, 'dbhost' => $dbhost,
@ -191,7 +191,7 @@ if (!$get_info)
{ {
$src_db->sql_freeresult($result); $src_db->sql_freeresult($result);
} }
/** /**
* Tests for further MODs can be included here. * Tests for further MODs can be included here.
@ -265,7 +265,7 @@ if (!$get_info)
* - empty string == execute nothing * - empty string == execute nothing
* - string == function to execute * - string == function to execute
* - array == complex execution instructions * - array == complex execution instructions
* *
* Complex execution instructions: * Complex execution instructions:
* @todo test complex execution instructions - in theory they will work fine * @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 . SEARCH_WORDMATCH_TABLE),
array('target', $convert->truncate_statement . LOG_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. // 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. // Instead every file gets copied while processing the corresponding attachment entry.
// if (defined("MOD_ATTACHMENT")) { import_attachment_files(); phpbb_copy_thumbnails(); } // if (defined("MOD_ATTACHMENT")) { import_attachment_files(); phpbb_copy_thumbnails(); }
@ -489,7 +489,9 @@ if (!$get_info)
array('poll_max_options', 1, ''), array('poll_max_options', 1, ''),
array('poll_vote_change', 0, ''), 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', 'where' => 'topics.topic_moved_id = 0',
), ),
@ -685,7 +687,7 @@ if (!$get_info)
array('user_id', 'users.user_id', 'phpbb_user_id'), array('user_id', 'users.user_id', 'phpbb_user_id'),
array('folder_name', $user->lang['CONV_SAVED_MESSAGES'], ''), array('folder_name', $user->lang['CONV_SAVED_MESSAGES'], ''),
array('pm_count', 0, ''), array('pm_count', 0, ''),
'where' => 'users.user_id <> -1', 'where' => 'users.user_id <> -1',
), ),
@ -709,7 +711,7 @@ if (!$get_info)
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
AND (privmsgs.privmsgs_type = 0 OR privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)', AND (privmsgs.privmsgs_type = 0 OR privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)',
), ),
// Outbox // Outbox
array( array(
'target' => PRIVMSGS_TO_TABLE, 'target' => PRIVMSGS_TO_TABLE,

View file

@ -998,8 +998,6 @@ if ($submit || $preview || $refresh)
$data['topic_replies'] = (int) $post_data['topic_replies']; $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); $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; $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(); $message_parser->decode_message();
$post_data['poll_options'] = explode("\n", $message_parser->message); $post_data['poll_options'] = explode("\n", $message_parser->message);
} }
unset($message_parser);
// MAIN POSTING PAGE BEGINS HERE // MAIN POSTING PAGE BEGINS HERE