From e476774709b5e8e1559879509f9932628c29348b Mon Sep 17 00:00:00 2001 From: diosmosis <benakamoorthi@fastmail.fm> Date: Sat, 5 Jul 2014 00:11:44 -0700 Subject: [PATCH] Fix build for no tables_prefix on travis change. --- core/Db.php | 2 +- tests/PHPUnit/IntegrationTestCase.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/Db.php b/core/Db.php index 826a4afa12..fb2161ac1d 100644 --- a/core/Db.php +++ b/core/Db.php @@ -338,7 +338,7 @@ class Db $tables = array($tables); } - return self::query("DROP TABLE " . implode(',', $tables)); + return self::query("DROP TABLE `" . implode('`,`', $tables) . "`"); } /** diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php index ff44b7dbb2..5d00f6b0d2 100755 --- a/tests/PHPUnit/IntegrationTestCase.php +++ b/tests/PHPUnit/IntegrationTestCase.php @@ -1002,7 +1002,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase $rowsSql[] = "(" . implode(',', $values) . ")"; } - $sql = "INSERT INTO $table VALUES " . implode(',', $rowsSql); + $sql = "INSERT INTO `$table` VALUES " . implode(',', $rowsSql); Db::query($sql, $bind); } } @@ -1013,7 +1013,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase public static function deleteArchiveTables() { foreach (ArchiveTableCreator::getTablesArchivesInstalled() as $table) { - Db::query("DROP TABLE IF EXISTS $table"); + Db::query("DROP TABLE IF EXISTS `$table`"); } ArchiveTableCreator::refreshTableList($forceReload = true); -- GitLab