From d4a9813d65b210a319828bbeb1f5a6b17690cc71 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 26 Nov 2015 12:48:16 -0800 Subject: [PATCH] Fixes #1220 - corrupted database table list when using 'e_' prefix. --- e107_handlers/mysql_class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php index cc6c3e948..c7cc3b078 100644 --- a/e107_handlers/mysql_class.php +++ b/e107_handlers/mysql_class.php @@ -1960,11 +1960,13 @@ class e_db_mysql if(!$this->mySQLtableList) { $table = array(); + if($res = $this->db_Query("SHOW TABLES LIKE '".$this->mySQLPrefix."%' ")) { + $length = strlen($this->mySQLPrefix); while($rows = $this->fetch(MYSQL_NUM)) { - $table[] = str_replace($this->mySQLPrefix,"",$rows[0]); + $table[] = substr($rows[0],$length); } } return $table;