Permalink
Browse files

Move error into tsugi application.

  • Loading branch information...
csev committed Aug 21, 2017
1 parent f314350 commit ed36e4c27481b6113793d9222ad6dddee2af37e3
Showing with 0 additions and 19 deletions.
  1. +0 −19 src/Core/Application.php
View
@@ -16,25 +16,6 @@ public function __construct($launch)
parent::__construct($launch);
$this['tsugi']->output->buffer = false;
$P7 = strpos(phpversion(), '7') === 0;
$P7 = true; // After backleveled to Twig 1.27
// Some controllers work in PHP 5
if ( !$P7 ) {
\Tsugi\Controllers\Login::routes($this);
\Tsugi\Controllers\Logout::routes($this);
\Koseu\Controllers\Courses::routes($this);
return false;
}
$this->error(function (NotFoundHttpException $e, Request $request, $code) {
global $CFG, $LAUNCH, $OUTPUT, $USER, $CONTEXT, $LINK, $RESULT;
return $this['twig']->render('@Tsugi/Error.twig',
array('error' => '<p>Page not found.</p>')
);
});
// Hook up the Koseu and Tsugi tools
\Tsugi\Controllers\Login::routes($this);
\Tsugi\Controllers\Logout::routes($this);

0 comments on commit ed36e4c

Please sign in to comment.