MAINTENANCE_MODE

Global flag to identify update.php and authorize.php runs.

Identifies update.php and authorize.php runs, avoiding unwanted operations such as css/js preprocessing and translation, and solves some theming issues. The flag is checked in other places in Drupal code (not just authorize.php).

5 uses of MAINTENANCE_MODE
hook_cache_flush in core/core.api.php
Flush all persistent and static caches.
StatusReport::preRenderGroupRequirements in core/lib/Drupal/Core/Render/Element/StatusReport.php
Render API callback: Groups requirements.
StatusReportPage::preRenderCounters in core/modules/system/src/Element/StatusReportPage.php
The #pre_render callback to create counter elements.
ThemePreprocess::preprocessInstallPage in core/lib/Drupal/Core/Theme/ThemePreprocess.php
Prepares variables for install page templates.
_drupal_maintenance_theme in core/includes/theme.maintenance.inc
Sets up the theming system for maintenance page.

File

core/authorize.php, line 47

Code

const MAINTENANCE_MODE = 'update';

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.