When deleting a photo, return to the folder/album listing instead of
taking you to the photo in the trash folder. Fixes #379.
This commit is contained in:
parent
fcbad21d54
commit
09522ea807
1
CHANGES
1
CHANGES
|
@ -15,6 +15,7 @@ For further information about Photo Organizer, see its web site at:
|
|||
[misc] Unified the permission tests in the export code.
|
||||
[fix] Rotating images could lead to a blank page. [#377]
|
||||
[fix] Two memcache-related bugs.
|
||||
[misc] When deleting a photo, return to the folder listing. [#379]
|
||||
|
||||
2.36 (August 17, 2008)
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ $version_id = pg_escape_string($_REQUEST['version']);
|
|||
$destination_folder = pg_escape_string($_REQUEST['destination_folder']);
|
||||
$destination_album = pg_escape_string($_REQUEST['destination_album']);
|
||||
$source_album = pg_escape_string($_REQUEST['source_album']);
|
||||
$source_folder = pg_escape_string($_REQUEST['source_folder']);
|
||||
|
||||
$detail_info = pg_escape_string($_REQUEST['detail_info']);
|
||||
$transform = pg_escape_string($_REQUEST['transform']);
|
||||
|
@ -114,9 +115,15 @@ if ($spool_request) {
|
|||
$destination_album = $po_user['spool_album'];
|
||||
}
|
||||
|
||||
$return_path = generate_link('photo', $photo_id, array('ver'=>$version_id, 'detail_info'=>$detail_info,'album'=>$album_id), TRUE);
|
||||
if ($album_id && !($destination_album == 'trash' && $delete_request))
|
||||
$return_path .= "&album=$album_id";
|
||||
if ($delete_request) {
|
||||
if ($album_id) {
|
||||
$return_path = generate_link('album', $album_id);
|
||||
} else {
|
||||
$return_path = generate_link('folder', $source_folder);
|
||||
}
|
||||
} else {
|
||||
$return_path = generate_link('photo', $photo_id, array('ver'=>$version_id, 'detail_info'=>$detail_info,'album'=>$album_id), TRUE);
|
||||
}
|
||||
|
||||
/* Establish whether or not the viewer has appropriate rights */
|
||||
$owns = FALSE;
|
||||
|
|
|
@ -340,6 +340,7 @@ print "</div>";
|
|||
print "<div>";
|
||||
|
||||
print "<form method=\"post\" action=\"photo.move.php\" accept-charset=\"".$strings['formats']['encoding']."\">\n";
|
||||
print "<input type=\"hidden\" name=\"source_folder\" value=\"$photo_data[folder]\" />\n";
|
||||
print "<input type=\"hidden\" name=\"source_album\" value=\"$album_id\" />\n";
|
||||
print "<input type=\"hidden\" name=\"photo_id\" value=\"$photo_id\" />\n";
|
||||
print "<input type=\"hidden\" name=\"version\" value=\"$version\" />\n";
|
||||
|
|
Loading…
Reference in New Issue