diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-15 11:28:05 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-15 11:28:05 -0800 |
commit | 5809949ae8ff87cd5acf56c528e6dc2af6619513 (patch) | |
tree | 813441f20488f8f5de58d6d83cd322cbcdbc4658 | |
parent | 94f58e8b65b78cafed8f07f70a48b7b271cfc212 (diff) |
Don't use Input directly to get album names, etc. Use the form fields.
-rw-r--r-- | modules/gallery/controllers/albums.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 8ad3ff72..9f8c16ea 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -95,16 +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, - $input->post("name"), - $input->post("title", $input->post("name")), - $input->post("description"), + $form->add_album->inputs["name"]->value, + $form->add_album->title->value ? + $form->add_album->title->value : $form->add_album->inputs["name"]->value, + $form->add_album->description->value, identity::active_user()->id, - $input->post("slug")); + $form->add_album->slug->value); log::success("content", "Created an album", html::anchor("albums/$new_album->id", "view album")); |