issue51, fixed incorrect value returned from whattodo()
authorAndreas Unterkircher <unki@netshadow.at>
Wed, 18 Jul 2007 04:10:43 +0000 (04:10 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Wed, 18 Jul 2007 04:10:43 +0000 (04:10 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@221 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php

index f71a0db1d3418cd74a5cae20699b9a9bd5762d2f..57e3406272ebaa37d632147fe809d7cd664cb18d 100644 (file)
@@ -1569,15 +1569,13 @@ class PHPFSPOT {
     */
    public function whatToDo()
    {
     */
    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";
       }
          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";
       }
       elseif(isset($_SESSION['start_action']) && $_SESSION['start_action'] == 'showpi') {
          return "showpi";
       }