diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-12-16 09:24:38 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-12-16 09:24:38 -0800 |
commit | 4566c299c1d1756fa78bc873a2266c28e047118a (patch) | |
tree | 7971daf96031dcc72275500c849ef7c13d62650b | |
parent | 064a24b897880e4dbf4dafeb756406bbd907bdba (diff) |
Convert some database calls.
-rw-r--r-- | modules/gallery/controllers/l10n_client.php | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/modules/gallery/controllers/l10n_client.php b/modules/gallery/controllers/l10n_client.php index 30a18631..71df1cf1 100644 --- a/modules/gallery/controllers/l10n_client.php +++ b/modules/gallery/controllers/l10n_client.php @@ -113,12 +113,11 @@ class L10n_Client_Controller extends Controller { public static function l10n_form() { if (Input::instance()->get("show_all_l10n_messages")) { $calls = array(); - foreach (Database::instance() + foreach (db::build() ->select("key", "message") ->from("incoming_translations") - ->where("locale", "=", "root")) - ->get() - ->as_array() as $row) { + ->where("locale", "=", "root") + ->execute() as $row) { $calls[$row->key] = array(unserialize($row->message), array()); } } else { @@ -128,21 +127,19 @@ class L10n_Client_Controller extends Controller { if ($calls) { $translations = array(); - foreach (Database::instance() + foreach (db::build() ->select("key", "translation") ->from("incoming_translations") ->where("locale", "=", $locale) - ->get() - ->as_array() as $row) { + ->execute() as $row) { $translations[$row->key] = unserialize($row->translation); } // Override incoming with outgoing... - foreach (Database::instance() + foreach (db::build() ->select("key", "translation") ->from("outgoing_translations") ->where("locale", "=", $locale) - ->get() - ->as_array() as $row) { + ->execute() as $row) { $translations[$row->key] = unserialize($row->translation); } |