diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-25 12:41:01 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-25 12:46:04 -0800 |
commit | 2d5c232c42ea52e0c1115dd93edafecf1978fbfe (patch) | |
tree | d623dee31d6cf265f2dd09f5083d75ab5a2aae50 /modules/gallery/controllers/photos.php | |
parent | 0bf81f0381ddde2efde55b10e2d73dfdbdca1e73 (diff) |
Refactor the album, movie and photo handling to remove the REST_Controller. Partial fix for ticket #917
Diffstat (limited to 'modules/gallery/controllers/photos.php')
-rw-r--r-- | modules/gallery/controllers/photos.php | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php index 0c2ff6ee..f052eccd 100644 --- a/modules/gallery/controllers/photos.php +++ b/modules/gallery/controllers/photos.php @@ -18,10 +18,6 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class Photos_Controller extends Items_Controller { - - /** - * @see REST_Controller::_show($resource) - */ public function _show($photo) { access::required("view", $photo); @@ -53,12 +49,9 @@ class Photos_Controller extends Items_Controller { print $template; } - - /** - * @see REST_Controller::_update($resource) - */ - public function _update($photo) { + public function update($photo_id) { access::verify_csrf(); + $photo = ORM::factory("item", $photo_id); access::required("view", $photo); access::required("edit", $photo); @@ -125,10 +118,8 @@ class Photos_Controller extends Items_Controller { } } - /** - * @see REST_Controller::_form_edit($resource) - */ - public function _form_edit($photo) { + public function form_edit($photo_id) { + $photo = ORM::factory("item", $photo_id); access::required("view", $photo); access::required("edit", $photo); |