mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-07 17:06:54 +01:00
Fix updates checking.
Change fancybox to alertify for non-locking messages. Fix error on removing groups. Set version string in DB and config file. Update translations. Add scroll to search, users, groups and profiles results. Update to 1.0rc3
This commit is contained in:
32
inc/init.php
32
inc/init.php
@@ -118,6 +118,8 @@ class SP_Init {
|
||||
|
||||
// Comprobar si el modo mantenimiento está activado
|
||||
self::checkMaintenanceMode();
|
||||
// Comprobar la versión y actualizarla
|
||||
self::checkVersion();
|
||||
// Inicializar la sesión
|
||||
self::initSession();
|
||||
|
||||
@@ -403,6 +405,36 @@ class SP_Init {
|
||||
textdomain("messages");
|
||||
bind_textdomain_codeset("messages", 'UTF-8');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Comrpueba y actualiza la versión de la aplicación
|
||||
* @returns none
|
||||
*/
|
||||
private static function checkVersion(){
|
||||
$update = FALSE;
|
||||
$configVersion = SP_Config::getValue('version');
|
||||
$databaseVersion = SP_Config::getConfigValue('version');
|
||||
$appVersion = SP_Util::getVersionString();
|
||||
|
||||
if ( $configVersion != $appVersion ){
|
||||
SP_Config::setValue('version', $appVersion);
|
||||
$update = TRUE;
|
||||
}
|
||||
|
||||
if ( $databaseVersion != $appVersion ){
|
||||
SP_Config::setConfigValue('version', $appVersion);
|
||||
$update = TRUE;
|
||||
}
|
||||
|
||||
if ( $update === TRUE ){
|
||||
$message['action'] = _('Actualización');
|
||||
$message['text'][] = _('Actualización de versión realizada.');
|
||||
$message['text'][] = _('Versión') . ': ' . $appVersion;
|
||||
|
||||
SP_Common::wrLogInfo($message);
|
||||
SP_Common::sendEmail($message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Empezar a calcular el tiempo y memoria utilizados
|
||||
|
||||
Reference in New Issue
Block a user