Fix code Stickler
This commit is contained in:
parent
fff358f040
commit
781756913b
@ -9713,6 +9713,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
|
|||||||
/**
|
/**
|
||||||
* Add space between dolGetButtonTitle
|
* Add space between dolGetButtonTitle
|
||||||
*
|
*
|
||||||
|
* @param string $moreClass more css class label
|
||||||
* @return string html of title separator
|
* @return string html of title separator
|
||||||
*/
|
*/
|
||||||
function dolGetButtonTitleSeparator($moreClass = "")
|
function dolGetButtonTitleSeparator($moreClass = "")
|
||||||
@ -9765,8 +9766,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
|||||||
|
|
||||||
if ($status == 2) {
|
if ($status == 2) {
|
||||||
$attr['class'] .= ' btnTitleSelected';
|
$attr['class'] .= ' btnTitleSelected';
|
||||||
}
|
} elseif ($status <= 0) {
|
||||||
elseif ($status <= 0) {
|
|
||||||
$attr['class'] .= ' refused';
|
$attr['class'] .= ' refused';
|
||||||
|
|
||||||
$attr['href'] = '';
|
$attr['href'] = '';
|
||||||
|
|||||||
@ -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)) {
|
if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) {
|
||||||
|
|
||||||
$versionTitle = $langs->trans("Version").' '.$this->getVersion(1);
|
$versionTitle = $langs->trans("Version").' '.$this->getVersion(1);
|
||||||
if ($this->needUpdate){
|
if ($this->needUpdate) {
|
||||||
$versionTitle.= '<br/>'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion;
|
$versionTitle.= '<br/>'.$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
|
* @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';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||||
if (!empty($this->url_last_version)) {
|
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
|
$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) {
|
if (version_compare($this->lastVersion, $this->version) > 0) {
|
||||||
$this->needUpdate = true;
|
$this->needUpdate = true;
|
||||||
return 1;
|
return 1;
|
||||||
}else{
|
} else {
|
||||||
$this->needUpdate = false;
|
$this->needUpdate = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user