summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-12-22 13:32:02 -0800
committerBharat Mediratta <bharat@menalto.com>2009-12-22 13:32:02 -0800
commit7118f84aa9ae0ece97a41aba4e4d269a1e136df6 (patch)
tree92e02e21299357d60627be50b40c76c98afaa58a
parent8b9a02084a8205fce67860c98ed4ab72b1156a0c (diff)
ORM::factory() in K24 does not allow you to specify an alternate key
for lookup. So instead of doing: ORM::factory("foo", array("some_key" => "some_value")) you have to do: ORM::factory("foo"->where("some_key", "=" "some_value")->find()
-rw-r--r--modules/gallery/helpers/l10n_scanner.php2
-rw-r--r--modules/gallery/helpers/module.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/helpers/l10n_scanner.php b/modules/gallery/helpers/l10n_scanner.php
index d76c4d19..bb7cb449 100644
--- a/modules/gallery/helpers/l10n_scanner.php
+++ b/modules/gallery/helpers/l10n_scanner.php
@@ -42,7 +42,7 @@ class l10n_scanner_Core {
return $cache[$key];
}
- $entry = ORM::factory("incoming_translation", array("key" => $key));
+ $entry = ORM::factory("incoming_translation")->where("key", "=", $key)->find();
if (!$entry->loaded()) {
$entry->key = $key;
$entry->message = serialize($message);
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php
index 71c4efa0..6c7078a3 100644
--- a/modules/gallery/helpers/module.php
+++ b/modules/gallery/helpers/module.php
@@ -51,7 +51,7 @@ class module_Core {
*/
static function get($module_name) {
if (empty(self::$modules[$module_name])) {
- return ORM::factory("module", array("name" => $module_name));
+ return ORM::factory("module")->where("name", "=", $module_name)->find();
}
return self::$modules[$module_name];
}