diff options
Diffstat (limited to 'modules/gallery/controllers/photos.php')
| -rw-r--r-- | modules/gallery/controllers/photos.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php index f052eccd..ba4cfb83 100644 --- a/modules/gallery/controllers/photos.php +++ b/modules/gallery/controllers/photos.php @@ -18,7 +18,12 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class Photos_Controller extends Items_Controller { - public function _show($photo) { + public function show($photo) { + if (!is_object($photo)) { + // 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", $photo); $where = array("type != " => "album"); |
