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