diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-25 13:22:24 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-25 13:22:24 -0800 |
commit | 2e420522ece22942a9b3b6ee413ca0e1dfa76148 (patch) | |
tree | fd4732002d64e230b04f348941f969c52f763d03 /modules/tag | |
parent | e201536d82d6ed49b7c4832f367a01029de05dd6 (diff) |
Preliminary work to cut over to Kohana 2.4
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
Diffstat (limited to 'modules/tag')
-rw-r--r-- | modules/tag/controllers/admin_tags.php | 8 | ||||
-rw-r--r-- | modules/tag/helpers/tag.php | 2 | ||||
-rw-r--r-- | modules/tag/helpers/tag_event.php | 2 | ||||
-rw-r--r-- | modules/tag/helpers/tag_rss.php | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/modules/tag/controllers/admin_tags.php b/modules/tag/controllers/admin_tags.php index 67587c2e..93b51814 100644 --- a/modules/tag/controllers/admin_tags.php +++ b/modules/tag/controllers/admin_tags.php @@ -35,7 +35,7 @@ class Admin_Tags_Controller extends Admin_Controller { public function form_delete($id) { $tag = ORM::factory("tag", $id); - if ($tag->loaded) { + if ($tag->loaded()) { print tag::get_delete_form($tag); } } @@ -44,7 +44,7 @@ class Admin_Tags_Controller extends Admin_Controller { access::verify_csrf(); $tag = ORM::factory("tag", $id); - if (!$tag->loaded) { + if (!$tag->loaded()) { kohana::show_404(); } @@ -68,7 +68,7 @@ class Admin_Tags_Controller extends Admin_Controller { public function form_rename($id) { $tag = ORM::factory("tag", $id); - if ($tag->loaded) { + if ($tag->loaded()) { print InPlaceEdit::factory($tag->name) ->action("admin/tags/rename/$id") ->render(); @@ -79,7 +79,7 @@ class Admin_Tags_Controller extends Admin_Controller { access::verify_csrf(); $tag = ORM::factory("tag", $id); - if (!$tag->loaded) { + if (!$tag->loaded()) { kohana::show_404(); } diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index feaf40c5..6ce18625 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -34,7 +34,7 @@ class tag_Core { } $tag = ORM::factory("tag")->where("name", $tag_name)->find(); - if (!$tag->loaded) { + if (!$tag->loaded()) { $tag->name = $tag_name; $tag->count = 0; $tag->save(); diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index a857a99d..6ee8e708 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -51,7 +51,7 @@ class tag_event_Core { try { tag::add($photo, $tag); } catch (Exception $e) { - Kohana::log("error", "Error adding tag: $tag\n" . + Kohana_Log::add("error", "Error adding tag: $tag\n" . $e->getMessage() . "\n" . $e->getTraceAsString()); } } diff --git a/modules/tag/helpers/tag_rss.php b/modules/tag/helpers/tag_rss.php index de5d6c72..03017dc3 100644 --- a/modules/tag/helpers/tag_rss.php +++ b/modules/tag/helpers/tag_rss.php @@ -31,7 +31,7 @@ class tag_rss_Core { static function feed($feed_id, $offset, $limit, $id) { if ($feed_id == "tag") { $tag = ORM::factory("tag", $id); - if (!$tag->loaded) { + if (!$tag->loaded()) { Kohana::show_404(); } $feed->children = $tag->items($limit, $offset, "photo"); |