Skip to content
Snippets Groups Projects
Commit e3aa84ff authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

NEW Add last activation date as info in module list.

parent 2668cb20
No related branches found
No related tags found
No related merge requests found
...@@ -520,6 +520,11 @@ if ($mode != 'marketplace') ...@@ -520,6 +520,11 @@ if ($mode != 'marketplace')
{ {
$text.='<br><strong>'.$langs->trans("Origin").':</strong> '.$langs->trans("Core").'<br>'; $text.='<br><strong>'.$langs->trans("Origin").':</strong> '.$langs->trans("Core").'<br>';
} }
$text.='<br><strong>'.$langs->trans("LastActivationDate").':</strong> ';
if (! empty($conf->global->$const_name)) $text.=dol_print_date($objMod->getLastActivationDate(), 'dayhour');
else $text.=$langs->trans("Disabled");
$text.='<br>';
$text.='<br><strong>'.$langs->trans("AddRemoveTabs").':</strong> '; $text.='<br><strong>'.$langs->trans("AddRemoveTabs").':</strong> ';
if (isset($objMod->tabs) && is_array($objMod->tabs) && count($objMod->tabs)) if (isset($objMod->tabs) && is_array($objMod->tabs) && count($objMod->tabs))
{ {
...@@ -650,22 +655,23 @@ if ($mode != 'marketplace') ...@@ -650,22 +655,23 @@ if ($mode != 'marketplace')
print $form->textwithpicto('', $text, 1, 'help', 'minheight20'); print $form->textwithpicto('', $text, 1, 'help', 'minheight20');
// Picto warning print '</td>';
// Version
print '<td align="center" valign="top" class="nowrap">';
// Picto warning
$version=$objMod->getVersion(0); $version=$objMod->getVersion(0);
$versiontrans=$objMod->getVersion(1); $versiontrans=$objMod->getVersion(1);
if (preg_match('/development/i', $version)) print img_warning($langs->trans("Development"), 'style="float: right"'); if (preg_match('/development/i', $version)) print img_warning($langs->trans("Development"), 'style="float: left"');
if (preg_match('/experimental/i', $version)) print img_warning($langs->trans("Experimental"), 'style="float: right"'); if (preg_match('/experimental/i', $version)) print img_warning($langs->trans("Experimental"), 'style="float: left"');
if (preg_match('/deprecated/i', $version)) print img_warning($langs->trans("Deprecated"), 'style="float: right"'); if (preg_match('/deprecated/i', $version)) print img_warning($langs->trans("Deprecated"), 'style="float: left"');
// Picto external // Picto external
if ($textexternal) print img_picto($langs->trans("ExternalModule",$dirofmodule), 'external', 'style="float: right"'); if ($textexternal) print img_picto($langs->trans("ExternalModule",$dirofmodule), 'external', 'style="float: left"');
print '</td>';
// Version
print '<td align="center" valign="top" class="nowrap">';
print $versiontrans; print $versiontrans;
print "</td>\n"; print "</td>\n";
// Activate/Disable and Setup (2 columns) // Activate/Disable and Setup (2 columns)
......
...@@ -709,7 +709,33 @@ class DolibarrModules // Can not be abstract, because we need to insta ...@@ -709,7 +709,33 @@ class DolibarrModules // Can not be abstract, because we need to insta
} }
} }
/**
* Gives the last date of activation
*
* @return timestamp Date of last activation
*/
function getLastActivationDate()
{
global $conf;
$sql = "SELECT tms FROM ".MAIN_DB_PREFIX."const";
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$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
{
$obj=$this->db->fetch_object($resql);
if ($obj) return $this->db->jdate($obj->tms);
}
return '';
}
/** /**
* Insert constants for module activation * Insert constants for module activation
* *
......
...@@ -278,6 +278,7 @@ YouCanSubmitFile=For this step, you can send package using this tool: Select mod ...@@ -278,6 +278,7 @@ YouCanSubmitFile=For this step, you can send package using this tool: Select mod
CurrentVersion=Dolibarr current version CurrentVersion=Dolibarr current version
CallUpdatePage=Go to the page that updates the database structure and data: %s. CallUpdatePage=Go to the page that updates the database structure and data: %s.
LastStableVersion=Latest stable version LastStableVersion=Latest stable version
LastActivationDate=Last activation date
UpdateServerOffline=Update server offline UpdateServerOffline=Update server offline
GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could 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 previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> same as previous 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 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> GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could 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 previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> same as previous 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 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>
GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.<br><b>{tttt}</b> The code of thirdparty type on n characters (see dictionary-thirdparty types).<br> GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.<br><b>{tttt}</b> The code of thirdparty type on n characters (see dictionary-thirdparty types).<br>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment