- added build files for upcoming version 1.1.2

- improved ajax authentication check and "logout" notification | closed #198
- improved logging, added missing log file configuration to pathfinder.ini
- added  logging for "unauthorized" requests | closed #198
- updated js "jQuery" 1.11.3 -> 3.0.0 | #206
- updated js "datatables" plugin 1.10.7 -> 1.10.12 | #206
- updated js "mCustomScrollbar" 3.1.14 -> 3.1.4 | #206
This commit is contained in:
Exodus4D
2016-07-11 20:35:25 +02:00
parent f943f31d9a
commit cdd1846431
72 changed files with 1732 additions and 10632 deletions

View File

@@ -70,7 +70,7 @@ class User extends Controller\Controller{
$characterModel->save();
// write login log --------------------------------------
self::getLogger( $this->f3->get('PATHFINDER.LOGFILES.LOGIN') )->write(
self::getLogger('LOGIN')->write(
sprintf(self::LOG_LOGGED_IN,
$user->_id,
$user->name,
@@ -162,8 +162,7 @@ class User extends Controller\Controller{
* @param \Base $f3
*/
public function deleteLog(\Base $f3){
$activeCharacter = $this->getCharacter();
if($activeCharacter){
if($activeCharacter = $this->getCharacter()){
if($characterLog = $activeCharacter->getLog()){
$characterLog->erase();
}
@@ -177,6 +176,10 @@ class User extends Controller\Controller{
public function logout(\Base $f3){
$this->deleteLog($f3);
parent::logout($f3);
$return = (object) [];
$return->reroute = rtrim(self::getEnvironmentData('URL'), '/') . $f3->alias('login');
echo json_encode($return);
}
/**
@@ -338,7 +341,7 @@ class User extends Controller\Controller{
if($status){
// save log
$logText = "id: %s, name: %s, ip: %s";
self::getLogger( $this->f3->get('PATHFINDER.LOGFILES.DELETE_ACCOUNT') )->write(
self::getLogger('DELETE_ACCOUNT')->write(
sprintf($logText, $user->id, $user->name, $f3->get('IP'))
);