aboutsummaryrefslogtreecommitdiffstats
path: root/mod/siteinfo.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/siteinfo.php')
-rw-r--r--mod/siteinfo.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/mod/siteinfo.php b/mod/siteinfo.php
index de55c69cf..a58f17c53 100644
--- a/mod/siteinfo.php
+++ b/mod/siteinfo.php
@@ -55,6 +55,7 @@ function siteinfo_init(&$a) {
$channels_active_halfyear_stat = intval(get_config('system','channels_active_halfyear_stat'));
$channels_active_monthly_stat = intval(get_config('system','channels_active_monthly_stat'));
$local_posts_stat = intval(get_config('system','local_posts_stat'));
+ $hide_in_statistics = intval(get_config('system','hide_in_statistics'));
$data = Array(
'version' => RED_VERSION,
@@ -74,7 +75,8 @@ function siteinfo_init(&$a) {
'channels_total' => $channels_total_stat,
'channels_active_halfyear' => $channels_active_halfyear_stat,
'channels_active_monthly' => $channels_active_monthly_stat,
- 'local_posts' => $local_posts_stat
+ 'local_posts' => $local_posts_stat,
+ 'hide_in_statistics' => $hide_in_statistics
);
json_return_and_die($data);
}
@@ -86,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 = '';
}
@@ -128,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.'),