aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Willingham <beardyunixer@beardyunixer.com>2014-10-11 17:24:58 +0100
committerThomas Willingham <beardyunixer@beardyunixer.com>2014-10-11 17:24:58 +0100
commit82232c6916ba6a657bbae524ada3c4ba21001156 (patch)
tree93daea2f157b2cb641e816dd6ce90ae3d9ab9fc5
parentb84b2d5aa50a58e0ca85d56e02a83bdfbc3d9cde (diff)
downloadvolse-hubzilla-82232c6916ba6a657bbae524ada3c4ba21001156.tar.gz
volse-hubzilla-82232c6916ba6a657bbae524ada3c4ba21001156.tar.bz2
volse-hubzilla-82232c6916ba6a657bbae524ada3c4ba21001156.zip
Show tag in siteinfo. Not useful for us, quite useful for admins.
-rw-r--r--mod/siteinfo.php5
-rwxr-xr-xview/tpl/siteinfo.tpl3
2 files changed, 7 insertions, 1 deletions
diff --git a/mod/siteinfo.php b/mod/siteinfo.php
index c1d65fadd..a58f17c53 100644
--- a/mod/siteinfo.php
+++ b/mod/siteinfo.php
@@ -88,8 +88,10 @@ function siteinfo_content(&$a) {
if(! get_config('system','hidden_version_siteinfo')) {
$version = sprintf( t('Version %s'), RED_VERSION );
- if(@is_dir('.git') && function_exists('shell_exec'))
+ if(@is_dir('.git') && function_exists('shell_exec')) {
$commit = @shell_exec('git log -1 --format="%h"');
+ $tag = @shell_exec('git describe --tags --abbrev=0');
+ }
if(! isset($commit) || strlen($commit) > 16)
$commit = '';
}
@@ -130,6 +132,7 @@ function siteinfo_content(&$a) {
'$title' => t('Red'),
'$description' => t('This is a hub of the Red Matrix - a global cooperative network of decentralized privacy enhanced websites.'),
'$version' => $version,
+ '$tag' => $tag,
'$commit' => $commit,
'$web_location' => t('Running at web location') . ' ' . z_root(),
'$visit' => t('Please visit <a href="http://getzot.com">GetZot.com</a> to learn more about the Red Matrix.'),
diff --git a/view/tpl/siteinfo.tpl b/view/tpl/siteinfo.tpl
index d956a7228..a6105227e 100755
--- a/view/tpl/siteinfo.tpl
+++ b/view/tpl/siteinfo.tpl
@@ -4,6 +4,9 @@
{{if $version}}
<p>{{$version}}{{if $commit}}+{{$commit}}{{/if}}</p>
{{/if}}
+{{if $tag}}
+<p>Tag: {{$tag}}</p>
+{{/if}}
<p>{{$web_location}}</p>
<p>{{$visit}}</p>
<p>{{$bug_text}} <a href="{{$bug_link_url}}">{{$bug_link_text}}</a></p>