Skip to content

Commit

Permalink
MDL-43884 database: Fix get_tables() api for external stores
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal committed Jan 28, 2014
1 parent 0e088ae commit 90ace35
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/dml/mssql_native_moodle_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ public function get_tables($usecache=true) {
if ($result) {
while ($row = mssql_fetch_row($result)) {
$tablename = reset($row);
if ($this->prefix !== '') {
if ($this->prefix !== false && $this->prefix !== '') {
if (strpos($tablename, $this->prefix) !== 0) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/dml/oci_native_moodle_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ public function get_tables($usecache=true) {
oci_free_statement($stmt);
$records = array_map('strtolower', $records['TABLE_NAME']);
foreach ($records as $tablename) {
if ($this->prefix !== '') {
if ($this->prefix !== false && $this->prefix !== '') {
if (strpos($tablename, $this->prefix) !== 0) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/dml/pgsql_native_moodle_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public function get_tables($usecache=true) {
if ($result) {
while ($row = pg_fetch_row($result)) {
$tablename = reset($row);
if ($this->prefix !== '') {
if ($this->prefix !== false && $this->prefix !== '') {
if (strpos($tablename, $this->prefix) !== 0) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/dml/sqlite3_pdo_moodle_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function get_tables($usecache=true) {
foreach ($rstables as $table) {
$table = $table['name'];
$table = strtolower($table);
if ($this->prefix !== '') {
if ($this->prefix !== false && $this->prefix !== '') {
if (strpos($table, $this->prefix) !== 0) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/dml/sqlsrv_native_moodle_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public function get_tables($usecache = true) {
if ($result) {
while ($row = sqlsrv_fetch_array($result)) {
$tablename = reset($row);
if ($this->prefix !== '') {
if ($this->prefix !== false && $this->prefix !== '') {
if (strpos($tablename, $this->prefix) !== 0) {
continue;
}
Expand Down

0 comments on commit 90ace35

Please sign in to comment.