1 update.php | update_access_denied_page() |
Renders a 403 access denied page for update.php.
Return value
Rendered HTML warning with 403 status.:
File
- core/
update.php, line 384 - Administrative page for handling updates from one Backdrop version to another.
Code
function update_access_denied_page() {
backdrop_add_http_header('Status', '403 Forbidden');
watchdog('access denied', 'update.php', NULL, WATCHDOG_WARNING);
backdrop_set_title(t('Access denied'));
$output = '';
$steps = array();
$output .= t('You are not authorized to access this page. Log in using either an account with the !permission permission, or the site maintenance account (the account you created during installation). If you cannot log in, you will have to edit !settings_file to bypass this access check. To do this:', array(
'!permission' => '<em>administer software updates</em>',
'!settings_file' => '<code>settings.php</code>',
));
$output = '<p>' . $output . '</p>';
$steps[] = t('Find the !settings_file file on your system, and open it with a text editor.', array(
'!settings_file' => '<code>settings.php</code>',
));
$steps[] = t('Find the line for !current_value. Change it to !new_value.', array(
'!settings_file' => '<code>settings.php</code>',
'!current_value' => '<code>$settings[\'update_free_access\'] = FALSE;</code>',
'!new_value' => '<code>$settings[\'update_free_access\'] = TRUE;</code>',
));
$steps[] = t('Reload this page. The site restore script should be able to run now.');
$steps[] = t('As soon as the update script is done, you must change the setting back to !value.', array(
'!value' => '<code>FALSE</code>',
));
$output .= theme('item_list', array('items' => $steps, 'type' => 'ol'));
return $output;
}