summaryrefslogtreecommitdiffstats
path: root/core/authorize.php
diff options
context:
space:
mode:
authorAlex Pott2014-06-05 17:53:24 (GMT)
committerAlex Pott2014-06-05 17:53:24 (GMT)
commit6d2ce628bc9362588e209a6ddac37295b40b3ce9 (patch)
tree59d4d015a35966f9ecffe13519bccfab55b1257d /core/authorize.php
parentb3db204762a8ad357eaa98cd3e647019f8a6c87f (diff)
Revert "Issue #2016629 by larowlan, neclimdul, sun, alexpott, jibran, ParisLiakos, donquixote, effulgentsia, msonnabaum: Refactor bootstrap to better utilize the kernel."
This reverts commit cda051c425ec10e864d3207cc0e60640bfa16e10.
Diffstat (limited to 'core/authorize.php')
-rw-r--r--core/authorize.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/core/authorize.php b/core/authorize.php
index 96fe9ae..f938f39 100644
--- a/core/authorize.php
+++ b/core/authorize.php
@@ -20,15 +20,13 @@
* @link authorize Authorized operation helper functions @endlink
*/
-use Drupal\Core\DrupalKernel;
-use Symfony\Component\HttpFoundation\Request;
use Drupal\Core\Site\Settings;
use Drupal\Core\Page\DefaultHtmlPageRenderer;
// Change the directory to the Drupal root.
chdir('..');
-$autoloader = require_once __DIR__ . '/vendor/autoload.php';
+require_once __DIR__ . '/vendor/autoload.php';
/**
* Global flag to identify update.php and authorize.php runs.
@@ -53,9 +51,18 @@ function authorize_access_allowed() {
return Settings::get('allow_authorize_operations', TRUE) && user_access('administer software updates');
}
-$request = Request::createFromGlobals();
-$kernel = DrupalKernel::createFromRequest($request, $autoloader, 'prod');
-$kernel->prepareLegacyRequest($request);
+// *** Real work of the script begins here. ***
+
+require_once __DIR__ . '/includes/bootstrap.inc';
+require_once __DIR__ . '/includes/common.inc';
+require_once __DIR__ . '/includes/file.inc';
+require_once __DIR__ . '/includes/module.inc';
+require_once __DIR__ . '/includes/ajax.inc';
+
+// Prepare a minimal bootstrap.
+drupal_bootstrap(DRUPAL_BOOTSTRAP_PAGE_CACHE);
+$request = \Drupal::request();
+\Drupal::service('request_stack')->push($request);
// We have to enable the user and system modules, even to check access and
// display errors via the maintenance theme.