diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-13 03:05:54 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-13 03:05:54 +0000 |
commit | a3018c01a2b0f43c90c989ffcba1194c6614f243 (patch) | |
tree | 32ebe450ecf7b7af6df1f3bb73d0980d17686635 /includes | |
parent | 49699d5be129c467323fd469573df3fbf6dbc98e (diff) | |
download | brdo-a3018c01a2b0f43c90c989ffcba1194c6614f243.tar.gz brdo-a3018c01a2b0f43c90c989ffcba1194c6614f243.tar.bz2 |
#167112 by evil_marty and deekayen: Add support for 'wildcard' .tpl.php files to act on any numeric pages, such as page-user-%.tpl.php
Diffstat (limited to 'includes')
-rw-r--r-- | includes/theme.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 562655e90..0688e40d6 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -2027,6 +2027,11 @@ function template_page_suggestions($args) { 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[] = $suggestion . '-%'; + } $suggestions[] = $suggestion . '-' . $arg; if (!is_numeric($arg)) { $suggestion .= '-' . $arg; |