From 9b75b85e71b47fc953773544c930f5cecf6b34a7 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 17 Dec 2009 21:05:58 -0800 Subject: Update all database queries such that we can run "php index.php package" and generate the same SQL as before. --- modules/gallery/controllers/packager.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'modules/gallery/controllers/packager.php') diff --git a/modules/gallery/controllers/packager.php b/modules/gallery/controllers/packager.php index d27adf4d..4569e166 100644 --- a/modules/gallery/controllers/packager.php +++ b/modules/gallery/controllers/packager.php @@ -42,7 +42,7 @@ class Packager_Controller extends Controller { // Drop all tables foreach ($db->list_tables() as $table) { - $db->query("DROP TABLE IF EXISTS `$table`"); + $db->query("DROP TABLE IF EXISTS {{$table}}"); } // Clean out data @@ -88,8 +88,9 @@ class Packager_Controller extends Controller { $db->query("TRUNCATE {sessions}"); $db->query("TRUNCATE {logs}"); $db->query("DELETE FROM {vars} WHERE `module_name` = 'gallery' AND `name` = '_cache'"); - $db->update("users", array("password" => ""), array("id" => 1)); - $db->update("users", array("password" => ""), array("id" => 2)); + + db::build()->update("users", array("password" => ""), array("id" => 1))->execute(); + db::build()->update("users", array("password" => ""), array("id" => 2))->execute(); $dbconfig = Kohana::config('database.default'); $conn = $dbconfig["connection"]; -- cgit v1.2.3