Skip to content

Commit

Permalink
Adding one more conditional to make sure we deal with a core Login Menu
Browse files Browse the repository at this point in the history
item in case some 3rd party component uses similar field names
  • Loading branch information
infograf768 committed May 6, 2016
1 parent f65ea4b commit 5265043
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions administrator/components/com_menus/models/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,14 +688,17 @@ public function getItem($pk = null)

// Special case for the Login menu item.
// Display the login or logout redirect URL fields if not empty
if (!empty($result->params['login_redirect_url']))
if ($table->link == 'index.php?option=com_users&view=login')
{
$result->params['loginredirectchoice'] = '0';
}
if (!empty($result->params['login_redirect_url']))
{
$result->params['loginredirectchoice'] = '0';
}

if (!empty($result->params['logout_redirect_url']))
{
$result->params['logoutredirectchoice'] = '0';
if (!empty($result->params['logout_redirect_url']))
{
$result->params['logoutredirectchoice'] = '0';
}
}
}

Expand Down

0 comments on commit 5265043

Please sign in to comment.