summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--includes/context.inc3
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 1ab92b9..d2a7365 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -12,6 +12,7 @@ ctools 7.x-1.x-dev
#564492: by Roger Lopez: Change default class includes from .inc files to .class.php files so they dont get read as plugins.
#534034 by DamienMcKenna: Add access rule for term ID selection.
#592692 by johnskulski: use theme_links instead of theme(links) for dropdown because we do not actually want a theme to change this output.
+#491884 by ayalon: Provide blank substitutions for optional contexts that do not appear.
ctools 6.x-1.x-dev
==================
diff --git a/includes/context.inc b/includes/context.inc
index 500fcc6..1304f54 100644
--- a/includes/context.inc
+++ b/includes/context.inc
@@ -613,6 +613,9 @@ function ctools_context_keyword_substitute($string, $keywords, $contexts) {
if (isset($context_keywords[$context])) {
$keywords['%' . $keyword] = ctools_context_convert_context($context_keywords[$context], $converter);
}
+ else {
+ $keywords['%' . $keyword] = '';
+ }
}
else {
if (isset($context_keywords[$keyword])) {