Changeset 2399

Show
Ignore:
Timestamp:
03/12/2008 01:15:01 PM (10 months ago)
Author:
xue
Message:

fixed #741.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/HISTORY

    r2398 r2399  
    2323CHG: Active Record no longer automatically performs adding/removing/updating related objects (Qiang) 
    2424CHG: TJavaScript::encode() will encode data as a list if integer indices are detected (Qiang) 
    25 ENH: Ticket#722 - Add Read Only capabilities to TInPlaceTextBox (Christophe) 
     25ENH: Ticket#722 - Added Read Only capabilities to TInPlaceTextBox (Christophe) 
     26ENH: Ticket#741 - Added CDbConnection.currentTransaction property (Qiang) 
    2627ENH: Ticket#743 - Added status code header in HTTP response when in error (Qiang) 
    2728ENH: Ticket#783 - Added date/time type support to soap implementation (Hongliang) 
  • trunk/framework/Data/TDbConnection.php

    r2386 r2399  
    8686        private $_active=false; 
    8787        private $_pdo=null; 
     88        private $_transaction; 
    8889 
    8990        /** 
     
    251252 
    252253        /** 
     254         * @return CDbTransaction the currently active transaction. Null if no active transaction. 
     255         */ 
     256        public function getCurrentTransaction() 
     257        { 
     258                if($this->_transaction!==null) 
     259                { 
     260                        if($this->_transaction->getActive()) 
     261                                return $this->_transaction; 
     262                } 
     263                return null; 
     264        } 
     265 
     266        /** 
    253267         * Starts a transaction. 
    254268         * @return TDbTransaction the transaction initiated 
     
    260274                { 
    261275                        $this->_pdo->beginTransaction(); 
    262                         return new TDbTransaction($this); 
     276                        return $this->_transaction=new TDbTransaction($this); 
    263277                } 
    264278                else