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:
Pantheon Automation 2016-06-02 15:56:09 -07:00 committed by Greg Anderson
parent 9eae24d844
commit 28556d630e
1322 changed files with 6699 additions and 2064 deletions

View file

@ -19,7 +19,6 @@ namespace Drupal\Core\Cache;
*
* @ingroup cache
*/
class BackendChain implements CacheBackendInterface, CacheTagsInvalidatorInterface {
/**

View file

@ -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;
}

View file

@ -215,4 +215,5 @@ interface CacheBackendInterface {
* Remove a cache bin.
*/
public function removeBin();
}

View file

@ -54,4 +54,5 @@ interface CacheTagsChecksumInterface {
* This is only used by tests.
*/
public function reset();
}

View file

@ -6,7 +6,6 @@ namespace Drupal\Core\Cache;
* Defines a generic class for passing cacheability metadata.
*
* @ingroup cache
*
*/
class CacheableMetadata implements RefinableCacheableDependencyInterface {

View file

@ -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;
}

View file

@ -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.

View file

@ -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;
}
}

View file

@ -477,4 +477,5 @@ class DatabaseBackend implements CacheBackendInterface {
);
return $schema;
}
}

View file

@ -28,4 +28,5 @@ class ListCacheBinsPass implements CompilerPassInterface {
$container->setParameter('cache_bins', $cache_bins);
$container->setParameter('cache_default_bin_backends', $cache_default_bin_backends);
}
}

View file

@ -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.
*/

View file

@ -88,4 +88,5 @@ class NullBackend implements CacheBackendInterface {
* {@inheritdoc}
*/
public function removeBin() {}
}

View file

@ -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);
}
}