1
0
Fork 0

Avoid warning

This commit is contained in:
Michael 2017-08-14 05:47:25 +00:00
parent 217a8ce6ee
commit 1fa82581b6
2 changed files with 3 additions and 1 deletions

View file

@ -544,6 +544,8 @@ function upgrade_bool_message($bbcode = false) {
* @return string Path to the file or empty string if the file isn't found
*/
function theme_include($file, $root = '') {
$file = basename($file);
// Make sure $root ends with a slash / if it's not blank
if ($root !== '' && $root[strlen($root)-1] !== '/') {
$root = $root . '/';

View file

@ -498,7 +498,7 @@ if (isset($_GET["mode"])) {
}
// If there is no page template use the default page template
if (!$template) {
if (empty($template)) {
$template = theme_include("default.php");
}