diff options
author | friendica <info@friendica.com> | 2014-12-21 18:40:25 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-12-21 18:40:25 -0800 |
commit | d3830aea9661dac0610eef72cad35b188832b7f2 (patch) | |
tree | 6609f577ec12b47eb53e5169a2e97f1039dbea31 | |
parent | b840c279957667168b400207caff14dc78043994 (diff) | |
download | volse-hubzilla-d3830aea9661dac0610eef72cad35b188832b7f2.tar.gz volse-hubzilla-d3830aea9661dac0610eef72cad35b188832b7f2.tar.bz2 volse-hubzilla-d3830aea9661dac0610eef72cad35b188832b7f2.zip |
provide last successful poll run time (using relative time) in siteinfo so that we can tell folks that have no idea what we're talking about that their poller definitely isn't running and this is probably why nothing works correctly.
-rwxr-xr-x | boot.php | 10 | ||||
-rw-r--r-- | include/bbcode.php | 5 | ||||
-rw-r--r-- | include/poller.php | 2 | ||||
-rw-r--r-- | mod/siteinfo.php | 6 | ||||
-rwxr-xr-x | view/tpl/siteinfo.tpl | 5 |
5 files changed, 21 insertions, 7 deletions
@@ -2171,3 +2171,13 @@ function get_directory_realm() { return DIRECTORY_REALM; } + + +/** + * @brief return relative date of last completed poller execution + */ + +function get_poller_runtime() { + $t = get_config('system','lastpoll'); + return relative_date($t); +}
\ No newline at end of file diff --git a/include/bbcode.php b/include/bbcode.php index 1037db045..9445eb007 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -368,11 +368,6 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_spacefy',$Text); } -// Not yet implemented - thinking this should display a map or perhaps be a map directive -// if (strpos($Text,'[location]') !== false) { -// $Text = preg_replace_callback("/\[location\](.*?)\[\/location\]/ism", 'bb_location',$Text); -// } - // If we find any event code, turn it into an event. diff --git a/include/poller.php b/include/poller.php index e13c6829d..bd3f81a2e 100644 --- a/include/poller.php +++ b/include/poller.php @@ -403,6 +403,8 @@ function poller_run($argv, $argc){ } } + set_config('system','lastpoll',datetime_convert()); + //All done - clear the lockfile @unlink($lockfile); diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 03e578467..53d47358d 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -73,6 +73,7 @@ function siteinfo_init(&$a) { 'site_name' => (($site_name) ? $site_name : ''), 'platform' => RED_PLATFORM, 'dbdriver' => $db->getdriver(), + 'lastpoll' => get_poller_runtime(), 'info' => (($site_info) ? $site_info : ''), 'channels_total' => $channels_total_stat, 'channels_active_halfyear' => $channels_active_halfyear_stat, @@ -134,10 +135,13 @@ 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_txt' => t('Tag: '), '$tag' => $tag, + '$polled' => t('Last background fetch: '), + '$lastpoll' => get_poller_runtime(), '$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.'), + '$visit' => t('Please visit <a href="https://redmatrix.me">RedMatrix.me</a> to learn more about the Red Matrix.'), '$bug_text' => t('Bug reports and issues: please visit'), '$bug_link_url' => 'https://github.com/friendica/red/issues', '$bug_link_text' => 'redmatrix issues', diff --git a/view/tpl/siteinfo.tpl b/view/tpl/siteinfo.tpl index a6105227e..3b0c8841c 100755 --- a/view/tpl/siteinfo.tpl +++ b/view/tpl/siteinfo.tpl @@ -5,7 +5,10 @@ <p>{{$version}}{{if $commit}}+{{$commit}}{{/if}}</p> {{/if}} {{if $tag}} -<p>Tag: {{$tag}}</p> +<p>{{$tag_txt}} {{$tag}}</p> +{{/if}} +{{if $polled}} +<p>{{$polled}} {{$lastpoll}}</p> {{/if}} <p>{{$web_location}}</p> <p>{{$visit}}</p> |