only set anchor is it is really provided by the client
authorAndreas Unterkircher <unki@netshadow.at>
Sun, 1 Jul 2007 17:29:21 +0000 (17:29 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Sun, 1 Jul 2007 17:29:21 +0000 (17:29 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@158 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php

index 0960243203c583fb39f9312507f9983c20fe1741..9d159ff3ff02e09d46c374d50a0a23d1ccb89d87 100644 (file)
@@ -399,7 +399,8 @@ class PHPFSPOT {
 
       $count = count($photos);
 
-      $anchor = $_SESSION['begin_with'];
+      if(isset($_SESSION['begin_with']) && $_SESSION['begin_with'] != "")
+         $anchor = $_SESSION['begin_with'];
 
       if(!isset($this->cfg->rows_per_page) || $this->cfg->rows_per_page == 0) {
 
@@ -545,7 +546,8 @@ class PHPFSPOT {
 
       $this->tmpl->show("photo_index.tpl");
 
-      print "<script language=\"JavaScript\">self.location.hash = '#image". $anchor ."';</script>\n";
+      if(isset($anchor))
+         print "<script language=\"JavaScript\">self.location.hash = '#image". $anchor ."';</script>\n";
 
    } // showPhotoIndex()