summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryoung hahn2009-07-24 01:27:05 (GMT)
committer young hahn2009-07-24 01:27:05 (GMT)
commitea3c61a037b0dfa51e6418bb92ba221212c96032 (patch)
treef9444dc17d7aa150c8b17de725c10a4aab28d261
parent2f80dd01853fa69a1d16417a32e988479bd71d53 (diff)
#527950 by jhedstrom: Match path conditions against both canonical paths and aliases.
-rw-r--r--context.module6
1 files changed, 5 insertions, 1 deletions
diff --git a/context.module b/context.module
index 576fdaf..b9e713d 100644
--- a/context.module
+++ b/context.module
@@ -145,7 +145,11 @@ function context_init() {
// context integration against paths
if (!empty($context->path) && is_array($context->path)) {
$paths = implode("\n", $context->path);
- if (drupal_match_path($current_path, $paths)) {
+ $path_match = drupal_match_path($current_path, $paths);
+ if ($current_path != $_GET['q']) {
+ $path_match = $path_match || drupal_match_path($_GET['q'], $paths);
+ }
+ if ($path_match) {
context_set($context->namespace, $context->attribute, $context->value);
}
}