From 48b46c22412ee4e388140ed0b78504e7b84d9d23 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Mon, 12 May 2008 07:39:04 +0200 Subject: [PATCH] issue118, fix some problems with session vars for user-friendly urls Signed-off-by: Andreas Unterkircher --- phpfspot.class.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/phpfspot.class.php b/phpfspot.class.php index 49d0c7d..6dcc8de 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"; @@ -3129,6 +3128,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 +3155,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 -- 2.25.1