Merge pull request #11 from tractorcow/3.0-unescaped-query-fix

BUG Unescaped query fix
This commit is contained in:
Sam Minnée 2012-11-15 18:49:15 -08:00
commit 12e2d69c09

View File

@ -1264,7 +1264,7 @@ class PostgreSQLDatabase extends SS_Database {
public function tableList() {
$schema_SQL = pg_escape_string($this->dbConn, $this->schema);
$tables=array();
foreach($this->query("SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = '{$schema_SQL}' AND tablename NOT ILIKE 'pg_%' AND tablename NOT ILIKE 'sql_%'") as $record) {
foreach($this->query("SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = '{$schema_SQL}' AND tablename NOT ILIKE 'pg\_%' AND tablename NOT ILIKE 'sql\_%'") as $record) {
//$table = strtolower(reset($record));
$table = reset($record);
$tables[$table] = $table;