From 9edf0e0b58221abe41c507262d4f472c06035737 Mon Sep 17 00:00:00 2001 From: Erko Evgen Date: Mon, 7 Mar 2016 02:55:06 +0200 Subject: [PATCH] dump DB, table name without the prefix --- api/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/Database.php b/api/Database.php index 77ed30a..954bb37 100755 --- a/api/Database.php +++ b/api/Database.php @@ -442,7 +442,7 @@ private function dump_table($table, $h) $result = $this->mysqli->query($sql); if($result) { - $table_no_prefix = preg_replace('/([^"\'0-9a-z_])'.$this->config->db_prefix.'([a-z_]+[^"\'])/i', "\$1__\$2", $table); + $table_no_prefix = preg_replace('/^('.$this->config->db_prefix.')/i', "__", $table); fwrite($h, "/* Data for table $table_no_prefix */\n"); fwrite($h, "TRUNCATE TABLE `$table_no_prefix`;\n");