From 95f3eb3aad3700c883ef6d865ae8d6512883b432 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 22 Oct 2009 07:37:14 -0700 Subject: When an album or photo is updated always return the photo/album location as part of the response. This insures that if the internet address changes, then the page will reload properly. --- modules/gallery/controllers/albums.php | 3 ++- modules/gallery/controllers/photos.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 9733d1cd..ae4ad395 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -216,7 +216,8 @@ class Albums_Controller extends Items_Controller { array("album_title" => html::purify($album->title)))); print json_encode( - array("result" => "success")); + array("result" => "success", + "location" => $album->url())); } else { print json_encode( array("result" => "error", diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php index fbff53ce..6bb5af89 100644 --- a/modules/gallery/controllers/photos.php +++ b/modules/gallery/controllers/photos.php @@ -113,7 +113,8 @@ class Photos_Controller extends Items_Controller { array("photo_title" => html::purify($photo->title)))); print json_encode( - array("result" => "success")); + array("result" => "success", + "location" => $photo->url())); } else { print json_encode( array("result" => "error", -- cgit v1.2.3