diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-23 18:32:00 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-23 18:32:00 +0000 |
commit | dce608f5a4a33fb679c266c926efdaf4a084ba86 (patch) | |
tree | 6c2721039fb182d119e0c97480f0881f17c60f32 /includes | |
parent | 124f83e79c6da47c6434f794335baf86bd21aa3c (diff) | |
download | brdo-dce608f5a4a33fb679c266c926efdaf4a084ba86.tar.gz brdo-dce608f5a4a33fb679c266c926efdaf4a084ba86.tar.bz2 |
#674784 by JohnAlbin, naxoc, et al: Fixed theme_get_suggestions() fails to return 'page__front()' suggestion on front page.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/theme.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 0c9b0c3ed..5d5363113 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -2460,20 +2460,22 @@ function theme_get_suggestions($args, $base, $delimiter = '__') { // page__node__edit page-node-edit $suggestions = array(); + $prefix = $base; foreach ($args as $arg) { // Remove slashes or null per SA-CORE-2009-003. $arg = str_replace(array("/", "\\", "\0"), '', $arg); // The percent acts as a wildcard for numeric arguments since // asterisks are not valid filename characters on many filesystems. if (is_numeric($arg)) { - $suggestions[] = $base . $delimiter . '%'; + $suggestions[] = $prefix . $delimiter . '%'; } - $suggestions[] = $base . $delimiter . $arg; + $suggestions[] = $prefix . $delimiter . $arg; if (!is_numeric($arg)) { - $base .= $delimiter . $arg; + $prefix .= $delimiter . $arg; } } if (drupal_is_front_page()) { + // Front templates should be based on root only, not prefixed arguments. $suggestions[] = $base . $delimiter . 'front'; } |