Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation.

This commit is contained in:
Pantheon Automation 2015-11-17 13:42:33 -08:00 committed by Greg Anderson
parent 4afb23bbd3
commit 7784f4c23d
929 changed files with 19798 additions and 5304 deletions

View file

@ -119,8 +119,11 @@ function error_displayable($error = NULL) {
* %line, severity_level, and backtrace. All the parameters are plain-text,
* with the exception of @message, which needs to be an HTML string, and
* backtrace, which is a standard PHP backtrace.
* @param $fatal
* TRUE if the error is fatal.
* @param bool $fatal
* TRUE for:
* - An exception is thrown and not caught by something else.
* - A recoverable fatal error, which is a fatal error.
* Non-recoverable fatal errors cannot be logged by Drupal.
*/
function _drupal_log_error($error, $fatal = FALSE) {
$is_installer = drupal_installation_attempted();
@ -169,6 +172,11 @@ function _drupal_log_error($error, $fatal = FALSE) {
}
}
// Log fatal errors, so developers can find and debug them.
if ($fatal) {
error_log(sprintf('%s: %s in %s on line %d', $error['%type'], $error['@message'], $error['%file'], $error['%line']));
}
if (PHP_SAPI === 'cli') {
if ($fatal) {
// When called from CLI, simply output a plain text message.

View file

@ -15,6 +15,7 @@ use Drupal\Core\Language\LanguageManager;
use Drupal\Core\Logger\LoggerChannelFactory;
use Drupal\Core\Site\Settings;
use Drupal\Core\StringTranslation\Translator\FileTranslation;
use Drupal\Core\StackMiddleware\ReverseProxyMiddleware;
use Drupal\Core\Extension\ExtensionDiscovery;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\Url;
@ -403,6 +404,8 @@ function install_begin_request($class_loader, &$install_state) {
$kernel->setSitePath($site_path);
$kernel->boot();
$container = $kernel->getContainer();
// If Drupal is being installed behind a proxy, configure the request.
ReverseProxyMiddleware::setSettingsOnRequest($request, Settings::getInstance());
// Register the file translation service.
if (isset($GLOBALS['config']['locale.settings']['translation']['path'])) {

View file

@ -1778,7 +1778,7 @@ function drupal_common_theme() {
),
// From menu.inc.
'menu' => array(
'variables' => array('items' => array(), 'attributes' => array()),
'variables' => array('menu_name' => NULL, 'items' => array(), 'attributes' => array()),
),
'menu_local_task' => array(
'render element' => 'element',

View file

@ -82,19 +82,21 @@ function _drupal_maintenance_theme() {
$theme = $custom_theme;
// Find all our ancestor themes and put them in an array.
$base_theme = array();
// @todo This is just a workaround. Find a better way how to handle themes
// on maintenance pages, see https://www.drupal.org/node/2322619.
// This code is basically a duplicate of
// \Drupal\Core\Theme\ThemeInitialization::getActiveThemeByName.
$base_themes = [];
$ancestor = $theme;
while ($ancestor && isset($themes[$ancestor]->base_theme)) {
$base_theme[] = $themes[$themes[$ancestor]->base_theme];
$base_themes[] = $themes[$themes[$ancestor]->base_theme];
$ancestor = $themes[$ancestor]->base_theme;
if ($ancestor) {
// Ensure that the base theme is added.
// Ensure that the base theme is added and installed.
$theme_handler->addTheme($themes[$ancestor]);
}
}
// @todo This is just a workaround. Find a better way how to handle themes
// on maintenance pages, see https://www.drupal.org/node/2322619.
\Drupal::theme()->setActiveTheme($theme_init->getActiveTheme($themes[$custom_theme], array_reverse($base_theme)));
\Drupal::theme()->setActiveTheme($theme_init->getActiveTheme($themes[$custom_theme], $base_themes));
// Prime the theme registry.
Drupal::service('theme.registry');
}