From da73c0c25f406ccef8351be06ab30fd0d71977b8 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Thu, 22 Oct 2009 23:36:05 -0600 Subject: Poor man's merge. Note to self, git pull before working. Next pound the steps to merge into your head. --- modules/gallery/controllers/photos.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/gallery/controllers/photos.php') diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php index fbff53ce..54cd63c6 100644 --- a/modules/gallery/controllers/photos.php +++ b/modules/gallery/controllers/photos.php @@ -100,6 +100,8 @@ class Photos_Controller extends Items_Controller { } if ($valid) { + $watching_album = $photo->url() != ($location = parse_url(request::referrer(), PHP_URL_PATH)); + $photo->title = $form->edit_item->title->value; $photo->description = $form->edit_item->description->value; $photo->slug = $form->edit_item->slug->value; @@ -113,7 +115,8 @@ class Photos_Controller extends Items_Controller { array("photo_title" => html::purify($photo->title)))); print json_encode( - array("result" => "success")); + array("result" => "success", + "location" => $watching_album ? $location : $photo->url())); } else { print json_encode( array("result" => "error", -- cgit v1.2.3