diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-10-10 12:09:32 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-10-10 12:09:32 +0200 |
commit | edc262f5af0f3ade8cfeca22061f1329daa688c3 (patch) | |
tree | 6f03d70a3a6c7bde8ecba22663ea0bd78d357c0b /include | |
parent | 41cf846ee3c51257dc8ba05e498345b3e568e422 (diff) | |
parent | 335536bbbf0069442a445b9b641a5f51208fca86 (diff) | |
download | volse-hubzilla-edc262f5af0f3ade8cfeca22061f1329daa688c3.tar.gz volse-hubzilla-edc262f5af0f3ade8cfeca22061f1329daa688c3.tar.bz2 volse-hubzilla-edc262f5af0f3ade8cfeca22061f1329daa688c3.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include')
-rw-r--r-- | include/nav.php | 4 | ||||
-rw-r--r-- | include/text.php | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/nav.php b/include/nav.php index 3da67ffd1..44026e1e9 100644 --- a/include/nav.php +++ b/include/nav.php @@ -284,8 +284,8 @@ EOT; } } - $c = theme_include('navbar_' . $template . '.css'); - $tpl = get_markup_template('navbar_' . $template . '.tpl'); + $c = theme_include('navbar_' . purify_filename($template) . '.css'); + $tpl = get_markup_template('navbar_' . purify_filename($template) . '.tpl'); if($c && $tpl) { head_add_css('navbar_' . $template . '.css'); diff --git a/include/text.php b/include/text.php index 80914747b..8a65be0d5 100644 --- a/include/text.php +++ b/include/text.php @@ -3156,3 +3156,9 @@ function ellipsify($s,$maxlen) { return mb_substr($s,0,$maxlen / 2) . '...' . mb_substr($s,mb_strlen($s) - ($maxlen / 2)); } + +function purify_filename($s) { + if(($s[0] === '.') || strpos($s,'/') !== false) + return ''; + return $s; +} |