make sure session object is not overwritten in web view
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 29 May 2010 19:37:33 +0000 (19:37 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sat, 29 May 2010 19:37:33 +0000 (19:37 +0000)
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
www/inc/wext/transaction.php
www/template/de/error.html

index 7a0c1a8..6d18f9a 100644 (file)
@@ -55,7 +55,7 @@ public static function createEventDetails()
        $event = new Event($eventID);
        if (!$event->exists())
        {
-               header("Location:index.php");
+               redirectHome(array());
                return;
        }
        
index 43f81fb..110f0b3 100644 (file)
@@ -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)
index 7f25f84..f93aba2 100644 (file)
@@ -1,6 +1,10 @@
+<html>
+<title>Error</title>
+<body>
 <h1>Error</h1>
 
 {{ErrorText}}
 
 <hr/>
-<a href="@SCRIPT@">Back to Index</a>
+<a href="{{script.root}}">Back to Index</a>
+</html>
\ No newline at end of file