Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0

Conflicts:
	htdocs/core/modules/DolibarrModules.class.php
This commit is contained in:
Laurent Destailleur 2019-03-05 15:57:31 +01:00
commit d18a5853df

View File

@ -880,24 +880,28 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
/**
* Gives the last date of activation
*
* @return timestamp Date of last activation
* @return timestamp|string Date of last activation
*/
function getLastActivationDate()
{
global $conf;
$err = 0;
$sql = "SELECT tms FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->db->escape($this->const_name)."'";
$sql.= " AND entity IN (0, ".$conf->entity.")";
dol_syslog(get_class($this)."::getLastActiveDate", LOG_DEBUG);
$resql=$this->db->query($sql);
if (! $resql) { $err++;
} else
if (! $resql)
{
$err++;
}
else
{
$obj=$this->db->fetch_object($resql);
if ($obj) { return $this->db->jdate($obj->tms);
}
if ($obj) { return $this->db->jdate($obj->tms); }
}
return '';
@ -913,14 +917,19 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
{
global $conf;
$sql = "SELECT tms, note FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->db->escape($this->const_name)."'";
$sql.= " AND entity IN (0, ".$conf->entity.")";
$err = 0;
$sql = "SELECT tms, note FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->db->escape($this->const_name)."'";
$sql.= " AND entity IN (0, ".$conf->entity.")";
dol_syslog(get_class($this)."::getLastActiveDate", LOG_DEBUG);
$resql=$this->db->query($sql);
if (! $resql) { $err++;
} else
if (! $resql)
{
$err++;
}
else
{
$obj=$this->db->fetch_object($resql);
$tmp=array();