mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
Merge pull request #11 from tractorcow/3.0-unescaped-query-fix
BUG Unescaped query fix
This commit is contained in:
commit
12e2d69c09
@ -1264,7 +1264,7 @@ class PostgreSQLDatabase extends SS_Database {
|
|||||||
public function tableList() {
|
public function tableList() {
|
||||||
$schema_SQL = pg_escape_string($this->dbConn, $this->schema);
|
$schema_SQL = pg_escape_string($this->dbConn, $this->schema);
|
||||||
$tables=array();
|
$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 = strtolower(reset($record));
|
||||||
$table = reset($record);
|
$table = reset($record);
|
||||||
$tables[$table] = $table;
|
$tables[$table] = $table;
|
||||||
|
Loading…
Reference in New Issue
Block a user