Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Convert some database calls.

  • Loading branch information...
commit 4566c299c1d1756fa78bc873a2266c28e047118a 1 parent 064a24b
Bharat Mediratta bharat authored
Showing with 7 additions and 10 deletions.
  1. +7 −10 modules/gallery/controllers/l10n_client.php
17 modules/gallery/controllers/l10n_client.php
View
@@ -113,12 +113,11 @@ private static function _l10n_client_search_form() {
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 @@ public static function l10n_form() {
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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.