Commit c3ee9656 authored by webchick's avatar webchick

Issue #1957142 follow-up by dawehner, jibran: Fix a few more config() =>...

Issue #1957142 follow-up by dawehner, jibran: Fix a few more config() => Drupal::config() stragglers.
parent faca27de
......@@ -3179,7 +3179,7 @@ function drupal_page_set_cache(Response $response, Request $request) {
if (drupal_page_is_cacheable()) {
// Check if the current page may be compressed.
$page_compressed = config('system.performance')->get('response.gzip') && extension_loaded('zlib');
$page_compressed = Drupal::config('system.performance')->get('response.gzip') && extension_loaded('zlib');
$cache = (object) array(
'cid' => drupal_page_cache_get_cid($request),
......
......@@ -69,15 +69,16 @@ function config_get_storage_names_with_prefix($prefix = '') {
* Retrieves a configuration object.
*
* This is the main entry point to the configuration API. Calling
* @code config('book.admin') @endcode will return a configuration object in
* which the book module can store its administrative settings.
* @code \Drupal::config('book.admin') @endcode will return a configuration
* object in which the book module can store its administrative settings.
*
* @deprecated as of Drupal 8.0. Use \Drupal::config() instead.
*
* @param string $name
* The name of the configuration object to retrieve. The name corresponds to
* a configuration file. For @code config('book.admin') @endcode, the config
* object returned will contain the contents of book.admin configuration file.
* a configuration file. For @code \Drupal::config('book.admin') @endcode, the
* config object returned will contain the contents of book.admin
* configuration file.
*
* @return Drupal\Core\Config\Config
* A configuration object.
......
......@@ -64,8 +64,9 @@ protected function cache($bin = 'cache') {
*
* @param string $name
* The name of the configuration object to retrieve. The name corresponds to
* a configuration file. For @code config('book.admin') @endcode, the config
* object returned will contain the contents of book.admin configuration file.
* a configuration file. For @code \Drupal::config('book.admin') @endcode,
* the config object returned will contain the contents of book.admin
* configuration file.
*
* @return \Drupal\Core\Config\Config
* A configuration object.
......
......@@ -142,7 +142,7 @@ protected function dateFormat($format) {
*/
protected function country() {
if ($this->country === NULL) {
$this->country = config('system.date')->get('country.default');
$this->country = \Drupal::config('system.date')->get('country.default');
}
return $this->country;
}
......
......@@ -45,7 +45,7 @@ function setUp() {
* Tests support for different cache items with different Accept headers.
*/
function testAcceptHeaderRequests() {
$config = config('system.performance');
$config = \Drupal::config('system.performance');
$config->set('cache.page.use_internal', 1);
$config->set('cache.page.max_age', 300);
$config->save();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment