summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/albums.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-12-21 21:27:43 -0800
committerBharat Mediratta <bharat@menalto.com>2009-12-21 21:27:43 -0800
commit8b9a02084a8205fce67860c98ed4ab72b1156a0c (patch)
tree4827cdd337c1e353279ef463aea8104becb063b2 /modules/gallery/controllers/albums.php
parent9285c8c66c530196399eb05bb5561c3fa5538335 (diff)
Updates for the latest version of Kohana 2.4:
1) Controller::$input is gone -- use Input::instance() now 2) Handle new 'database.<default>.connection.params' parameter 3) Handle new 'cache.<default>.prefix' parameter
Diffstat (limited to 'modules/gallery/controllers/albums.php')
-rw-r--r--modules/gallery/controllers/albums.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index 319f1416..2134a419 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -42,7 +42,8 @@ class Albums_Controller extends Items_Controller {
}
}
- $show = $this->input->get("show");
+ $input = Input::instance();
+ $show = $input->get("show");
if ($show) {
$child = ORM::factory("item", $show);
@@ -57,7 +58,7 @@ class Albums_Controller extends Items_Controller {
}
}
- $page = $this->input->get("page", "1");
+ $page = $input->get("page", "1");
$children_count = $album->viewable()->children_count();
$offset = ($page - 1) * $page_size;
$max_pages = max(ceil($children_count / $page_size), 1);
@@ -94,15 +95,16 @@ class Albums_Controller extends Items_Controller {
access::required("view", $album);
access::required("add", $album);
+ $input = Input::instance();
$form = album::get_add_form($album);
if ($form->validate()) {
$new_album = album::create(
$album,
- $this->input->post("name"),
- $this->input->post("title", $this->input->post("name")),
- $this->input->post("description"),
+ $input->post("name"),
+ $input->post("title", $input->post("name")),
+ $input->post("description"),
identity::active_user()->id,
- $this->input->post("slug"));
+ $input->post("slug"));
log::success("content", "Created an album",
html::anchor("albums/$new_album->id", "view album"));