Home » Database » DB_DataObject » Bug #5800
Checks privileges when retrieving tables list
Details
| Submitted | 2005-10-27 21:51 UTC |
|---|---|
| From | skeemer+peardev at gmail dot com |
| Assigned | alan_k |
| Status | Closed |
| Package | DB_DataObject |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-10-27 21:51 UTC] skeemer+peardev at gmail dot com
Description:
------------
DB/Dataproject/Generate halts when it tries to get tableinfo
on a table that doesn't have usage permissions.
This problem arises because in Postgres the getTables()
function returns all tables whether the user has privileges
for them or not.
[2005-10-27 21:59 UTC] skeemer+peardev at gmail dot com
Switch from feature to bug
[2005-10-27 23:49 UTC] skeemer+peardev at gmail dot com
Moved to DB_DataObject
My suggestion is to change in
Generator.php->_CreateTableList():
$defs = $__DB->tableInfo($table);
if (is_a($defs,'PEAR_Error')) {
echo $defs->toString();
exit;
}
to
$defs = $__DB->tableInfo($table);
if (is_a($defs,'PEAR_Error')) {
$this->debug("Ignoring table \"$table\" - ".
$defs->toString());
continue;
}