summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-12-04 11:37:07 +0100
committerAndrey Andreev <narf@devilix.net>2014-12-04 11:37:07 +0100
commita704aa715b682df78552fab76a7f5ba9cbe06923 (patch)
tree2344bd1053f86052a27595f0a97c54120bcfa609 /system
parent631b0b93b64d028bb310dba22fefa8e3ef39143f (diff)
Add 'cache_query_string' configuration option
Close #2349
Diffstat (limited to 'system')
-rw-r--r--system/core/Output.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index f5521882c..e8f0b1590 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -564,7 +564,10 @@ class CI_Output {
.$CI->config->item('index_page')
.$CI->uri->uri_string();
- empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING'];
+ if ($CI->config->item('cache_query_string') && ! empty($_SERVER['QUERY_STRING']))
+ {
+ $uri .= '?'.$_SERVER['QUERY_STRING'];
+ }
$cache_path .= md5($uri);
@@ -650,7 +653,11 @@ class CI_Output {
// Build the file path. The file name is an MD5 hash of the full URI
$uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string;
- empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING'];
+
+ if ($CFG->item('cache_query_string') && ! empty($_SERVER['QUERY_STRING']))
+ {
+ $uri .= '?'.$_SERVER['QUERY_STRING'];
+ }
$filepath = $cache_path.md5($uri);
@@ -729,7 +736,11 @@ class CI_Output {
if (empty($uri))
{
$uri = $CI->uri->uri_string();
- empty($_SERVER['QUERY_STRING']) OR $uri .= '?'.$_SERVER['QUERY_STRING'];
+
+ if ($CI->config->item('cache_query_string') && ! empty($_SERVER['QUERY_STRING']))
+ {
+ $uri .= '?'.$_SERVER['QUERY_STRING'];
+ }
}
$cache_path .= md5($CI->config->item('base_url').$CI->config->item('index_page').$uri);