Skip to content

Instantly share code, notes, and snippets.

@damiankloip
Created April 29, 2014 10:37
Show Gist options
  • Save damiankloip/11396480 to your computer and use it in GitHub Desktop.
Save damiankloip/11396480 to your computer and use it in GitHub Desktop.
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 5c85622..abab13a 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -408,6 +408,11 @@ function drupal_settings_initialize() {
if (is_readable(DRUPAL_ROOT . '/' . $conf_path . '/settings.php')) {
require DRUPAL_ROOT . '/' . $conf_path . '/settings.php';
}
+
+ // Manually include Settings so we do not need to go to the file system
+ // to find the Settings class if we are using the APC autoloader.
+ require_once __DIR__ . '/../lib/Drupal/Core/Site/Settings.php';
+
// Initialize Settings.
new Settings($settings);
}
diff --git a/index.php b/index.php
index a453ecc..85e5321 100644
--- a/index.php
+++ b/index.php
@@ -10,13 +10,13 @@
use Drupal\Core\Site\Settings;
-require_once __DIR__ . '/core/vendor/autoload.php';
require_once __DIR__ . '/core/includes/bootstrap.inc';
try {
drupal_handle_request();
}
catch (Exception $e) {
+ require_once __DIR__ . '/core/lib/Drupal/Core/Site/Settings.php';
$message = 'If you have just changed code (for example deployed a new module or moved an existing one) read <a href="http://drupal.org/documentation/rebuild">http://drupal.org/documentation/rebuild</
if (Settings::get('rebuild_access', FALSE)) {
$rebuild_path = $GLOBALS['base_url'] . '/rebuild.php'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment