From 9af728c3ae95216311e4b8a6a0858dc40f3902ef Mon Sep 17 00:00:00 2001 From: atm-jonathan Date: Mon, 22 Dec 2025 10:19:24 +0100 Subject: [PATCH 1/3] =?UTF-8?q?pr=C3=A9=20commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/actions_maintenanceatm.class.php | 45 ++++---- class/techatm.class.php | 129 +++++++++++++---------- core/modules/modMaintenanceATM.class.php | 56 +++++----- 3 files changed, 124 insertions(+), 106 deletions(-) diff --git a/class/actions_maintenanceatm.class.php b/class/actions_maintenanceatm.class.php index c7e3773..558c565 100644 --- a/class/actions_maintenanceatm.class.php +++ b/class/actions_maintenanceatm.class.php @@ -64,9 +64,9 @@ class ActionsMaintenanceATM extends maintenanceatm\RetroCompatCommonHookActions /** - * Constructor + * Constructor for ActionsMaintenanceATM * - * @param DoliDB $db Database handler + * @param DoliDB $db Database handler */ public function __construct($db) { @@ -75,14 +75,12 @@ public function __construct($db) /** - * Execute action + * Execute action during login page display (Hook mainloginpage) * - * @param array $parameters Array of parameters - * @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...) - * @param string $action 'add', 'update', 'view' - * @return int Return integer <0 if KO, - * =0 if OK but we want to process standard actions too, - * >0 if OK and we want to replace standard actions. + * @param array $parameters Array of parameters from hook context + * @param CommonObject $object The object to process + * @param string $action Current action + * @return int 0 if OK, <0 if KO, >0 to replace standard actions */ public function getLoginPageOptions($parameters, &$object, &$action) { @@ -92,7 +90,7 @@ public function getLoginPageOptions($parameters, &$object, &$action) $mainOnlyLoginAllowed = getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED'); $newUrl = getDolGlobalString('MAINTENANCEATM_REDIRECT_NEW_URL'); - if(!empty($mainOnlyLoginAllowed)){ + if (!empty($mainOnlyLoginAllowed)) { $langs->load('maintenanceatm@maintenanceatm'); $this->resprints = ' @@ -108,29 +106,28 @@ public function getLoginPageOptions($parameters, &$object, &$action) '; // Ajout de la redirection JS - if(filter_var($newUrl, FILTER_VALIDATE_URL)){ - + if (filter_var($newUrl, FILTER_VALIDATE_URL)) { $redirectSeconds = 9; $this->resprints.= '

'.$langs->trans('ModeMaintenanceActivatedNewUrlTitle').'

'.$langs->trans('ModeMaintenanceActivatedNewUrl', $newUrl).' : '.$newUrl.'

- + '.$langs->trans('ModeMaintenanceActivatedNewUrlDescPart1', $newUrl).' - '.$redirectSeconds.' + '.$redirectSeconds.' '.$langs->trans('ModeMaintenanceActivatedNewUrlDescPart2').' - +

'; - - }else{ + } else { $this->resprints.= '

'.$langs->trans('ModeMaintenanceActivatedLoginTitle').'

@@ -184,5 +180,4 @@ function countdownTimer() { $this->resprints = ''; return 0; } - } diff --git a/class/techatm.class.php b/class/techatm.class.php index eb6edf5..b842a28 100644 --- a/class/techatm.class.php +++ b/class/techatm.class.php @@ -6,7 +6,11 @@ */ namespace maintenanceatm; - +/** + * TechATM Class + * + * Description + */ class TechATM { @@ -56,19 +60,24 @@ class TechATM const CALL_VERSION = 1.0; /** - * Constructor + * Constructor * - * @param DoliDB $db + * @param DoliDB $db Database handler */ - function __construct($db) + public function __construct($db) { $this->db = $db; } /** - * @param DolibarrModules $moduleDescriptor + * Get about page + * + * @param object $moduleDescriptor Module descriptor object + * @param bool $useCache 1 to use cache, 0 otherwise + * @return string HTML output content */ - function getAboutPage($moduleDescriptor, $useCache = true){ + public function getAboutPage($moduleDescriptor, $useCache = true) + { global $langs; $url = self::ATM_TECH_URL.'/modules/modules-page-about.php'; @@ -82,11 +91,11 @@ function getAboutPage($moduleDescriptor, $useCache = true){ $cacheFileName = dol_sanitizeFileName($moduleDescriptor->name.'_'.$langs->defaultlang).'.html'; $cacheFilePath = $cachePath.'/'.$cacheFileName; - if($useCache && is_readable($cacheFilePath)){ + if ($useCache && is_readable($cacheFilePath)) { $lastChange = filemtime($cacheFilePath); - if($lastChange > time() - 86400){ + if ($lastChange > time() - 86400) { $content = @file_get_contents($cacheFilePath); - if($content !== false){ + if ($content !== false) { return $content; } } @@ -94,7 +103,7 @@ function getAboutPage($moduleDescriptor, $useCache = true){ $content = $this->getContents($url); - if(!$content){ + if (!$content) { $content = ''; // About page goes here $content.= '
'; @@ -104,14 +113,14 @@ function getAboutPage($moduleDescriptor, $useCache = true){ $content.= ''; } - if($useCache){ - if(!is_dir($cachePath)){ + if ($useCache) { + if (!is_dir($cachePath)) { $res = dol_mkdir($cachePath, DOL_DATA_ROOT); - }else{ + } else { $res = true; } - if($res){ + if ($res) { $comment = ''."\r\n"; file_put_contents( @@ -127,22 +136,23 @@ function getAboutPage($moduleDescriptor, $useCache = true){ /** * Get Module doc URL * - * @param string $moduleTechMane - * @return string + * @param string $moduleTechMane Name of the module on tech server + * @return string Redirect URL for documentation */ - public static function getModuleDocUrl($moduleTechMane){ + public static function getModuleDocUrl($moduleTechMane) + { $url = self::ATM_TECH_URL.'/modules/doc-redirect.php'; $url.= '?module='.$moduleTechMane; return $url; } - /** * Get Module Demo URL * - * @param string $moduleTechMane - * @return string + * @param string $moduleTechMane Name of the module on tech server + * @return string Redirect URL for demo */ - public static function getModuleDemoUrl($moduleTechMane){ + public static function getModuleDemoUrl($moduleTechMane) + { $url = self::ATM_TECH_URL.'/modules/demo-redirect.php'; $url.= '?module='.$moduleTechMane; return $url; @@ -151,10 +161,11 @@ public static function getModuleDemoUrl($moduleTechMane){ /** * Get Module Video URL * - * @param string $moduleTechMane - * @return string + * @param string $moduleTechMane Name of the module on tech server + * @return string Redirect URL for video */ - public static function getModuleVideoUrl($moduleTechMane){ + public static function getModuleVideoUrl($moduleTechMane) + { $url = self::ATM_TECH_URL.'/modules/video-redirect.php'; $url.= '?module='.$moduleTechMane; return $url; @@ -163,10 +174,11 @@ public static function getModuleVideoUrl($moduleTechMane){ /** * Get last version number URL * - * @param DolibarrModules $moduleDescriptor - * @return string + * @param modMaintenanceATM $moduleDescriptor Module descriptor instance + * @return string URL to check last version */ - public static function getLastModuleVersionUrl($moduleDescriptor){ + public static function getLastModuleVersionUrl($moduleDescriptor) + { $url = self::ATM_TECH_URL.'/modules/modules-last-version.php'; $url.= '?module='.$moduleDescriptor->name; $url.= '&number='.$moduleDescriptor->numero; @@ -178,17 +190,20 @@ public static function getLastModuleVersionUrl($moduleDescriptor){ /** - * @param $url - * @return false|object + * Get JSON data from a URL + * + * @param string $url URL to fetch + * @return mixed Decoded JSON data, or false on failure */ - public function getJsonData($url){ + public function getJsonData($url) + { $this->data = false; $res = @file_get_contents($url); $this->http_response_header = $http_response_header; $this->TResponseHeader = self::parseHeaders($http_response_header); - if($res !== false){ + if ($res !== false) { $pos = strpos($res, '{'); - if($pos > 0){ + if ($pos > 0) { // cela signifie qu'il y a une erreur ou que la sortie n'est pas propre $res = substr($res, $pos); } @@ -200,24 +215,31 @@ public function getJsonData($url){ } /** - * @param $url - * @return false|string + * Get raw contents from a URL + * + * @param string $url URL to fetch + * @return string|false Raw response string, or false on failure */ - public function getContents($url){ + public function getContents($url) + { $this->data = false; $res = @file_get_contents($url); $this->http_response_header = $http_response_header; $this->TResponseHeader = self::parseHeaders($http_response_header); - if($res !== false){ + if ($res !== false) { $this->data = $res; } return $this->data; } - - public static function http_response_code_msg($code = NULL) + /** + * Get HTTP response message from code + * + * @param int $code HTTP code + * @return string Message + */ + public static function httpResponseCodeMsg($code = null) { - if ($code !== NULL) { - + if ($code !== null) { switch ($code) { case 100: $text = 'Continue'; @@ -336,32 +358,33 @@ public static function http_response_code_msg($code = NULL) } return $text; - } else { return $text = 'Unknown http status code NULL'; } } - - public static function parseHeaders( $headers ) + /** + * Parse HTTP headers + * + * @param array|string $headers Headers to parse + * @return array Parsed headers + */ + public static function parseHeaders($headers) { $head = array(); - if(!is_array($headers)){ + if (!is_array($headers)) { return $head; } - foreach( $headers as $k=>$v ) - { - $t = explode( ':', $v, 2 ); - if( isset( $t[1] ) ) - $head[ trim($t[0]) ] = trim( $t[1] ); - else - { + foreach ($headers as $k=>$v) { + $t = explode(':', $v, 2); + if ( isset($t[1]) ) + $head[ trim($t[0]) ] = trim($t[1]); + else { $head[] = $v; - if( preg_match( "#HTTP/[0-9\.]+\s+([0-9]+)#",$v, $out ) ) + if ( preg_match("#HTTP/[0-9\.]+\s+([0-9]+)#", $v, $out) ) $head['reponse_code'] = intval($out[1]); } } return $head; } - } diff --git a/core/modules/modMaintenanceATM.class.php b/core/modules/modMaintenanceATM.class.php index a316eb2..6c782af 100644 --- a/core/modules/modMaintenanceATM.class.php +++ b/core/modules/modMaintenanceATM.class.php @@ -34,9 +34,9 @@ class modMaintenanceATM extends DolibarrModules { /** - * Constructor. Define names, constants, directories, boxes, permissions + * Constructor for module descriptor modMaintenanceATM * - * @param DoliDB $db Database handler + * @param DoliDB $db Database handler */ public function __construct($db) { @@ -116,7 +116,7 @@ public function __construct($db) // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context to 'all' 'hooks' => array( 'data' => array( - 'mainloginpage', + 'mainloginpage', ), 'entity' => '0', ), @@ -303,21 +303,21 @@ public function __construct($db) $r = 0; // Add here entries to declare new menus /* BEGIN MODULEBUILDER TOPMENU */ -// $this->menu[$r++] = array( -// 'fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode -// 'type'=>'top', // This is a Top menu entry -// 'titre'=>'ModuleMaintenanceATMName', -// 'prefix' => img_picto('', $this->picto, 'class="pictofixedwidth valignmiddle"'), -// 'mainmenu'=>'maintenanceatm', -// 'leftmenu'=>'', -// 'url'=>'/maintenanceatm/maintenanceatmindex.php', -// 'langs'=>'maintenanceatm@maintenanceatm', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. -// 'position'=>1000 + $r, -// 'enabled'=>'isModEnabled("maintenanceatm")', // Define condition to show or hide menu entry. Use 'isModEnabled("maintenanceatm")' if entry must be visible if module is enabled. -// 'perms'=>'1', // Use 'perms'=>'$user->hasRight("maintenanceatm", "myobject", "read")' if you want your menu with a permission rules -// 'target'=>'', -// 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both -// ); + // $this->menu[$r++] = array( + // 'fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + // 'type'=>'top', // This is a Top menu entry + // 'titre'=>'ModuleMaintenanceATMName', + // 'prefix' => img_picto('', $this->picto, 'class="pictofixedwidth valignmiddle"'), + // 'mainmenu'=>'maintenanceatm', + // 'leftmenu'=>'', + // 'url'=>'/maintenanceatm/maintenanceatmindex.php', + // 'langs'=>'maintenanceatm@maintenanceatm', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + // 'position'=>1000 + $r, + // 'enabled'=>'isModEnabled("maintenanceatm")', // Define condition to show or hide menu entry. Use 'isModEnabled("maintenanceatm")' if entry must be visible if module is enabled. + // 'perms'=>'1', // Use 'perms'=>'$user->hasRight("maintenanceatm", "myobject", "read")' if you want your menu with a permission rules + // 'target'=>'', + // 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + // ); /* END MODULEBUILDER TOPMENU */ /* BEGIN MODULEBUILDER LEFTMENU MYOBJECT */ /*$this->menu[$r++]=array( @@ -433,12 +433,12 @@ public function __construct($db) } /** - * Function called when module is enabled. - * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. - * It also creates data directories + * Function called when module is enabled. + * The init function adds constants, boxes, permissions and menus into Dolibarr database. + * It also creates data directories. * - * @param string $options Options when enabling module ('', 'noboxes') - * @return int 1 if OK, 0 if KO + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 or <0 if KO */ public function init($options = '') { @@ -502,12 +502,12 @@ public function init($options = '') } /** - * Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted + * Function called when module is disabled. + * Remove from database constants, boxes and permissions. + * Data directories are not deleted. * - * @param string $options Options when enabling module ('', 'noboxes') - * @return int 1 if OK, 0 if KO + * @param string $options Options when disabling module + * @return int 1 if OK, 0 or <0 if KO */ public function remove($options = '') { From 0e3509982e4b3500af905a859d9e50ad76ce20e1 Mon Sep 17 00:00:00 2001 From: atm-jonathan Date: Mon, 22 Dec 2025 12:02:53 +0100 Subject: [PATCH 2/3] token et redirection --- admin/setup.php | 184 +++++++++++++++++++++++------------------------- 1 file changed, 90 insertions(+), 94 deletions(-) diff --git a/admin/setup.php b/admin/setup.php index 15f5f44..2fe37c6 100644 --- a/admin/setup.php +++ b/admin/setup.php @@ -169,13 +169,13 @@ * Actions */ -if($action == 'setMaintenanceModeOn'){ +if ($action == 'setMaintenanceModeOn') { dolibarr_del_const($db, 'MAIN_ONLY_LOGIN_ALLOWED', 0); dolibarr_del_const($db, 'MAIN_ONLY_LOGIN_ALLOWED', $conf->entity); dolibarr_set_const($db, 'MAIN_ONLY_LOGIN_ALLOWED', $user->login, 'chaine', 1, 'Maintenance mode add by '.$user->login, 0); } -if($action == 'setMaintenanceModeOff'){ +if ($action == 'setMaintenanceModeOff') { dolibarr_del_const($db, 'MAIN_ONLY_LOGIN_ALLOWED', 0); dolibarr_del_const($db, 'MAIN_ONLY_LOGIN_ALLOWED', $conf->entity); } @@ -210,135 +210,131 @@ // Récupération de la date de mise en maintenance $maintTime = 0; $maintObj = $db->getRow('SELECT MAX(tms) tms FROM '.$db->prefix().'const WHERE name = \'MAIN_ONLY_LOGIN_ALLOWED\' '); -if($maintObj){ +if ($maintObj) { $maintTime = $db->jdate($maintObj->tms); } $mainOnlyLoginAllowed = getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED'); print '
'; -print ''.$langs->trans('MaintenanceStatus') . ' '; -if(!empty($mainOnlyLoginAllowed)){ - print dolGetBadge($langs->trans('MaintenanceOn'), '', 'success'); - print dolGetButtonAction( - $langs->trans('DisableMaintenanceMode'), - '', - 'danger', - dol_buildpath('maintenanceatm/admin/setup.php', 1).'?action=setMaintenanceModeOff', - '', - 1, - [ - 'confirm' => [ - //'url' => 'http://', // Overide Url to go when user click on action btn, if empty default url is $url.?confirm=yes, for no js compatibility use $url for fallback confirm. - 'title' => '', // Overide title of modal, if empty default title use "ConfirmBtnCommonTitle" lang key - 'action-btn-label' => $langs->trans('DisableMaintenanceMode'), // Overide label of action button, if empty default label use "Confirm" lang key - 'cancel-btn-label' => '', // Overide label of cancel button, if empty default label use "CloseDialog" lang key - 'content' => $langs->trans('ActivateMaintenanceModeOffConfirm'), // Overide text of content, if empty default content use "ConfirmBtnCommonContent" lang key - ], - ] - ); -}else{ - print dolGetBadge($langs->trans('MaintenanceOff'), '', 'info'); +// --- Préparation des variables factorisées --- +$ajaxUrl = dol_buildpath('/maintenanceatm/admin/setup.php', 1); +$cleanToken = newToken(); +$isMaintOn = !empty($mainOnlyLoginAllowed); - print dolGetButtonAction( - $langs->trans('ActivateMaintenanceMode'), - '', - 'danger', - dol_buildpath('maintenanceatm/admin/setup.php', 1).'?action=setMaintenanceModeOn', - '', - 1, - [ - 'confirm' => [ - //'url' => 'http://', // Overide Url to go when user click on action btn, if empty default url is $url.?confirm=yes, for no js compatibility use $url for fallback confirm. - 'title' => '', // Overide title of modal, if empty default title use "ConfirmBtnCommonTitle" lang key - 'action-btn-label' => $langs->trans('ActivateMaintenanceMode'), // Overide label of action button, if empty default label use "Confirm" lang key - 'cancel-btn-label' => '', // Overide label of cancel button, if empty default label use "CloseDialog" lang key - 'content' => $langs->trans('ActivateMaintenanceModeConfirm', $user->login), // Overide text of content, if empty default content use "ConfirmBtnCommonContent" lang key - ], - ] - ); +// 1. Titre et Badge d'état dans la légende +print '' . $langs->trans('MaintenanceStatus') . ' '; +if ($isMaintOn) { + print dolGetBadge($langs->trans('MaintenanceOn'), '', 'success'); +} else { + print dolGetBadge($langs->trans('MaintenanceOff'), '', 'info'); } - - print ''; -print '
'; - - -// Security warning if install.lock file is missing or if conf file is writable +// 2. Bouton d'action dynamique +$btnLabel = $isMaintOn ? 'DisableMaintenanceMode' : 'ActivateMaintenanceMode'; +$confirmMsg = $isMaintOn ? $langs->trans('ActivateMaintenanceModeOffConfirm') : $langs->trans('ActivateMaintenanceModeConfirm', $user->login); + +print dolGetButtonAction( + $langs->trans($btnLabel), + '', + 'danger', + '#', + 'btn-trigger-maint', + 1, + array( + 'confirm' => array( + 'title' => $langs->trans($btnLabel), + 'content' => $confirmMsg, + 'action-btn-label' => $langs->trans('Confirm'), + ) + ) +); + +// 3. Conteneur pour le tableau (auto-refresh) +print '
'; + +// Avertissements de sécurité (install.lock et conf.php) if (getDolGlobalString('MAIN_REMOVE_INSTALL_WARNING') || true) { - - // TODO : check for maint.lock (je me rappel plus du nom de fichier - - // Check if install lock file is present $lockfile = DOL_DATA_ROOT.'/install.lock'; - if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install")) { + if (!file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install")) { $langs->load("errors"); print info_admin($langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT).' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth'); } - // Conf files must be in read only mode - if (is_writable(DOL_DOCUMENT_ROOT.'/'.$conffile)) { // $conffile is defined into filefunc.inc.php + if (is_writable(DOL_DOCUMENT_ROOT.'/'.$conffile)) { $langs->load("errors"); print info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly").' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth'); } } -print ''; - -print ''; +print '
'; -print ''; +// Ligne : Dernier Backup SQL +print ''; +print ''; print ''; -print ''; -print ''; - - -if(empty($dolibarr_main_prod)){ - print ''; +// Ligne : Mode Production +if (empty($dolibarr_main_prod)) { + print ''; print ''; print ''; print ''; } - print '
'.$langs->trans('LastBackupSql').'
'.$langs->trans('LastBackupSql').' '; $fileArray = dol_dir_list($conf->admin->dir_output.'/backup', 'files', 0, '', '', "date", SORT_DESC, 1); -if(!empty($fileArray) && is_array($fileArray)){ - - $fileArray = reset($fileArray); - $class = $maintTime > (int) $fileArray['date'] ? 'warning' : 'success'; - if($maintTime < (int) $fileArray['date']){ - print dol_print_date($fileArray['date'], '%d/%m/%Y %H:%M:%S'); - }else{ - print dolGetBadge(dol_print_date($fileArray['date'], '%d/%m/%Y %H:%M:%S'), '' , 'warning'); +if (!empty($fileArray) && is_array($fileArray)) { + $latestFile = reset($fileArray); + $formattedDate = dol_print_date($latestFile['date'], '%d/%m/%Y %H:%M:%S'); + + // Alerte si la maintenance a été lancée APRES le dernier backup + if (isset($maintTime) && $maintTime > (int) $latestFile['date']) { + print dolGetBadge($formattedDate, '', 'warning'); + } else { + print $formattedDate; } - if(0 >= (int) $fileArray['size']){ - print ' '.dolGetBadge(dol_print_size($fileArray['size'], 0, 0), '' , 'danger'); + if (0 >= (int) $latestFile['size']) { + print ' '.dolGetBadge(dol_print_size($latestFile['size'], 0, 0), '', 'danger'); } - - print ' '.$fileArray['name']; - - -}else{ - dolGetBadge('NoBackupFound', '', 'danger'); + print ' '.$latestFile['name'].''; +} else { + print dolGetBadge($langs->trans('NoBackupFound'), '', 'danger'); } +print '
'.$langs->trans('ModeMainProd').''.dolGetBadge($langs->trans('Disabled'), '', 'danger').'
'; -print '
'; - -print ' - -'; - +print '
'; // Fin de maintenance-check-table + +// 4. SCRIPT UNIQUE : Gestion Redirection + Auto-refresh +print ''; print '
'; From b6dd5527ded7d21e393c416dc4d89a7468cfbd38 Mon Sep 17 00:00:00 2001 From: atm-jonathan Date: Mon, 22 Dec 2025 12:16:24 +0100 Subject: [PATCH 3/3] num version --- ChangeLog.md | 1 + class/actions_maintenanceatm.class.php | 1 - core/modules/modMaintenanceATM.class.php | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index e919365..a149297 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,7 @@ ## 1.1 +- FIX : COMPAT V23 - 1.1.2 *22/12/2025* - FIX : COMPAT V22 - 1.1.1 *08/07/2025* - NEW : configuration for redirection on login page to new URL - 1.1.0 *17/05/2024* diff --git a/class/actions_maintenanceatm.class.php b/class/actions_maintenanceatm.class.php index 558c565..0e58a68 100644 --- a/class/actions_maintenanceatm.class.php +++ b/class/actions_maintenanceatm.class.php @@ -104,7 +104,6 @@ public function getLoginPageOptions($parameters, &$object, &$action) } '; - // Ajout de la redirection JS if (filter_var($newUrl, FILTER_VALIDATE_URL)) { $redirectSeconds = 9; diff --git a/core/modules/modMaintenanceATM.class.php b/core/modules/modMaintenanceATM.class.php index 6c782af..007646e 100644 --- a/core/modules/modMaintenanceATM.class.php +++ b/core/modules/modMaintenanceATM.class.php @@ -72,7 +72,7 @@ public function __construct($db) $this->editor_url = 'https://www.atm-consulting.fr'; // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z' - $this->version = '1.1.1'; + $this->version = '1.1.2'; // Url to the file with your last numberversion of this module //$this->url_last_version = 'http://www.example.com/versionmodule.txt';