$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) {
$current_tags = substr($current_tags, 0, strlen($current_tags)-1);
}
- $extern_link = "http://". $_SERVER['SERVER_NAME'] ."/index.php?mode=showpi&tags=". $current_tags;
+ $extern_link = "http://". $_SERVER['SERVER_NAME'] ."/index.php?mode=showpi";
+ if($current_tags != "") {
+ $extern_link.= "&tags=". $current_tags;
+ }
$this->tmpl->assign('extern_link', $extern_link);
$this->tmpl->assign('count', $count);
$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()