From 79a6e9f2d3688c992ed6f268db50edb2820484dd Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 8 Feb 2013 10:50:19 +0000 Subject: [PATCH] Don't set category title if category has no description --- etemplate/inc/class.etemplate_widget_menupopup.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.etemplate_widget_menupopup.inc.php b/etemplate/inc/class.etemplate_widget_menupopup.inc.php index e5ffc0eafe..82db06d0e8 100644 --- a/etemplate/inc/class.etemplate_widget_menupopup.inc.php +++ b/etemplate/inc/class.etemplate_widget_menupopup.inc.php @@ -143,7 +143,8 @@ class etemplate_widget_menupopup extends etemplate_widget } // Make sure  s, etc. are properly encoded when sent, and not double-encoded - foreach(self::$request->sel_options[$form_name] as &$label) + $options = (self::$request->sel_options[$form_name] ? $form_name : $this->id); + foreach(self::$request->sel_options[$options] as &$label) { if(!is_array($label)) { @@ -300,7 +301,7 @@ class etemplate_widget_menupopup extends etemplate_widget } $options[$cat['id']] = array( 'label' => $s, - 'title' => empty($cat['description']) ? $s : $cat['description'], + 'title' => $cat['description'], ); // Send data too if(is_array($cat['data']))