mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-11 12:16:38 +02:00
- rebuild username_clean column due to changes in utf8_clean_string() git-svn-id: file:///svn/phpbb/trunk@6934 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@ -46,7 +46,7 @@ class dbal_oracle extends dbal
|
|||||||
*/
|
*/
|
||||||
function sql_server_info()
|
function sql_server_info()
|
||||||
{
|
{
|
||||||
return 'Oracle ' . @ociserverversion($this->db_connect_id);
|
return @ociserverversion($this->db_connect_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1580,7 +1580,18 @@ function redirect($url, $return = false)
|
|||||||
if (@preg_match('#Microsoft|WebSTAR|Xitami#', getenv('SERVER_SOFTWARE')))
|
if (@preg_match('#Microsoft|WebSTAR|Xitami#', getenv('SERVER_SOFTWARE')))
|
||||||
{
|
{
|
||||||
header('Refresh: 0; URL=' . $url);
|
header('Refresh: 0; URL=' . $url);
|
||||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $url . '"><title>Redirect</title></head><body><div align="center">' . sprintf($user->lang['URL_REDIRECT'], '<a href="' . $url . '">', '</a>') . '</div></body></html>';
|
|
||||||
|
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
|
||||||
|
echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="' . $user->lang['DIRECTION'] . '" lang="' . $user->lang['USER_LANG'] . '" xml:lang="' . $user->lang['USER_LANG'] . '">';
|
||||||
|
echo '<head>';
|
||||||
|
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
|
||||||
|
echo '<meta http-equiv="refresh" content="0; url=' . $url . '" />';
|
||||||
|
echo '<title>' . $user->lang['REDIRECT'] . '</title>';
|
||||||
|
echo '</head>';
|
||||||
|
echo '<body>';
|
||||||
|
echo '<div style="text-align: center;">' . sprintf($user->lang['URL_REDIRECT'], '<a href="' . $url . '">', '</a>') . '</div>';
|
||||||
|
echo '</body>';
|
||||||
|
echo '</html>';
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -411,7 +411,7 @@ $errored = false;
|
|||||||
<p><?php echo $lang['DATABASE_TYPE']; ?> :: <strong><?php echo $db->sql_layer; ?></strong><br />
|
<p><?php echo $lang['DATABASE_TYPE']; ?> :: <strong><?php echo $db->sql_layer; ?></strong><br />
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// To let set_config() calls success, we need to make the config array available globally
|
// To let set_config() calls succeed, we need to make the config array available globally
|
||||||
$config = array();
|
$config = array();
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . CONFIG_TABLE;
|
FROM ' . CONFIG_TABLE;
|
||||||
@ -627,21 +627,26 @@ if (version_compare($current_version, '3.0.b4', '<='))
|
|||||||
WHERE module_class = 'acp' AND module_mode = 'version_check' AND module_auth = 'acl_a_'";
|
WHERE module_class = 'acp' AND module_mode = 'version_check' AND module_auth = 'acl_a_'";
|
||||||
_sql($sql, $errored, $error_ary);
|
_sql($sql, $errored, $error_ary);
|
||||||
|
|
||||||
// Because the email hash could have been calculated wrongly, we will update it for every user.
|
// Because the email hash could have been calculated wrongly as well as the clean string function changed,
|
||||||
|
// we will update it for every user.
|
||||||
|
|
||||||
// Since this is not used in a live environment there are not much... not used in a live environment, yes!
|
// Since this is not used in a live environment there are not much... not used in a live environment, yes!
|
||||||
$sql = 'SELECT user_id, user_email
|
$sql = 'SELECT user_id, user_email, username
|
||||||
FROM ' . USERS_TABLE;
|
FROM ' . USERS_TABLE;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
|
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||||
|
SET username_clean = '" . $db->sql_escape(utf8_clean_string($row['username'])) . "'";
|
||||||
|
|
||||||
if ($row['user_email'])
|
if ($row['user_email'])
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
$sql .= ', user_email_hash = ' . (crc32($row['user_email']) . strlen($row['user_email']));
|
||||||
SET user_email_hash = ' . (crc32($row['user_email']) . strlen($row['user_email'])) . '
|
|
||||||
WHERE user_id = ' . $row['user_id'];
|
|
||||||
_sql($sql, $errored, $error_ary);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$sql .= ' WHERE user_id = ' . $row['user_id'];
|
||||||
|
_sql($sql, $errored, $error_ary);
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
@ -1355,6 +1360,12 @@ function add_bots()
|
|||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// If the old bots are missing we can safely assume the user tries to execute the database update twice and
|
||||||
|
// fiddled around...
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!function_exists('user_add'))
|
if (!function_exists('user_add'))
|
||||||
{
|
{
|
||||||
|
@ -416,11 +416,12 @@ class install_install extends module
|
|||||||
$fp = @fopen($phpbb_root_path . $dir . 'test_lock', 'wb');
|
$fp = @fopen($phpbb_root_path . $dir . 'test_lock', 'wb');
|
||||||
if ($fp !== false)
|
if ($fp !== false)
|
||||||
{
|
{
|
||||||
@unlink($phpbb_root_path . $dir . 'test_lock');
|
|
||||||
$write = true;
|
$write = true;
|
||||||
}
|
}
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
|
|
||||||
|
@unlink($phpbb_root_path . $dir . 'test_lock');
|
||||||
|
|
||||||
$passed['files'] = ($exists && $write && $passed['files']) ? true : false;
|
$passed['files'] = ($exists && $write && $passed['files']) ? true : false;
|
||||||
|
|
||||||
$exists = ($exists) ? '<b style="color:green">' . $lang['FOUND'] . '</b>' : '<b style="color:red">' . $lang['NOT_FOUND'] . '</b>';
|
$exists = ($exists) ? '<b style="color:green">' . $lang['FOUND'] . '</b>' : '<b style="color:red">' . $lang['NOT_FOUND'] . '</b>';
|
||||||
|
@ -406,6 +406,7 @@ $lang = array_merge($lang, array(
|
|||||||
'READ_PROFILE' => 'Profile',
|
'READ_PROFILE' => 'Profile',
|
||||||
'REASON' => 'Reason',
|
'REASON' => 'Reason',
|
||||||
'RECORD_ONLINE_USERS' => 'Most users ever online was <strong>%1$s</strong> on %2$s',
|
'RECORD_ONLINE_USERS' => 'Most users ever online was <strong>%1$s</strong> on %2$s',
|
||||||
|
'REDIRECT' => 'Redirect',
|
||||||
'REDIRECTS' => 'Total redirects',
|
'REDIRECTS' => 'Total redirects',
|
||||||
'REGISTER' => 'Register',
|
'REGISTER' => 'Register',
|
||||||
'REGISTERED_USERS' => 'Registered users:',
|
'REGISTERED_USERS' => 'Registered users:',
|
||||||
|
Reference in New Issue
Block a user