summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/movies.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-12-04 11:42:37 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-12-04 11:42:37 -0800
commit8ca69cffbba70fe22e19478f742a37bdbd758d83 (patch)
tree712a69eef7d134d7ad2ea2668d30fda44914beff /modules/gallery/controllers/movies.php
parent5743b159c28888f2165cc4269d3302fea24fde7a (diff)
parent5c107be9033ae48f781c8430702458f613e791ee (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/controllers/movies.php')
-rw-r--r--modules/gallery/controllers/movies.php23
1 files changed, 10 insertions, 13 deletions
diff --git a/modules/gallery/controllers/movies.php b/modules/gallery/controllers/movies.php
index 2e2e837c..575b2b60 100644
--- a/modules/gallery/controllers/movies.php
+++ b/modules/gallery/controllers/movies.php
@@ -18,11 +18,12 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class Movies_Controller extends Items_Controller {
-
- /**
- * @see REST_Controller::_show($resource)
- */
- public function _show($movie) {
+ public function show($movie) {
+ if (!is_object($movie)) {
+ // show() must be public because we route to it in url::parse_url(), so make
+ // sure that we're actually receiving an object
+ Kohana::show_404();
+ }
access::required("view", $movie);
$where = array("type != " => "album");
@@ -53,11 +54,9 @@ class Movies_Controller extends Items_Controller {
print $template;
}
- /**
- * @see REST_Controller::_update($resource)
- */
- public function _update($movie) {
+ public function update($movie_id) {
access::verify_csrf();
+ $movie = ORM::factory("item", $movie_id);
access::required("view", $movie);
access::required("edit", $movie);
@@ -120,10 +119,8 @@ class Movies_Controller extends Items_Controller {
}
}
- /**
- * @see REST_Controller::_form_edit($resource)
- */
- public function _form_edit($movie) {
+ public function form_edit($movie_id) {
+ $movie = ORM::factory("item", $movie_id);
access::required("view", $movie);
access::required("edit", $movie);
print movie::get_edit_form($movie);