From e7ec4663adb5876cae59d8bd92af3294be917adf Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 14 May 2015 12:35:53 -0700 Subject: [PATCH] Fix: User settings page - don't display tab if empty. --- e107_core/shortcodes/batch/usersettings_shortcodes.php | 7 +++++-- e107_core/templates/usersettings_template.php | 4 +--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/e107_core/shortcodes/batch/usersettings_shortcodes.php b/e107_core/shortcodes/batch/usersettings_shortcodes.php index 49b4ab421..6f65c9d82 100755 --- a/e107_core/shortcodes/batch/usersettings_shortcodes.php +++ b/e107_core/shortcodes/batch/usersettings_shortcodes.php @@ -306,12 +306,15 @@ class usersettings_shortcodes extends e_shortcode $text = $this->sc_userextended_cat($cat['user_extended_struct_id']); $ret .= $text; $catName = vartrue($cat['user_extended_struct_text'], $cat['user_extended_struct_name']); - $tabs[] = array('caption'=>$catName, 'text'=>$text); + if(!empty($text)) + { + $tabs[] = array('caption'=>$catName, 'text'=>$text); + } } - if($parm == 'tabs' && deftrue('BOOTSTRAP')===3) + if(($parm == 'tabs') && !empty($tabs) && deftrue('BOOTSTRAP')===3) { return e107::getForm()->tabs($tabs); } diff --git a/e107_core/templates/usersettings_template.php b/e107_core/templates/usersettings_template.php index 33ca024f1..f0d161246 100755 --- a/e107_core/templates/usersettings_template.php +++ b/e107_core/templates/usersettings_template.php @@ -215,9 +215,7 @@ $USERSETTINGS_WRAPPER['edit']['CUSTOMTITLE'] = "
$USERSETTINGS_WRAPPER['edit']['USERCLASSES'] = "
-
{---} -
".LAN_USER_73." -
+
{---}
";