Skip to content

Commit

Permalink
call things by it's name
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepereiradasilva committed Jun 20, 2016
1 parent b24c9ef commit 8518c7d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libraries/joomla/access/access.php
Expand Up @@ -560,15 +560,15 @@ protected static function getGroupPath($groupId)
* only the rules explicitly set for the asset or the summation of all inherited rules from
* parent assets and explicit rules.
*
* @param mixed $asset Integer asset id or the name of the asset as a string.
* @param boolean $recursive True to return the rules object with inherited rules.
* @param boolean $component True to calculate the rule also based on component rules.
* @param mixed $asset Integer asset id or the name of the asset as a string.
* @param boolean $recursive True to return the rules object with inherited rules.
* @param boolean $recursiveParentAsset True to calculate the rule also based on inherited component/extension rules.
*
* @return JAccessRules JAccessRules object for the asset.
*
* @since 11.1
*/
public static function getAssetRules($asset, $recursive = false, $component = true)
public static function getAssetRules($asset, $recursive = false, $recursiveParentAsset = true)
{
// Get instance of the Profiler:
$_PROFILER = JProfiler::getInstance('Application');
Expand All @@ -577,7 +577,7 @@ public static function getAssetRules($asset, $recursive = false, $component = tr

// Almost all calls should have recursive set to true
// so we'll get to take advantage of preloading:
if ($recursive && isset(self::$assetPermissionsByName[$extensionName]) && isset(self::$assetPermissionsByName[$extensionName][$asset]))
if ($recursive && $recursiveParentAsset && isset(self::$assetPermissionsByName[$extensionName]) && isset(self::$assetPermissionsByName[$extensionName][$asset]))
{
// Mark in the profiler.
JDEBUG ? $_PROFILER->mark('Start JAccess::getAssetRules New (' . $asset . ')') : null;
Expand Down Expand Up @@ -636,7 +636,7 @@ public static function getAssetRules($asset, $recursive = false, $component = tr
->from('#__assets AS a');

$extensionString = '';
if ($component && ($extensionName !== $asset || is_numeric($asset)))
if ($recursiveParentAsset && ($extensionName !== $asset || is_numeric($asset)))
{
$extensionString = ' OR a.name = ' . $db->quote($extensionName);
}
Expand Down

0 comments on commit 8518c7d

Please sign in to comment.