summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-05-06 14:21:18 +0200
committerAleksander Machniak <alec@alec.pl>2012-05-08 12:09:40 +0200
commit89fc59d1710d1dfec5925c136dd2c8316323d91e (patch)
treedba1b9a2dbf4e1bdf4151d5139c34ca85d1a3628 /program
parentef92c51155601b521dd54d07758fbd7c957fcab4 (diff)
Print last commit date as (git) version
Conflicts: program/include/rcube_template.php
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_template.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index b2bdda488..adeaaef6d 100644
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -779,6 +779,13 @@ class rcube_template extends rcube_html_page
if (preg_match('/Revision:\s(\d+)/', @shell_exec('svn info'), $regs))
$ver .= ' [SVN r'.$regs[1].']';
}
+ else if (is_file(INSTALL_PATH . '.git/index')) {
+ if (preg_match('/Date:\s+([^\n]+)/', @shell_exec('git log -1'), $regs)) {
+ if ($date = date('Ymd.Hi', strtotime($regs[1]))) {
+ $ver .= ' [GIT '.$date.']';
+ }
+ }
+ }
$content = Q($ver);
}
else if ($object == 'steptitle') {