Commit 22aaa611 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes: #2409 fixes a wheezy problem with filePath

Showing with 8 additions and 4 deletions
+8 -4
...@@ -16,14 +16,18 @@ function smarty_function_filePath($params, &$smarty) ...@@ -16,14 +16,18 @@ function smarty_function_filePath($params, &$smarty)
if (file_exists("themes/$theme/$filename")) { if (file_exists("themes/$theme/$filename")) {
return "themes/$theme/$filename"; return "themes/$theme/$filename";
} }
if (file_exists($smarty->template_dir."/themes/$theme/$filename")) { $dir = $smarty->template_dir;
return $smarty->template_dir."/themes/$theme/$filename"; if (is_array($dir)) {
$dir = $dir[0];
}
if (file_exists("$dir/themes/$theme/$filename")) {
return "$dir/themes/$theme/$filename";
} }
if (file_exists("themes/default/$filename")) { if (file_exists("themes/default/$filename")) {
return "themes/default/$filename"; return "themes/default/$filename";
} }
if (file_exists($smarty->template_dir."/themes/default/$filename")) { if (file_exists("$dir/themes/default/$filename")) {
return $smarty->template_dir."/themes/default/$filename"; return "$dir/themes/default/$filename";
} }
return $filename; return $filename;
} }
......
  • bmortier @bmortier

    mentioned in issue #810

    By Côme Chilliet on 2017-09-02T15:00:12 (imported from GitLab)

    ·

    mentioned in issue #810

    By Côme Chilliet on 2017-09-02T15:00:12 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment