mirror of
https://github.com/PGYER/codefever.git
synced 2026-05-20 09:26:39 +08:00
25 lines
490 B
PHP
Executable File
25 lines
490 B
PHP
Executable File
<?php
|
|
|
|
require_once APPPATH . '/controllers/base.php';
|
|
|
|
class Home extends Base
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
if (REQUEST_PROTOCOL != 'https' && ENVIRONMENT == 'production') {
|
|
return header('Location: ' . YAML_HOST);
|
|
}
|
|
|
|
if ($this->getLoggedKey()) {
|
|
return header('Location: /repositories');
|
|
}
|
|
|
|
return header('Location: /user/login');
|
|
}
|
|
}
|