Files
pathfinder/app/main/controller/appcontroller.php
Exodus4D 5be1d3547a - New "admin dashboard" /admin page + login, #494
- New ESI scope for admin access
- New admin.log file for admin actions (kick, ban,..)
- New login status for characters
- improved cronJob exec time for systemData import (jump/kill data)
- Added PHP 64-bit check to /setup
2017-05-27 14:09:12 +02:00

55 lines
1.3 KiB
PHP

<?php
/**
* Created by PhpStorm.
* User: exodus4d
* Date: 28.04.15
* Time: 21:27
*/
namespace Controller;
use Controller\Ccp as Ccp;
use Model;
class AppController extends Controller {
/**
* event handler after routing
* @param \Base $f3
*/
public function afterroute(\Base $f3){
parent::afterroute($f3);
// clear all SSO related temp data
if( $f3->exists(Ccp\Sso::SESSION_KEY_SSO) ){
$f3->clear(Ccp\Sso::SESSION_KEY_SSO);
}
}
/**
* show main login (index) page
* @param \Base $f3
*/
public function init(\Base $f3) {
// page title
$f3->set('pageTitle', 'Pathfinder');
// main page content
$f3->set('pageContent', $f3->get('PATHFINDER.VIEW.LOGIN'));
// body element class
$f3->set('bodyClass', 'pf-body pf-landing');
// JS main file
$f3->set('jsView', 'login');
// href for SSO Auth
$f3->set('tplAuthType', $f3->alias( 'sso', ['action' => 'requestAuthorization'] ));
// characters from cookies
$f3->set('cookieCharacters', $this->getCookieByName(self::COOKIE_PREFIX_CHARACTER, true));
$f3->set('getCharacterGrid', function($characters){
return ( ((12 / count($characters)) <= 3) ? 3 : (12 / count($characters)) );
});
}
}