Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
fix(Route): Fix user can access maintenance page even not on maintena…
Browse files Browse the repository at this point in the history
…nce status
  • Loading branch information
Rhilip committed Jan 13, 2020
1 parent 50ecdbf commit b29c2f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- **Tracker:** Reduce Redis Calls for get User and Torrent Info in Tracker (e813435)

### Refactor
- **Entity:** Separate Entity User, Torrent 's const to App\Repository (50ecdbf)
- **Entity:** Move Class Torrent,User to namespace App\Entity (7814d88)

### Style
Expand Down
4 changes: 4 additions & 0 deletions application/Controllers/MaintenanceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
class MaintenanceController extends Controller
{
public function actionIndex() {
// Check if site is on maintenance status
if (!config('base.maintenance'))
return app()->response->redirect('/index');

return $this->render('maintenance');
}
}

0 comments on commit b29c2f6

Please sign in to comment.