]> source.dussan.org Git - nextcloud-server.git/commitdiff
use error template
authorBernhard Posselt <nukeawhale@gmail.com>
Mon, 25 Feb 2013 18:17:29 +0000 (19:17 +0100)
committerBernhard Posselt <nukeawhale@gmail.com>
Mon, 25 Feb 2013 18:17:29 +0000 (19:17 +0100)
lib/base.php

index 156edebc13641b29813cfc3f4abd3af73f6f1b3a..f9bb1bb11bfd059c2efcb429ebd40c155eba695d 100644 (file)
@@ -324,10 +324,16 @@ class OC {
                if (session_start() === false){
                        OC_Log::write('core', 'Session could not be initialized', 
                                OC_Log::ERROR);
-                       echo 'Session could not be initialized. Please contact your system';
-                       echo ' administrator';
+                       
                        header('HTTP/1.1 500 Internal Server Error');
-                       exit(1);
+                       $error = 'Session could not be initialized. Please contact your ';
+                       $error .= 'system administrator';
+
+                       $tmpl = new OC_Template('', 'error', 'guest');
+                       $tmpl->assign('errors', array(1 => array('error' => $error)));
+                       $tmpl->printPage();
+
+                       exit();
                }
 
                // regenerate session id periodically to avoid session fixation