diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1b12dd75d4d..69cd1ed911c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9713,6 +9713,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url = /** * Add space between dolGetButtonTitle * + * @param string $moreClass more css class label * @return string html of title separator */ function dolGetButtonTitleSeparator($moreClass = "") @@ -9765,8 +9766,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u if ($status == 2) { $attr['class'] .= ' btnTitleSelected'; - } - elseif ($status <= 0) { + } elseif ($status <= 0) { $attr['class'] .= ' refused'; $attr['href'] = ''; diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 1cc2fbe4444..c1f03b9c989 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2277,7 +2277,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { $versionTitle = $langs->trans("Version").' '.$this->getVersion(1); - if ($this->needUpdate){ + if ($this->needUpdate) { $versionTitle.= '
'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion; } @@ -2318,7 +2318,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * * @return int <0 if Error, 0 == no update needed, >0 if need update */ - function checkForUpdate(){ + public function checkForUpdate(){ require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; if (!empty($this->url_last_version)) { $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only @@ -2328,12 +2328,11 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if (version_compare($this->lastVersion, $this->version) > 0) { $this->needUpdate = true; return 1; - }else{ + } else { $this->needUpdate = false; return 0; } - } - else{ + } else { return -1; } }