From acf99ab245d7b8fb37227efd05bfb5e55e50a1f2 Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 29 May 2010 19:37:33 +0000 Subject: [PATCH] make sure session object is not overwritten in web view make error template more usable git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@483 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- www/inc/rendering/event_listing.php | 2 +- www/inc/wext/transaction.php | 3 ++- www/template/de/error.html | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/www/inc/rendering/event_listing.php b/www/inc/rendering/event_listing.php index 7a0c1a8..6d18f9a 100644 --- a/www/inc/rendering/event_listing.php +++ b/www/inc/rendering/event_listing.php @@ -55,7 +55,7 @@ public static function createEventDetails() $event = new Event($eventID); if (!$event->exists()) { - header("Location:index.php"); + redirectHome(array()); return; } diff --git a/www/inc/wext/transaction.php b/www/inc/wext/transaction.php index 43f81fb..110f0b3 100644 --- a/www/inc/wext/transaction.php +++ b/www/inc/wext/transaction.php @@ -14,7 +14,8 @@ class MSmokeTransaction extends WobTransaction public function __construct() { //make sure we have a session - new Session($this); + global $session; + if(!isset($session))new Session($this); } protected function startTransaction($updating) diff --git a/www/template/de/error.html b/www/template/de/error.html index 7f25f84..f93aba2 100644 --- a/www/template/de/error.html +++ b/www/template/de/error.html @@ -1,6 +1,10 @@ + +Error +

Error

{{ErrorText}}
-Back to Index +Back to Index + \ No newline at end of file -- 1.7.2.5