mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
ok, this one is rather large... the most important change:
re-introduce append_sid: old style continues to work, not a performance hog as it was in 2.0.x -> structure is different apart from this, code cleanage, bug fixing, etc. git-svn-id: file:///svn/phpbb/trunk@6015 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -120,6 +120,48 @@ class dbal
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL Transaction
|
||||
* @private
|
||||
*/
|
||||
function sql_transaction($status = 'begin')
|
||||
{
|
||||
switch ($status)
|
||||
{
|
||||
case 'begin':
|
||||
// Commit previously opened transaction before opening another transaction
|
||||
if ($this->transaction)
|
||||
{
|
||||
$this->_sql_transaction('commit');
|
||||
}
|
||||
|
||||
$result = $this->_sql_transaction('begin');
|
||||
$this->transaction = true;
|
||||
break;
|
||||
|
||||
case 'commit':
|
||||
$result = $this->_sql_transaction('commit');
|
||||
$this->transaction = false;
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
$this->_sql_transaction('rollback');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'rollback':
|
||||
$result = $this->_sql_transaction('rollback');
|
||||
$this->transaction = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
$result = $this->_sql_transaction($status);
|
||||
break;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build sql statement from array for insert/update/select statements
|
||||
*
|
||||
@@ -328,7 +370,7 @@ class dbal
|
||||
*/
|
||||
function sql_report($mode, $query = '')
|
||||
{
|
||||
global $cache, $starttime, $phpbb_root_path, $user, $SID;
|
||||
global $cache, $starttime, $phpbb_root_path, $user;
|
||||
|
||||
if (empty($_GET['explain']))
|
||||
{
|
||||
|
Reference in New Issue
Block a user