From 657cb5ab62392458d9312f66e7d7934ca4437377 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20Mudr=C3=A1k?= Date: Mon, 30 Mar 2015 23:15:54 +0200 Subject: [PATCH] MDL-49377 admin: Recommend keeping the site updated to latest version --- admin/renderer.php | 2 ++ lang/en/admin.php | 1 + lib/classes/update/checker.php | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/admin/renderer.php b/admin/renderer.php index 26afb9062dd..5d75e70ba87 100644 --- a/admin/renderer.php +++ b/admin/renderer.php @@ -721,6 +721,8 @@ class core_admin_renderer extends plugin_renderer_base { foreach ($updates['core'] as $update) { $updateinfo .= $this->moodle_available_update_info($update); } + $updateinfo .= html_writer::tag('p', get_string('updateavailablerecommendation', 'core_admin'), + array('class' => 'updateavailablerecommendation')); } unset($updates['core']); // If something has left in the $updates array now, it is updates for plugins. diff --git a/lang/en/admin.php b/lang/en/admin.php index 5429ad4e0d9..235870b5d4f 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -1077,6 +1077,7 @@ $string['updateavailable_release'] = 'Moodle {$a}'; $string['updateavailable_version'] = 'Version {$a}'; $string['updateavailableinstall'] = 'Install this update'; $string['updateavailablenot'] = 'Your Moodle code is up-to-date!'; +$string['updateavailablerecommendation'] = 'We strongly recommend you keep your Moodle site updated to the latest version, so that you can be sure you have all our latest fixes for security issues and other bugs.'; $string['updatenotifications'] = 'Update notifications'; $string['updatenotificationfooter'] = 'Your Moodle site {$a->siteurl} is configured to automatically check for available updates. You are receiving this message as the administrator of the site. You can disable automatic checks for available updates in the Site administration section of the Administration block. You can customize the delivery of this message via your personal Messaging setting in the My profile settings section.'; $string['updatenotificationsubject'] = 'Moodle updates are available ({$a->siteurl})'; diff --git a/lib/classes/update/checker.php b/lib/classes/update/checker.php index d9f207c24b7..9b211ef7117 100644 --- a/lib/classes/update/checker.php +++ b/lib/classes/update/checker.php @@ -754,6 +754,9 @@ class checker { $text .= get_string('updateavailabledetailslink', 'core_admin', $a) . PHP_EOL; $a = array('url' => html_writer::link($CFG->wwwroot.'/'.$CFG->admin.'/index.php', $CFG->wwwroot.'/'.$CFG->admin.'/index.php')); $html .= html_writer::tag('p', get_string('updateavailabledetailslink', 'core_admin', $a)) . PHP_EOL; + + $text .= PHP_EOL . get_string('updateavailablerecommendation', 'core_admin') . PHP_EOL; + $html .= html_writer::tag('p', get_string('updateavailablerecommendation', 'core_admin')) . PHP_EOL; } if (!empty($pluginupdates)) { @@ -785,7 +788,7 @@ class checker { } $a = array('siteurl' => $CFG->wwwroot); - $text .= get_string('updatenotificationfooter', 'core_admin', $a) . PHP_EOL; + $text .= PHP_EOL . get_string('updatenotificationfooter', 'core_admin', $a) . PHP_EOL; $a = array('siteurl' => html_writer::link($CFG->wwwroot, $CFG->wwwroot)); $html .= html_writer::tag('footer', html_writer::tag('p', get_string('updatenotificationfooter', 'core_admin', $a), array('style' => 'font-size:smaller; color:#333;'))); -- 2.43.0