diff options
-rw-r--r-- | includes/common.inc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/includes/common.inc b/includes/common.inc index 4b59171ef..cdeeccc0e 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1681,7 +1681,6 @@ function url($path = NULL, array $options = array()) { global $base_url; static $script; - static $clean_url; if (!isset($script)) { // On some web servers, such as IIS, we can't omit "index.php". So, we @@ -1690,11 +1689,6 @@ function url($path = NULL, array $options = array()) { $script = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') === FALSE) ? 'index.php' : ''; } - // Cache the clean_url variable to improve performance. - if (!isset($clean_url)) { - $clean_url = (bool)variable_get('clean_url', '0'); - } - if (!isset($options['base_url'])) { // The base_url might be rewritten from the language rewrite in domain mode. $options['base_url'] = $base_url; @@ -1720,7 +1714,7 @@ function url($path = NULL, array $options = array()) { $prefix = empty($path) ? rtrim($options['prefix'], '/') : $options['prefix']; $path = drupal_urlencode($prefix . $path); - if ($clean_url) { + if (variable_get('clean_url', '0')) { // With Clean URLs. if ($options['query']) { return $base . $path . '?' . $options['query'] . $options['fragment']; |