From: Andreas Unterkircher Date: Wed, 18 Jul 2007 04:10:43 +0000 (+0000) Subject: issue51, fixed incorrect value returned from whattodo() X-Git-Tag: phpfspot-1.2~114 X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=845ed0ab2fd04438abc153cf6e1138c39696e20b;p=phpfspot.git issue51, fixed incorrect value returned from whattodo() git-svn-id: file:///var/lib/svn/phpfspot/trunk@221 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- diff --git a/phpfspot.class.php b/phpfspot.class.php index f71a0db..57e3406 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -1569,15 +1569,13 @@ class PHPFSPOT { */ public function whatToDo() { - if(isset($_SESSION['selected_tags']) && !empty($_SESSION['selected_tags'])) { - return "showpi_tags"; - } - elseif(isset($_SESSION['from_date']) && isset($_SESSION['to_date'])) { - return "showpi_date"; - } - elseif(isset($_SESSION['current_photo']) && $_SESSION['start_action'] == 'showp') { + if(isset($_SESSION['current_photo']) && $_SESSION['start_action'] == 'showp') { return "show_photo"; } + elseif((isset($_SESSION['selected_tags']) && !empty($_SESSION['selected_tags'])) || + (isset($_SESSION['from_date']) && isset($_SESSION['to_date']))) { + return "showpi"; + } elseif(isset($_SESSION['start_action']) && $_SESSION['start_action'] == 'showpi') { return "showpi"; }