Index: openacs-4/packages/photo-album/catalog/photo-album.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/photo-album/catalog/photo-album.en_US.ISO-8859-1.xml,v diff -u -r1.12 -r1.12.2.1 --- openacs-4/packages/photo-album/catalog/photo-album.en_US.ISO-8859-1.xml 21 Mar 2005 15:36:50 -0000 1.12 +++ openacs-4/packages/photo-album/catalog/photo-album.en_US.ISO-8859-1.xml 23 Apr 2006 10:09:56 -0000 1.12.2.1 @@ -133,6 +133,7 @@ Move folder to new folder: Move this album to another folder Move this folder to another folder + No Photo was found for this photo_id No photos in the clipboard. OPTIONAL, Displayed on the thumbnail page OPTIONAL, Displayed when viewing the photo @@ -158,6 +159,7 @@ Name Name: %title% Next + No Photo OPTIONAL or Photo clipboard Index: openacs-4/packages/photo-album/www/random-photo.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/photo-album/www/random-photo.tcl,v diff -u -r1.4 -r1.4.6.1 --- openacs-4/packages/photo-album/www/random-photo.tcl 13 Feb 2004 08:37:48 -0000 1.4 +++ openacs-4/packages/photo-album/www/random-photo.tcl 23 Apr 2006 10:09:57 -0000 1.4.6.1 @@ -80,20 +80,20 @@ set photo_clause "" } -if {![info exists package_id]} { - if {[info exists photo_id]} { - # A photo ID was provided. Limit the query to that photo. +if {[info exists photo_id]} { + # A photo ID was provided. Limit the query to that photo. + + set photo_clause [db_map photo_clause] +} - set photo_clause [db_map photo_clause] - } - - if {[catch {db_1row get_random_photo_all {}} err_msg]} { - ns_log error "No random photo found: $err_msg" - set found_p 0 - } else { - set found_p 1 - } +if {[catch {db_1row get_random_photo_all {}} err_msg]} { + ns_log error "No random photo found: $err_msg" + set found_p 0 } else { + set found_p 1 +} + +if {[info exists package_id] && $found_p == 0} { set root_folder_id [pa_get_root_folder $package_id] if {[catch {db_1row get_random_photo_folder {}} err_msg]} { ns_log error "No random photo found in folder $root_folder_id: $err_msg"