|
|
|
@ -34,6 +34,7 @@ require_once __DIR__.'/../../public/legacy.php'; |
|
|
|
|
// Check the PHP version |
|
|
|
|
api_check_php_version(__DIR__.'/'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
// Get settings from .env file created when installation Chamilo |
|
|
|
|
$envFile = __DIR__.'/../../.env'; |
|
|
|
@ -55,6 +56,7 @@ try { |
|
|
|
|
$response = $kernel->handle($request); |
|
|
|
|
$container = $kernel->getContainer(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($kernel->isInstalled()) { |
|
|
|
|
require_once $kernel->getConfigurationFile(); |
|
|
|
|
} else { |
|
|
|
@ -526,16 +528,15 @@ try { |
|
|
|
|
// ===== "who is logged in?" module section ===== |
|
|
|
|
|
|
|
|
|
// check and modify the date of user in the track.e.online table |
|
|
|
|
if (isset($_user['user_id'])) { |
|
|
|
|
if (!$x = strpos($_SERVER['PHP_SELF'], 'whoisonline.php')) { |
|
|
|
|
preventMultipleLogin($_user["user_id"]); |
|
|
|
|
LoginCheck(isset($_user['user_id']) ? $_user['user_id'] : ''); |
|
|
|
|
preventMultipleLogin($_user['user_id']); |
|
|
|
|
LoginCheck($_user['user_id']); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// ===== end "who is logged in?" module section ===== |
|
|
|
|
|
|
|
|
|
// Update of the logout_date field in the table track_e_login |
|
|
|
|
// (needed for the calculation of the total connection time) |
|
|
|
|
if (!isset($_SESSION['login_as']) && isset($_user)) { |
|
|
|
|
if (!isset($_SESSION['login_as'])) { |
|
|
|
|
// if $_SESSION['login_as'] is set, then the user is an admin logged as the user |
|
|
|
|
$tbl_track_login = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN); |
|
|
|
|
$sql = "SELECT login_id, login_date |
|
|
|
@ -573,6 +574,7 @@ try { |
|
|
|
|
Database::query($sql); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Add language_measure_frequency to your main/inc/conf/configuration.php in |
|
|
|
|
// order to generate language variables frequency measurements (you can then |
|
|
|
@ -597,7 +599,9 @@ try { |
|
|
|
|
// Forcing PclZip library to use a custom temporary folder. |
|
|
|
|
define('PCLZIP_TEMPORARY_DIR', api_get_path(SYS_ARCHIVE_PATH)); |
|
|
|
|
} catch (Exception $e) { |
|
|
|
|
/*var_dump($e->getMessage()); |
|
|
|
|
error_log($e->getMessage()); |
|
|
|
|
/* |
|
|
|
|
var_dump($e->getMessage()); |
|
|
|
|
var_dump($e->getCode()); |
|
|
|
|
var_dump($e->getLine()); |
|
|
|
|
echo $e->getTraceAsString(); |
|
|
|
|