X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot.class.php;h=f64e9ff2ef70f7d7195b5f811205cd72512660d0;hp=49d0c7df071da319c16c829bbc9d5be55a101d2e;hb=3d867f5190b42114820df35143a46c8bc8521404;hpb=50e939560cd42cd4355fc130cfea0389e380694f diff --git a/phpfspot.class.php b/phpfspot.class.php index 49d0c7d..f64e9ff 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -776,12 +776,12 @@ class PHPFSPOT {
tags[$tag] ."\"> - + cfg->web_path ."/phpfspot_img.php?tagidx=". $tag ."\" />
tags[$tag] ."\"> - + cfg->web_path ."/resources/underbar.png\" />
@@ -1332,7 +1332,6 @@ class PHPFSPOT { if($last_page > 1) $this->tmpl->assign('page_selector', $page_select); } - $current_tags = $this->getCurrentTags(); $extern_link = "index.php?mode=showpi"; @@ -2711,7 +2710,9 @@ class PHPFSPOT { */ private function ts2str($timestamp) { - return strftime("%Y-%m-%d", $timestamp); + if(!empty($timestamp) && is_numeric($timestamp)) + return strftime("%Y-%m-%d", $timestamp); + } // ts2str() /** @@ -3129,6 +3130,7 @@ class PHPFSPOT { break; case 'tag': if(is_numeric($options[2])) { + $this->session_cleanup(); $_GET['tags'] = $options[2]; $_SESSION['selected_tags'] = Array($options[2]); return $this->showPhotoIndex(); @@ -3155,6 +3157,21 @@ class PHPFSPOT { } // is_user_friendly_url() + /** + * session cleanup + * + * this function will cleanup user's session information + */ + private function session_cleanup() + { + unset($_SESSION['begin_with']); + $this->resetDateSearch(); + $this->resetPhotoView(); + $this->resetTagSearch(); + $this->resetNameSearch(); + $this->resetDateSearch(); + + } // session_cleanup() } // class PHPFSPOT