mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
some corrections to let the update work flawlessly.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8475 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
976e83351a
commit
b2521b83b1
3 changed files with 22 additions and 4 deletions
|
@ -311,10 +311,25 @@ class session
|
||||||
$sql_ary['session_forum_id'] = $this->page['forum'];
|
$sql_ary['session_forum_id'] = $this->page['forum'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db->sql_return_on_error(true);
|
||||||
|
|
||||||
|
$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
|
||||||
|
WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$db->sql_return_on_error(false);
|
||||||
|
|
||||||
|
// If the database is not yet updated, there will be an error due to the session_forum_id
|
||||||
|
// @todo REMOVE for 3.0.2
|
||||||
|
if ($result === false)
|
||||||
|
{
|
||||||
|
unset($sql_ary['session_forum_id']);
|
||||||
|
|
||||||
$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
|
$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
|
||||||
WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
|
WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->data['is_registered'] = ($this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == USER_NORMAL || $this->data['user_type'] == USER_FOUNDER)) ? true : false;
|
$this->data['is_registered'] = ($this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == USER_NORMAL || $this->data['user_type'] == USER_FOUNDER)) ? true : false;
|
||||||
$this->data['is_bot'] = (!$this->data['is_registered'] && $this->data['user_id'] != ANONYMOUS) ? true : false;
|
$this->data['is_bot'] = (!$this->data['is_registered'] && $this->data['user_id'] != ANONYMOUS) ? true : false;
|
||||||
|
|
|
@ -1625,7 +1625,8 @@ _sql($sql, $errored, $error_ary);
|
||||||
|
|
||||||
// Reset permissions
|
// Reset permissions
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||||
SET user_permissions = ''";
|
SET user_permissions = '',
|
||||||
|
user_perm_from = 0";
|
||||||
_sql($sql, $errored, $error_ary);
|
_sql($sql, $errored, $error_ary);
|
||||||
|
|
||||||
/* Optimize/vacuum analyze the tables where appropriate
|
/* Optimize/vacuum analyze the tables where appropriate
|
||||||
|
@ -1659,6 +1660,8 @@ _write_result($no_updates, $errored, $error_ary);
|
||||||
|
|
||||||
if (!$inline_update)
|
if (!$inline_update)
|
||||||
{
|
{
|
||||||
|
// Purge the cache...
|
||||||
|
$cache->purge();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p style="color:red"><?php echo $lang['UPDATE_FILES_NOTICE']; ?></p>
|
<p style="color:red"><?php echo $lang['UPDATE_FILES_NOTICE']; ?></p>
|
||||||
|
|
Loading…
Add table
Reference in a new issue