We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c925624 commit 8b539a6Copy full SHA for 8b539a6
1 file changed
system/Database/BaseConnection.php
@@ -1528,7 +1528,9 @@ public function listTables(bool $constrainByPrefix = false)
1528
// Is there a cached result?
1529
if (isset($this->dataCache['table_names']) && $this->dataCache['table_names'])
1530
{
1531
- return $this->dataCache['table_names'];
+ return $constrainByPrefix ?
1532
+ preg_grep("/^{$this->DBPrefix}/", $this->dataCache['table_names'])
1533
+ : $this->dataCache['table_names'];
1534
}
1535
1536
if (false === ($sql = $this->_listTables($constrainByPrefix)))
0 commit comments