if (empty($CFG->disableupdatenotifications)) { // Only compute the update information when it is going to be displayed to the user. $availableupdates['core'] = $updateschecker->get_update_info('core', array('minmaturity' => $CFG->updateminmaturity, 'notifybuilds' => $CFG->updatenotifybuilds)); // Available updates for contributed plugins $pluginman = core_plugin_manager::instance(); foreach ($pluginman->get_plugins() as $plugintype => $plugintypeinstances) { foreach ($plugintypeinstances as $pluginname => $plugininfo) { if (!empty($plugininfo->availableupdates)) { foreach ($plugininfo->availableupdates as $pluginavailableupdate) { if ($pluginavailableupdate->version > $plugininfo->versiondisk) { if (!isset($availableupdates[$plugintype . '_' . $pluginname])) { $availableupdates[$plugintype . '_' . $pluginname] = array(); } $availableupdates[$plugintype . '_' . $pluginname][] = $pluginavailableupdate; } } } } } // The timestamp of the most recent check for available updates $availableupdatesfetch = $updateschecker->get_last_timefetched(); } $buggyiconvnomb = (!function_exists('mb_convert_encoding') and @iconv('UTF-8', 'UTF-8//IGNORE', '100' . chr(130) . '€') !== '100€'); //check if the site is registered on Moodle.org $registered = $DB->count_records('registration_hubs', array('huburl' => HUB_MOODLEORGHUBURL, 'confirmed' => 1)); // Check if there are any cache warnings. $cachewarnings = cache_helper::warnings(); admin_externalpage_setup('adminnotifications'); /* @var core_admin_renderer $output */ $output = $PAGE->get_renderer('core', 'admin'); echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed, $cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb, $registered, $cachewarnings);
$confirmation = get_string('deletelockconfirmation', 'cache', $lock); echo $OUTPUT->confirm($confirmation, $button, $PAGE->url); echo $OUTPUT->footer(); exit; } else { $writer = cache_config_writer::instance(); $writer->delete_lock_instance($lock); redirect($PAGE->url, get_string('deletelocksuccess', 'cache'), 5); } } break; } } // Add cache store warnings to the list of notifications. // Obviously as these are warnings they are show as failures. foreach (cache_helper::warnings($stores) as $warning) { $notifications[] = array($warning, false); } $PAGE->set_title($title); $PAGE->set_heading($SITE->fullname); /* @var core_cache_renderer $renderer */ $renderer = $PAGE->get_renderer('core_cache'); echo $renderer->header(); echo $renderer->heading($title); echo $renderer->notifications($notifications); if ($mform instanceof moodleform) { $mform->display(); } else { echo $renderer->store_plugin_summaries($plugins); echo $renderer->store_instance_summariers($stores, $plugins); echo $renderer->definition_summaries($definitions, $context);