Skip to content

Commit

Permalink
Fixed code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ggppdk committed Jul 25, 2016
1 parent 6d16a30 commit 0624124
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions components/com_content/views/article/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,17 @@ public function display($tpl = null)
return;
}

// Check for no 'access-view' and empty fulltext,
// - Redirect guest users to login
// - Deny access to logged users with 403 code
// NOTE: we do not recheck for no access-view + show_noauth disabled ... since it was checked above
/* Check for no 'access-view' and empty fulltext,
* - Redirect guest users to login
* - Deny access to logged users with 403 code
* NOTE: we do not recheck for no access-view + show_noauth disabled ... since it was checked above
*/
if ($item->params->get('access-view') == false && !strlen($item->fulltext))
{
if ($this->user->get('guest'))
{
$return = base64_encode(JUri::getInstance());
$login_url_with_return = JRoute::_('index.php?option=com_users&return='.$return);
$login_url_with_return = JRoute::_('index.php?option=com_users&return=' . $return);
$app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'notice');
$app->redirect($login_url_with_return, 403);
}
Expand Down

0 comments on commit 0624124

Please sign in to comment.