Mercurial > hg > isophonics-drupal-site
annotate update.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 /** |
Chris@0 | 4 * @file |
Chris@0 | 5 * The PHP page that handles updating the Drupal installation. |
Chris@0 | 6 * |
Chris@0 | 7 * All Drupal code is released under the GNU General Public License. |
Chris@0 | 8 * See COPYRIGHT.txt and LICENSE.txt files in the "core" directory. |
Chris@0 | 9 */ |
Chris@0 | 10 |
Chris@0 | 11 use Drupal\Core\Update\UpdateKernel; |
Chris@0 | 12 use Symfony\Component\HttpFoundation\Request; |
Chris@0 | 13 |
Chris@0 | 14 $autoloader = require_once 'autoload.php'; |
Chris@0 | 15 |
Chris@0 | 16 // Disable garbage collection during test runs. Under certain circumstances the |
Chris@0 | 17 // update path will create so many objects that garbage collection causes |
Chris@0 | 18 // segmentation faults. |
Chris@0 | 19 require_once 'core/includes/bootstrap.inc'; |
Chris@0 | 20 if (drupal_valid_test_ua()) { |
Chris@0 | 21 gc_collect_cycles(); |
Chris@0 | 22 gc_disable(); |
Chris@0 | 23 } |
Chris@0 | 24 |
Chris@0 | 25 $kernel = new UpdateKernel('prod', $autoloader, FALSE); |
Chris@0 | 26 $request = Request::createFromGlobals(); |
Chris@0 | 27 |
Chris@0 | 28 $response = $kernel->handle($request); |
Chris@0 | 29 $response->send(); |
Chris@0 | 30 |
Chris@0 | 31 $kernel->terminate($request, $response); |