Commit 1fc9e978 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't show 'latest version is ...' until latest version is available


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 50187098
......@@ -236,18 +236,20 @@ function site_statistics($full=false) {
$data['name'] = get_config('sitename');
$data['release'] = get_config('release');
$data['version'] = get_config('version');
$data['latest_version'] = get_config('latest_version');
$data['installdate'] = format_date(strtotime(get_config('installation_time')), 'strftimedate');
$data['dbsize'] = db_total_size();
$data['diskusage'] = get_field('site_data', 'value', 'type', 'disk-usage');
$data['cronrunning'] = !record_exists_select('cron', 'nextrun < CURRENT_DATE');
if ($data['release'] == $data['latest_version']) {
$data['strlatestversion'] = get_string('uptodate', 'admin');
}
else {
$download_page = 'https://launchpad.net/mahara/+download';
$data['strlatestversion'] = get_string('latestversionis', 'admin', $download_page, $data['latest_version']);
if ($latestversion = get_config('latest_version')) {
$data['latest_version'] = $latestversion;
if ($data['release'] == $latestversion) {
$data['strlatestversion'] = get_string('uptodate', 'admin');
}
else {
$download_page = 'https://launchpad.net/mahara/+download';
$data['strlatestversion'] = get_string('latestversionis', 'admin', $download_page, $latestversion);
}
}
$data['strrankingsupdated'] = get_string('rankingsupdated', 'admin', date('Y-m-d H:i', get_config('registration_lastsent')));
......
......@@ -26,7 +26,7 @@
{if $sitedata.diskusage}
<p><strong>{str tag=diskusage section=admin}:</strong> {$sitedata.diskusage|display_size}</p>
{/if}
<p><strong>{str tag=maharaversion section=admin}:</strong> {$sitedata.release} ({$sitedata.strlatestversion})</p>
<p><strong>{str tag=maharaversion section=admin}:</strong> {$sitedata.release}{if $sitedata.strlatestversion} ({$sitedata.strlatestversion}){/if}</p>
<p><strong>{str tag=Cron section=admin}:</strong> {if $sitedata.cronrunning}{str tag=runningnormally section=admin}{else}{str tag=cronnotrunning section=admin}{/if}</p>
</div>
<div class="cb"></div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment