forked from Wavyzz/dolibarr
Merge pull request #19461 from frederic34/lastactivationversion
keep info on latest activation version of module
This commit is contained in:
@@ -262,6 +262,11 @@ if ($ip) {
|
||||
$text .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationIP").':</span> ';
|
||||
$text .= $ip;
|
||||
}
|
||||
$lastactivationversion = $tmp['lastactivationversion'];
|
||||
if ($lastactivationversion) {
|
||||
$text .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationVersion").':</span> ';
|
||||
$text .= $lastactivationversion;
|
||||
}
|
||||
|
||||
$moreinfo = $text;
|
||||
|
||||
|
||||
@@ -957,7 +957,12 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
$tmp = json_decode($obj->note, true);
|
||||
}
|
||||
if ($obj) {
|
||||
return array('authorid'=>$tmp['authorid'], 'ip'=>$tmp['ip'], 'lastactivationdate'=>$this->db->jdate($obj->tms));
|
||||
return array(
|
||||
'authorid' => $tmp['authorid'],
|
||||
'ip' => $tmp['ip'],
|
||||
'lastactivationdate' => $this->db->jdate($obj->tms),
|
||||
'lastactivationversion' => (!empty($tmp['lastactivationversion']) ? $tmp['lastactivationversion'] : 'unknown'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -991,7 +996,13 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
$err++;
|
||||
}
|
||||
|
||||
$note = json_encode(array('authorid'=>(is_object($user) ? $user->id : 0), 'ip'=>(empty($_SERVER['REMOTE_ADDR']) ? '' : $_SERVER['REMOTE_ADDR'])));
|
||||
$note = json_encode(
|
||||
array(
|
||||
'authorid' => (is_object($user) ? $user->id : 0),
|
||||
'ip' => (empty($_SERVER['REMOTE_ADDR']) ? '' : $_SERVER['REMOTE_ADDR']),
|
||||
'lastactivationversion' => $this->version,
|
||||
)
|
||||
);
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name, value, visible, entity, note) VALUES";
|
||||
$sql .= " (".$this->db->encrypt($this->const_name);
|
||||
|
||||
@@ -353,6 +353,7 @@ LastStableVersion=Latest stable version
|
||||
LastActivationDate=Latest activation date
|
||||
LastActivationAuthor=Latest activation author
|
||||
LastActivationIP=Latest activation IP
|
||||
LastActivationVersion=Latest activation version
|
||||
UpdateServerOffline=Update server offline
|
||||
WithCounter=Manage a counter
|
||||
GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br>
|
||||
|
||||
Reference in New Issue
Block a user