diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-12-17 21:05:58 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-12-17 21:05:58 -0800 |
commit | 9b75b85e71b47fc953773544c930f5cecf6b34a7 (patch) | |
tree | 0c0f369260a39481790d6b16531350e7034c287f /modules/gallery/controllers/packager.php | |
parent | 2aba8c4bffed5fb38689d5ed998c486ab6bde902 (diff) |
Update all database queries such that we can run "php index.php
package" and generate the same SQL as before.
Diffstat (limited to 'modules/gallery/controllers/packager.php')
-rw-r--r-- | modules/gallery/controllers/packager.php | 7 |
1 files changed, 4 insertions, 3 deletions
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"]; |