|
|
@@ -48,7 +48,8 @@ class TableAcl extends Core_AclBase {
|
|
|
public function getRootTableName() {
|
|
|
if (empty($this->_name)) return null;// throw new Exception("Table name not defined");
|
|
|
if ($this->_rootTableName) return $this->_rootTableName;
|
|
|
- $dbName = DB::getPDO()->getDatabaseName();
|
|
|
+ if (!$this->_db) return null;// throw new Exception("Database not defined in table {$this->_zasobID}");
|
|
|
+ $dbName = DB::getPDO($this->_db)->getDatabaseName();
|
|
|
$this->_rootTableName = DB::getPDO()->fetchValue("
|
|
|
select t.TABLE_NAME
|
|
|
from `information_schema`.`TABLES` t
|