summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpleshka2015-06-12 07:05:15 (GMT)
committerSpleshka2015-06-12 07:05:15 (GMT)
commit1e4ccc93d332cdbc8cdbbc7a4207e5e017c5df09 (patch)
tree0f848b672d8a03695de8a6ee15f3d5913681fa69
parent0bacb2074450384f789f6afb7ef5356369fd9445 (diff)
Issue #1780144: Should expire.module urlencode urls
-rw-r--r--includes/expire.api.inc22
1 files changed, 19 insertions, 3 deletions
diff --git a/includes/expire.api.inc b/includes/expire.api.inc
index 2d52ae0..8b290f7 100644
--- a/includes/expire.api.inc
+++ b/includes/expire.api.inc
@@ -92,8 +92,13 @@ class ExpireAPI {
// If base site url should be included, then simply add it to the internal paths.
if ($include_base_url) {
- foreach ($urls as $internal_path) {
- $urls[$internal_path] = url($internal_path, array('absolute' => TRUE, 'alias' => TRUE, 'language' => $language));
+ foreach ($urls as $raw_url => $url) {
+ $urls[$raw_url] = url($url['path'], array(
+ 'absolute' => TRUE,
+ 'alias' => TRUE,
+ 'language' => $language,
+ 'query' => $url['query'],
+ ));
}
}
}
@@ -408,8 +413,19 @@ class ExpireAPI {
$path = implode('|', $path_parts);
}
+ // Parse internal path.
+ $parsed_path = parse_url($path);
+ if (!empty($parsed_path['query'])) {
+ // Parse the query string into array.
+ parse_str($parsed_path['query'], $parsed_path['query']);
+ }
+
// Collect array with information about expired URLs and its wildcards.
- $urls[$path] = $path;
+ $urls[$path] = array(
+ 'path' => $parsed_path['path'],
+ 'query' => !empty($parsed_path['query']) ? $parsed_path['query'] : array(),
+ );
+
$wildcards[$path] = $wildcard;
// Don't process empty pass, because otherwise drupal will return us