MDL-45724 cache: added cache API warnings to the admin notifications page

This commit is contained in:
Sam Hemelryk
2014-07-21 09:49:45 +12:00
parent 7bc4ca8b88
commit f7a54f619a
6 changed files with 61 additions and 16 deletions
+2 -10
View File
@@ -280,15 +280,7 @@ if (!empty($action) && confirm_sesskey()) {
}
}
// Stores can add notices to the cache configuration screen for things like conflicting configurations etc.
// Here we check each cache to see if it has warnings.
foreach ($stores as $store) {
if (!empty($store['warnings']) && is_array($store['warnings'])) {
foreach ($store['warnings'] as $warning) {
$notifications[] = array($warning, false);
}
}
}
$notifications = array_merge($notifications, cache_helper::warnings($stores));
$PAGE->set_title($title);
$PAGE->set_heading($SITE->fullname);
@@ -297,7 +289,7 @@ $renderer = $PAGE->get_renderer('core_cache');
echo $renderer->header();
echo $renderer->heading($title);
echo $renderer->notififications($notifications);
echo $renderer->notifications($notifications);
if ($mform instanceof moodleform) {
$mform->display();