Skip to content

Commit

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

/*
* Check for no 'access-view' and empty full text,
* - Redirect guest users to login
* - Deny access to registered users with 403 code
* NOTE: we do not recheck 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') )
Expand All @@ -162,10 +160,8 @@ public function display($tpl = null)
}
}

/*
* NOTE: we do set the text to contain the fulltext but it is the responsibility
* of the layout to check view-access and only use "introtext" for guests
*/
// NOTE: The following code (usually) sets the text to contain the fulltext, but it is the
// responsibility of the layout to check 'access-view' and only use "introtext" for guests
if ($item->params->get('show_intro', '1') == '1')
{
$item->text = $item->introtext . ' ' . $item->fulltext;
Expand Down

0 comments on commit a1381f0

Please sign in to comment.