} else {
- $jt = DB_DataObject::factory('Person');
+ $person = 'Person';
+ $cfg = HTML_FlexyFramework::get()->Pman;
+ if (!empty($cfg['authTable'])) {
+ $person =$cfg['authTable'];
+ }
+
+ $jt = DB_DataObject::factory($person);
$this->whereAdd("
person_table = '{$jt->tableName()}'
OR
//DB_DataObject::debugLevel(1);
$this->_extra_cols = array('qty' , 'uqty');
$this->selectAdd("count($tn.id) as qty");
-// $this->selectAdd("count( distinct $tn.on_table, $tn.on_id) as uqty");
- $this->selectAdd("count($tn.on_id) as uqty");
+ $this->selectAdd("count( distinct $tn.on_table, $tn.on_id) as uqty");
$this->groupBy('on_table');
}