Skip to content

Commit

Permalink
Merge branch '8.0' of [email protected]:Dolibarr/dolibarr.git into 9.0
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/core/modules/DolibarrModules.class.php
  • Loading branch information
eldy committed Mar 5, 2019
2 parents 28a4217 + 98f5bb2 commit d18a585
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions htdocs/core/modules/DolibarrModules.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -880,24 +880,28 @@ function getImportDatasetLabel($r)
/**
* 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 '';
Expand All @@ -913,14 +917,19 @@ function getLastActivationInfo()
{
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();
Expand Down

0 comments on commit d18a585

Please sign in to comment.