Ajout datetime GIT repo version
This commit is contained in:
parent
0425d069f9
commit
12e1f4326d
|
|
@ -3,9 +3,9 @@
|
|||
// SMARTY DISPLAY //
|
||||
|
||||
function display() {
|
||||
$GLOBALS['smarty'] -> assign('gitVS',getGitVersion());
|
||||
$GLOBALS['smarty'] -> assign('debug',isset($GLOBALS['debug']) ? $GLOBALS['debug'] : false);
|
||||
$GLOBALS['smarty'] -> assign('errors',isset($GLOBALS['errors']) ? $GLOBALS['errors'] : false);
|
||||
$GLOBALS['smarty'] -> assign('gitVS',getGitVersion());
|
||||
|
||||
$GLOBALS['smarty'] -> assign('jsFiles',$GLOBALS['jsFiles']);
|
||||
$GLOBALS['smarty'] -> assign('cssFiles',$GLOBALS['cssFiles']);
|
||||
|
|
@ -85,8 +85,10 @@ function getGitVersion() {
|
|||
exec('git describe --always',$version_mini_hash);
|
||||
exec('git rev-list HEAD | wc -l',$version_number);
|
||||
exec('git log -1',$line);
|
||||
exec('git log -1 --format=%cd --date=iso',$date);
|
||||
$version['short'] = "v1.".trim($version_number[0]).".".$version_mini_hash[0];
|
||||
$version['full'] = "v1.".trim($version_number[0]).".$version_mini_hash[0] (".str_replace('commit ','',$line[0]).")";
|
||||
$version['date'] = formatDate($date[0], 'iso', 'datetime');
|
||||
return $version;
|
||||
}
|
||||
|
||||
|
|
@ -190,6 +192,7 @@ function strtoupperFirstLetter($str) {
|
|||
'mysql_datetime' => "Y-m-d H:i:s",
|
||||
'strdate' => "Y-m-d",
|
||||
'strdatetime' => "Y-m-d_H.i.s",
|
||||
'iso' => "Y-m-d H:i:s P",
|
||||
'time' => "H:i",
|
||||
'print_time' => "H:i",
|
||||
'mois' => "m-d"
|
||||
|
|
@ -204,10 +207,11 @@ function dateFormatHasDate($format) {
|
|||
|| $format=='mysql_datetime'
|
||||
|| $format=='strdate'
|
||||
|| $format=='strdatetime'
|
||||
|| $format=='iso'
|
||||
|| $format=='timestamp';
|
||||
}
|
||||
function dateFormatHasTime($format) {
|
||||
return $format=='datetime' || $format=='mysql_datetime' || $format=='strdatetime' || $format=='timestamp';
|
||||
return $format=='datetime' || $format=='mysql_datetime' || $format=='strdatetime' || $format=='iso' || $format=='timestamp';
|
||||
}
|
||||
|
||||
function parseDate($dateTxt='', $format="mysql_datetime", $moment=false, $dateTimeZoneTxt = "Europe/Paris") {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<li><a href="https://connexion.pixap.fr/logout/"><i class="glyphicon glyphicon-off"></i> déconnection</a></li>
|
||||
<li class="divider"></li>
|
||||
<li style="padding-left: 20px;">
|
||||
<b>GIT vs. : </b> {$gitVS.short}
|
||||
<b>GIT vs. : </b> {$gitVS.short}<br/><i>{$gitVS.date}</i>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
|||
Loading…
Reference in New Issue