Update to Drupal 8.1.2. For more information, see https://www.drupal.org/project/drupal/releases/8.1.2
This commit is contained in:
parent
9eae24d844
commit
28556d630e
1322 changed files with 6699 additions and 2064 deletions
|
@ -19,7 +19,6 @@ namespace Drupal\Core\Cache;
|
|||
*
|
||||
* @ingroup cache
|
||||
*/
|
||||
|
||||
class BackendChain implements CacheBackendInterface, CacheTagsInvalidatorInterface {
|
||||
|
||||
/**
|
||||
|
|
|
@ -76,10 +76,10 @@ class Cache {
|
|||
*/
|
||||
public static function mergeMaxAges($a = Cache::PERMANENT, $b = Cache::PERMANENT) {
|
||||
// If one of the values is Cache::PERMANENT, return the other value.
|
||||
if ($a === Cache::PERMANENT){
|
||||
if ($a === Cache::PERMANENT) {
|
||||
return $b;
|
||||
}
|
||||
if ($b === Cache::PERMANENT){
|
||||
if ($b === Cache::PERMANENT) {
|
||||
return $a;
|
||||
}
|
||||
|
||||
|
|
|
@ -215,4 +215,5 @@ interface CacheBackendInterface {
|
|||
* Remove a cache bin.
|
||||
*/
|
||||
public function removeBin();
|
||||
|
||||
}
|
||||
|
|
|
@ -54,4 +54,5 @@ interface CacheTagsChecksumInterface {
|
|||
* This is only used by tests.
|
||||
*/
|
||||
public function reset();
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ namespace Drupal\Core\Cache;
|
|||
* Defines a generic class for passing cacheability metadata.
|
||||
*
|
||||
* @ingroup cache
|
||||
*
|
||||
*/
|
||||
class CacheableMetadata implements RefinableCacheableDependencyInterface {
|
||||
|
||||
|
|
|
@ -98,7 +98,6 @@ class CacheContextsManager {
|
|||
* @return \Drupal\Core\Cache\Context\ContextCacheKeys
|
||||
* The ContextCacheKeys object containing the converted cache keys and
|
||||
* cacheability metadata.
|
||||
*
|
||||
*/
|
||||
public function convertTokensToKeys(array $context_tokens) {
|
||||
assert('$this->assertValidTokens($context_tokens)');
|
||||
|
@ -195,7 +194,7 @@ class CacheContextsManager {
|
|||
$ancestor_found = TRUE;
|
||||
}
|
||||
|
||||
} while(!$ancestor_found && strpos($ancestor, '.') !== FALSE);
|
||||
} while (!$ancestor_found && strpos($ancestor, '.') !== FALSE);
|
||||
if (!$ancestor_found) {
|
||||
$optimized_content_tokens[] = $context_token;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ use Drupal\Core\Language\LanguageManagerInterface;
|
|||
/**
|
||||
* Defines the LanguagesCacheContext service, for "per language" caching.
|
||||
*/
|
||||
class LanguagesCacheContext implements CalculatedCacheContextInterface {
|
||||
class LanguagesCacheContext implements CalculatedCacheContextInterface {
|
||||
|
||||
/**
|
||||
* The language manager.
|
||||
|
|
|
@ -27,8 +27,17 @@ class QueryArgsCacheContext extends RequestStackCacheContextBase implements Calc
|
|||
if ($query_arg === NULL) {
|
||||
return $this->requestStack->getCurrentRequest()->getQueryString();
|
||||
}
|
||||
elseif ($this->requestStack->getCurrentRequest()->query->has($query_arg)) {
|
||||
$value = $this->requestStack->getCurrentRequest()->query->get($query_arg);
|
||||
if ($value !== '') {
|
||||
return $value;
|
||||
}
|
||||
else {
|
||||
return '?valueless?';
|
||||
}
|
||||
}
|
||||
else {
|
||||
return $this->requestStack->getCurrentRequest()->query->get($query_arg);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -477,4 +477,5 @@ class DatabaseBackend implements CacheBackendInterface {
|
|||
);
|
||||
return $schema;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,4 +28,5 @@ class ListCacheBinsPass implements CompilerPassInterface {
|
|||
$container->setParameter('cache_bins', $cache_bins);
|
||||
$container->setParameter('cache_default_bin_backends', $cache_default_bin_backends);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ namespace Drupal\Core\Cache;
|
|||
* many times a cache entry was set or requested.
|
||||
*
|
||||
* @todo On the longrun this backend should be replaced by phpunit mock objects.
|
||||
*
|
||||
*/
|
||||
class MemoryCounterBackend extends MemoryBackend {
|
||||
|
||||
|
@ -49,7 +48,6 @@ class MemoryCounterBackend extends MemoryBackend {
|
|||
*
|
||||
* @param string $function
|
||||
* The called function.
|
||||
*
|
||||
* @param string $cid
|
||||
* The cache ID of the cache entry to increase the counter.
|
||||
*/
|
||||
|
|
|
@ -88,4 +88,5 @@ class NullBackend implements CacheBackendInterface {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function removeBin() {}
|
||||
|
||||
}
|
||||
|
|
|
@ -211,7 +211,7 @@ class PhpBackend implements CacheBackendInterface {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function invalidateAll() {
|
||||
foreach($this->storage()->listAll() as $cidhash) {
|
||||
foreach ($this->storage()->listAll() as $cidhash) {
|
||||
$this->invalidatebyHash($cidhash);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue