Commit a3156a15 authored by justinrandell's avatar justinrandell

Convert a couple of calls that look for cache settings using the old variable_get system.

parent a8df28f4
......@@ -2596,7 +2596,8 @@ function drupal_page_footer() {
// Commit the user session, if needed.
drupal_session_commit();
if (variable_get('cache', 0) && ($cache = drupal_page_set_cache())) {
$config = config('system.performance');
if ($config->get('cache') && ($cache = drupal_page_set_cache())) {
drupal_serve_page_from_cache($cache);
}
else {
......
......@@ -343,7 +343,8 @@ function language_provider_invoke($provider_id, $provider = NULL) {
// If the language provider has no cache preference or this is satisfied
// we can execute the callback.
$cache = !isset($provider['cache']) || $user->uid || $provider['cache'] == variable_get('cache', 0);
$config = config('system.performance');
$cache = !isset($provider['cache']) || $user->uid || $provider['cache'] == $config->get('cache');
$callback = isset($provider['callbacks']['language']) ? $provider['callbacks']['language'] : FALSE;
$langcode = $cache && function_exists($callback) ? $callback($languages) : FALSE;
$results[$provider_id] = isset($languages[$langcode]) ? $languages[$langcode] : FALSE;
......
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