2013-12-10 13:50:21 +00:00
|
|
|
#!/usr/bin/env php
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Command line token calculator for rebuild.php.
|
|
|
|
*/
|
|
|
|
|
|
|
|
require_once __DIR__ . '/../vendor/autoload.php';
|
|
|
|
require_once dirname(__DIR__) . '/includes/bootstrap.inc';
|
|
|
|
|
|
|
|
use Drupal\Component\Utility\Crypt;
|
|
|
|
|
|
|
|
drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
|
|
|
|
|
|
|
|
if (!drupal_is_cli()) {
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
$timestamp = time();
|
2014-02-20 12:29:03 +00:00
|
|
|
$token = Crypt::hmacBase64($timestamp, settings()->get('hash_salt'));
|
2013-12-10 13:50:21 +00:00
|
|
|
|
|
|
|
print "timestamp=$timestamp&token=$token\n";
|