tbrehm
2011-01-17 37660da3fb65d9ad55c3e51bfa6f84591470e926
interface/lib/app.inc.php
@@ -56,6 +56,15 @@
      //* Start the session
      if($this->_conf['start_session'] == true) {
         $this->uses('session');
         session_set_save_handler(   array($this->session, 'open'),
                              array($this->session, 'close'),
                              array($this->session, 'read'),
                              array($this->session, 'write'),
                              array($this->session, 'destroy'),
                              array($this->session, 'gc'));
         session_start();
         //* Initialize session variables
@@ -123,8 +132,20 @@
      //$this->uses("error");
      //$this->error->message($msg, $priority);
      if($stop == true) {
         $content = file_get_contents(dirname(__FILE__) .
               '/../web/themes/' . $_SESSION['s']['theme'] . '/templates/error.tpl.htm');
         /*
          * We always have a error. So it is better not to use any more objects like
          * the template or so, because we don't know why the error occours (it could be, that
          * the error occours in one of these objects..)
          */
         /*
          * Use the template inside the user-template - Path. If it is not found, fallback to the
          * default-template (the "normal" behaviour of all template - files)
          */
         if (file_exists(dirname(__FILE__) . '/../web/themes/' . $_SESSION['s']['theme'] . '/templates/error.tpl.htm')) {
            $content = file_get_contents(dirname(__FILE__) . '/../web/themes/' . $_SESSION['s']['theme'] . '/templates/error.tpl.htm');
         } else {
            $content = file_get_contents(dirname(__FILE__) . '/../web/themes/default/templates/error.tpl.htm');
         }
         if($next_link != '') $msg .= '<a href="'.$next_link.'">Next</a>';
         $content = str_replace('###ERRORMSG###', $msg, $content);
         die($content);