Commit a0a8dd0f authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1474136: Altering the admin message about cron when site closed



Change-Id: I24d34159e337d7ece6d003b1c42cda01a0fe4e80
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 209b78f1
......@@ -264,6 +264,7 @@ $string['viewsperuser'] = 'Users who make pages have about %s pages each';
$string['Cron'] = 'Cron';
$string['runningnormally'] = 'Running normally';
$string['cronnotrunning1'] = '<span class="error">Cron is not running.</span><br>See the <a href="http://wiki.mahara.org/System_Administrator\'s_Guide/Installing_Mahara">installation guide</a> for instructions on how to set it up. If you have already set up cron, one or more of its activities have failed to run recently.';
$string['cronnotrunningsiteclosed'] = '<span class="error">Cron is not running.</span><br>The site is currently closed. Please re-open the site for the cron to run.';
$string['Loggedin'] = 'Logged in';
$string['youraverageuser'] = 'Your average user...';
$string['statsmaxfriends1'] = array(
......
......@@ -386,6 +386,7 @@ function site_statistics($full=false) {
$data['dbsize'] = db_total_size();
$data['diskusage'] = get_field('site_data', 'value', 'type', 'disk-usage');
$data['cronrunning'] = !record_exists_select('cron', 'nextrun IS NULL OR nextrun < CURRENT_DATE');
$data['siteclosedbyadmin'] = get_config('siteclosedbyadmin');
if ($latestversion = get_config('latest_version')) {
$data['latest_version'] = $latestversion;
......
......@@ -58,6 +58,8 @@
</tr>
<tr>
<th>{str tag=Cron section=admin}</th>
<td>{if $sitedata.cronrunning}{str tag=runningnormally section=admin}{else}{str tag=cronnotrunning1 section=admin}{/if}</td>
<td>{if $sitedata.cronrunning}{str tag=runningnormally section=admin}{else}
{if $sitedata.siteclosedbyadmin}{str tag=cronnotrunningsiteclosed section=admin}{else}{str tag=cronnotrunning1 section=admin}{/if}
{/if}</td>
</tr>
</table>
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