Skip to content

Commit

Permalink
Add a few routes for PHP 5
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed May 17, 2017
1 parent e6232c3 commit 1e03c2d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Core/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ public function __construct($launch)
$this['tsugi']->output->buffer = false;

$P7 = strpos(phpversion(), '7') === 0;
if ( !$P7 ) return false;

// 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;
Expand Down

0 comments on commit 1e03c2d

Please sign in to comment.