diff --git a/class2.php b/class2.php index ce7daa42b..c5166df52 100755 --- a/class2.php +++ b/class2.php @@ -950,7 +950,7 @@ if (!class_exists('e107table', false)) } $bread = e107::breadcrumb(); - $ret['{---BREADCRUMB---}'] = e107::getForm()->breadcrumb($bread); + $ret['{---BREADCRUMB---}'] = e107::getForm()->breadcrumb($bread, true); return $ret; diff --git a/e107_handlers/db_debug_class.php b/e107_handlers/db_debug_class.php index ea410914b..95b2b6474 100644 --- a/e107_handlers/db_debug_class.php +++ b/e107_handlers/db_debug_class.php @@ -835,7 +835,7 @@ $inc = array( 'BOOTSTRAP', 'HEADERF', 'FOOTERF', 'FILE_UPLOADS', 'FLOODPROTECT', 'FLOODTIMEOUT', 'FONTAWESOME', 'CHARSET', 'GUESTS_ONLINE', 'MEMBERS_ONLINE', 'PAGE_NAME', 'STANDARDS_MODE', 'TIMEOFFSET', - 'TOTAL_ONLINE', 'THEME', 'THEME_ABS', 'THEME_LAYOUT', 'THEME_LEGACY', 'THEME_STYLE', 'META_OG', 'META_DESCRIPTION', 'MPREFIX', 'VIEWPORT', 'BODYTAG', 'CSSORDER' + 'TOTAL_ONLINE', 'THEME', 'THEME_ABS', 'THEME_LAYOUT', 'THEME_LEGACY', 'THEME_VERSION', 'THEME_STYLE', 'META_OG', 'META_DESCRIPTION', 'MPREFIX', 'VIEWPORT', 'BODYTAG', 'CSSORDER' ); $userCon = get_defined_constants(true); diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 922825a53..2f9ac64d7 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -3586,12 +3586,18 @@ var_dump($select_options);*/ /** * Render a Breadcrumb in Bootstrap format. - * @param $array + * @param array $array * @param $array[url] * @param $array[text] + * @param bool $force - used internally to prevent duplicate {--BREADCUMB---} and template breadcrumbs from both displaying at once. */ - public function breadcrumb($array) + public function breadcrumb($array, $force = false) { + if($force === false && defset('THEME_VERSION') === 2.3) // ignore template breadcrumb. + { + return null; + } + if(!is_array($array)){ return; } $opt = array(); @@ -3613,9 +3619,9 @@ var_dump($select_options);*/ } $ret = ''; - $ret .= vartrue($val['url']) ? "" : ''; + $ret .= !empty($val['url']) ? "" : ''; $ret .= vartrue($val['text']); - $ret .= vartrue($val['url']) ? '' : ''; + $ret .= !empty($val['url']) ? '' : ''; if($ret != '') { diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index f2a13bc24..79ddbb703 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -1134,6 +1134,17 @@ class e_theme $legacy = (file_exists(e_THEME . $themeDir . '/theme.xml') === false); define('THEME_LEGACY', $legacy); + if($legacy === true) + { + $version = 1.0; + } + else + { + $version = (file_exists(e_THEME . $themeDir . '/theme.html')) ? 2.3 : 2.0; + } + + define('THEME_VERSION', $version); + $e107->site_theme = $themeDir; e107::getDebug()->logTime('Theme Check End'); @@ -1147,6 +1158,7 @@ class e_theme $e107tmp_theme = 'bootstrap3'; // set to bootstrap3 by default. define('THEME', e_THEME . $e107tmp_theme . '/'); define('THEME_ABS', e_THEME_ABS . $e107tmp_theme . '/'); + define('THEME_VERSION', 2.3); if (ADMIN && strpos(e_SELF, $ADMIN_DIRECTORY) === false) { diff --git a/e107_plugins/download/download_shortcodes.php b/e107_plugins/download/download_shortcodes.php index 716ed999d..e622710ea 100644 --- a/e107_plugins/download/download_shortcodes.php +++ b/e107_plugins/download/download_shortcodes.php @@ -467,6 +467,8 @@ class download_shortcodes extends e_shortcode function sc_download_list_icon($parm='') //XXX FIXME $img. { + $img = "".LAN_DOWNLOAD.""; + if ($parm == "link") { $url = e107::url('download', 'item', $this->var); @@ -884,7 +886,7 @@ class download_shortcodes extends e_shortcode $img = ''; } - return "mirror['dlmirrorfile'][0]}' title='".LAN_DOWNLOAD."'{$click}>".$img.""; + return "mirror['dlmirrorfile'][0]}' title='".LAN_DOWNLOAD."' {$click}>".$img.""; } function sc_download_mirror_requests()