MDL-43884 database: Fix get_tables() api for external stores

This commit is contained in:
Ankit Agarwal
2014-01-28 16:50:00 +08:00
parent 686364d1a9
commit d1458fc374
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -341,7 +341,7 @@ class mssql_native_moodle_database extends moodle_database {
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;
}
+1 -1
View File
@@ -415,7 +415,7 @@ class oci_native_moodle_database extends moodle_database {
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;
}
+1 -1
View File
@@ -329,7 +329,7 @@ class pgsql_native_moodle_database extends moodle_database {
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;
}
+1 -1
View File
@@ -148,7 +148,7 @@ class sqlite3_pdo_moodle_database extends pdo_moodle_database {
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;
}
+1 -1
View File
@@ -395,7 +395,7 @@ class sqlsrv_native_moodle_database extends moodle_database {
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;
}