Skip to content

Instantly share code, notes, and snippets.

@vijaycs85
Created July 9, 2013 13:28
Show Gist options
  • Save vijaycs85/5957356 to your computer and use it in GitHub Desktop.
Save vijaycs85/5957356 to your computer and use it in GitHub Desktop.
testing from PHPstorm
/**
* Global flag to identify update.php and authorize.php runs.
*
* Identifies update.php and authorize.php runs, avoiding unwanted operations
* such as hook_init() and hook_exit() invokes, css/js preprocessing and
* translation, and solves some theming issues. The flag is checked in other
* places in Drupal code (not just authorize.php).
*/
define('MAINTENANCE_MODE', 'update');
/**
* Renders a 403 access denied page for authorize.php.
*/
function authorize_access_denied_page() {
drupal_add_http_header('Status', '403 Forbidden');
watchdog('access denied', 'authorize.php', NULL, WATCHDOG_WARNING);
drupal_set_title('Access denied');
return t('You are not allowed to access this page.');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment