summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-05-25 10:22:14 +0200
committerAndreas Unterkircher <unki@netshadow.at>2008-05-25 10:25:52 +0200
commitfa213e56d620580d73b680255370f65eec6db4e6 (patch)
tree7b5a430637daac31c7b32d6a5066fd283f28a268 /phpfspot.class.php
parentf999055210a94d26b9ae58950ff4d45eee86e869 (diff)
deliver single-photo- and photo-index-view also on first-site-call if session variables are set
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 60521ad..b3455f0 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -347,11 +347,21 @@ class PHPFSPOT {
$this->tmpl->assign('preset_available_tags', $this->getAvailableTags());
$this->tmpl->assign('rate_search', $this->get_rate_search());
+ /* if no site-content has been set yet... */
if(!isset($content)) {
- if(isset($_SESSION['selected_tags']) && !empty($_SESSION['selected_tags']))
+ /* if tags are already selected, we can immediately display photo-index */
+ if((isset($_SESSION['selected_tags']) && !empty($_SESSION['selected_tags']) &&
+ $_SESSION['start_action'] != 'showp') || $_SESSION['start_action'] == 'showpi')
$this->tmpl->assign('initial_content', $this->showPhotoIndex());
- else
- $this->tmpl->assign('initial_content', $this->tmpl->fetch('welcome.tpl'));
+ else {
+ /* if a photo is already selected, we can immediately display single-photo */
+ if(isset($_SESSION['current_photo']) && !empty($_SESSION['current_photo']))
+ $this->tmpl->assign('initial_content', $this->showPhoto($_SESSION['current_photo']));
+ else {
+ /* ok, then let us show the welcome page... */
+ $this->tmpl->assign('initial_content', $this->tmpl->fetch('welcome.tpl'));
+ }
+ }
}
else
$this->tmpl->assign('initial_content', $content);