Don't set category title if category has no description

This commit is contained in:
Nathan Gray 2013-02-08 10:50:19 +00:00
parent aa07a243c1
commit 79a6e9f2d3

View File

@ -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']))