예제 #1
0
 public static function EndLog(\Library\Application $app, $type)
 {
     $logs = Logger::GetLogs($app->user());
     $log = $logs[$type][$app->HttpRequest()->requestID()];
     $log->setLog_end(Logger::GetTime());
     $log->setLog_execution_time(($log->log_end - $log->log_start()) * 1000);
     $log->setLog_start(gmdate("Y-m-d H:i:s", $log->log_start()));
     $log->setLog_end(gmdate("Y-m-d H:i:s", $log->log_end()));
     Logger::AddLogToDatabase($app, $log);
     Logger::StoreLogs($app->user(), $logs);
 }
예제 #2
0
 public static function RedirectAfterPmSelection(\Library\Application $app, $pm_id)
 {
     $redirect = FALSE;
     if ($app->user()->keyExistInSession(\Library\Enums\SessionKeys::CurrentPm)) {
         return TRUE;
     }
     if ($pm_id === 0) {
         return FALSE;
     } else {
         $pm = self::GetAndStoreCurrentPm($app->user(), $pm_id);
         if ($pm == !NULL) {
             return TRUE;
         }
     }
 }