Changeset 745

Show
Ignore:
Timestamp:
08/25/08 17:01:16 (3 months ago)
Author:
zak
Message:

- Added selecting $db object in Lister, setSource method

Zak

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/Lister.php

    r549 r745  
    88 
    99    public $current_row=array();    // this is data of a current row 
    10     function setSource($table,$db_fields=null){ 
    11         if(!$this->api->db)throw new BaseException('DB must be initialized if you want to use Lister / setSource'); 
    12         $this->dq = $this->api->db->dsql(); 
     10    function setSource($table,$db_fields=null,$db = null){ 
     11        if((!$this->api->db) && (!$db))throw new BaseException('DB must be initialized if you want to use Lister / setSource'); 
     12        $this->dq = $db ? $db->dsql() : $this->api->db->dsql(); 
    1313        $this->api->addHook('pre-render',array($this,'execQuery')); 
    1414