Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
27
core/scripts/rebuild_token_calculator.sh
Executable file
27
core/scripts/rebuild_token_calculator.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Command line token calculator for rebuild.php.
|
||||
*/
|
||||
|
||||
use Drupal\Component\Utility\Crypt;
|
||||
use Drupal\Core\DrupalKernel;
|
||||
use Drupal\Core\Site\Settings;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
if (PHP_SAPI !== 'cli') {
|
||||
return;
|
||||
}
|
||||
|
||||
require __DIR__ . '/../../autoload.php';
|
||||
require_once __DIR__ . '/../includes/bootstrap.inc';
|
||||
|
||||
$request = Request::createFromGlobals();
|
||||
Settings::initialize(DrupalKernel::findSitePath($request));
|
||||
|
||||
$timestamp = time();
|
||||
$token = Crypt::hmacBase64($timestamp, Settings::get('hash_salt'));
|
||||
|
||||
print "timestamp=$timestamp&token=$token\n";
|
Reference in a new issue