Skip to content

Commit

Permalink
Simplify conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
infograf768 committed Aug 21, 2016
1 parent 1eed385 commit 841245f
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions administrator/components/com_menus/models/fields/modal/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,13 @@ protected function getInput()
{
$clearField = JText::_('COM_MENUS_SELECT_A_MENUITEM', true);
}
elseif ((string) $this->element->option['value'] == '')
{
$clearField = JText::_($this->element->option, true);
}
else
{
if ((string) $this->element->option['value'] == '')
{
$clearField = JText::_($this->element->option, true);
}
else
{
$clearField = JText::_('JDEFAULT', true);
}
$clearField = JText::_('JDEFAULT', true);
}

$clearField = htmlspecialchars($clearField, ENT_QUOTES, 'UTF-8');
Expand Down Expand Up @@ -169,16 +166,13 @@ protected function getInput()
{
$title = JText::_('COM_MENUS_SELECT_A_MENUITEM', true);
}
elseif ((string) $this->element->option['value'] == '')
{
$title = JText::_($this->element->option, true);
}
else
{
if ((string) $this->element->option['value'] == '')
{
$title = JText::_($this->element->option, true);
}
else
{
$title = JText::_('JDEFAULT');
}
$title = JText::_('JDEFAULT');
}
}

Expand Down

0 comments on commit 841245f

Please sign in to comment.