Show
Ignore:
Timestamp:
05/22/08 03:59:31 (8 months ago)
Author:
freakerz
Message:

Fixes #379.\r\nAdding is_connected() and in_transaction() to DB.\r\nUsing the mentioned methods to fix the InstallHandler and save_tags.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/system/classes/databaseconnection.php

    r1737 r1791  
    1616    private $pdo= NULL;                             // handle to the PDO interface 
    1717    private $pdo_statement= NULL;                   // handle for a PDOStatement 
     18    private $pdo_transaction= FALSE;                    // handle for transaction status 
    1819 
    1920    /** 
     
    127128    { 
    128129        return ( NULL != $this->pdo ); 
     130    } 
     131     
     132    /** 
     133     * Check whether there is a transaction underway. 
     134     * 
     135     * @return boolean 
     136     */ 
     137    public function in_transaction() 
     138    { 
     139        return $this->pdo_transaction; 
    129140    } 
    130141 
     
    342353    { 
    343354        $this->pdo->beginTransaction(); 
     355        $this->pdo_transaction= TRUE; 
    344356    } 
    345357 
     
    352364    { 
    353365        $this->pdo->rollBack(); 
     366        $this->pdo_transaction= FALSE; 
    354367    } 
    355368 
     
    360373    { 
    361374        $this->pdo->commit(); 
     375        $this->pdo_transaction= FALSE; 
    362376    } 
    363377