Skip to content

Commit

Permalink
Merge branch 'hotfix/dump_db'
Browse files Browse the repository at this point in the history
  • Loading branch information
osben committed Mar 7, 2016
2 parents 10d946c + 9edf0e0 commit 62542c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit 62542c6

Please sign in to comment.