Fixed redirect to installer
In some cases redirections to the installer would be ignored. Well, no more.
This commit is contained in:
parent
9cc43ea4fe
commit
d4387ee6bb
1 changed files with 8 additions and 5 deletions
|
@ -8,13 +8,13 @@ class Ctrl_HomePage
|
|||
public final function handle( Page $page )
|
||||
{
|
||||
session_start( );
|
||||
if ( array_key_exists( 'uid' , $_SESSION ) ) {
|
||||
return 'items';
|
||||
} elseif ( Loader::DAO( 'users' )->hasUsers( ) ) {
|
||||
return 'login';
|
||||
} else {
|
||||
if ( ! Loader::DAO( 'users' )->hasUsers( ) ) {
|
||||
return 'install';
|
||||
}
|
||||
if ( array_key_exists( 'uid' , $_SESSION ) ) {
|
||||
return 'items';
|
||||
}
|
||||
return 'login';
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -51,6 +51,9 @@ class Ctrl_CheckSession
|
|||
public function handle( Page $page )
|
||||
{
|
||||
session_start( );
|
||||
if ( ! Loader::DAO( 'users' )->hasUsers( ) ) {
|
||||
return 'install';
|
||||
}
|
||||
if ( array_key_exists( $this->sessionKey , $_SESSION ) ) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue