Example #1
0
 /**
  * Handle exception
  *
  * @param  Exception  $e
  */
 public static function handle(Exception $e)
 {
     if ($e instanceof Kohana_404_Exception) {
         if (Kohana::config('site.inviteonly') && !Visitor::instance()->get_user()) {
             // Redirect to invite login if invite only and not logged in
             url::redirect('invite');
         } else {
             if (!headers_sent()) {
                 $e->sendHeaders();
             }
             $page = new Error_Controller();
             $page->_404();
         }
     } else {
         return parent::handle($e);
     }
 }
Example #2
0
 public static function debug_path($file)
 {
     return html::clean(parent::debug_path($file));
 }
Example #3
0
 /**
  * A safer version of dump(), eliding sensitive information in the dumped
  * data, such as session ids and passwords / hashes.
  */
 public static function safe_dump($value, $key, $length = 128, $max_level = 5)
 {
     return parent::dump(self::_sanitize_for_dump($value, $key), $length, $max_level);
 }