1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

Fixes #1220 - corrupted database table list when using 'e_' prefix.

This commit is contained in:
Cameron
2015-11-26 12:48:16 -08:00
parent 4bef86fb87
commit d4a9813d65

View File

@@ -1960,11 +1960,13 @@ class e_db_mysql
if(!$this->mySQLtableList) if(!$this->mySQLtableList)
{ {
$table = array(); $table = array();
if($res = $this->db_Query("SHOW TABLES LIKE '".$this->mySQLPrefix."%' ")) if($res = $this->db_Query("SHOW TABLES LIKE '".$this->mySQLPrefix."%' "))
{ {
$length = strlen($this->mySQLPrefix);
while($rows = $this->fetch(MYSQL_NUM)) while($rows = $this->fetch(MYSQL_NUM))
{ {
$table[] = str_replace($this->mySQLPrefix,"",$rows[0]); $table[] = substr($rows[0],$length);
} }
} }
return $table; return $table;