Skip to content

Commit

Permalink
indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
accognet committed Jan 31, 2025
1 parent 2fd45aa commit 311a0d9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions core/userrights.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2041,21 +2041,17 @@ public static function GetOwnerOrganizationAttCode($sClass)
$sAttCode = null;

$aCallSpec = array($sClass, 'MapContextParam');
if (($sClass == 'Organization') || is_subclass_of($sClass, 'Organization'))
{
if (($sClass == 'Organization') || is_subclass_of($sClass, 'Organization')) {
$sAttCode = 'id';
}
elseif (is_callable($aCallSpec))
{
elseif (is_callable($aCallSpec)) {
$sAttCode = call_user_func($aCallSpec, 'org_id'); // Returns null when there is no mapping for this parameter
if (!MetaModel::IsValidAttCode($sClass, $sAttCode))
{
if (!MetaModel::IsValidAttCode($sClass, $sAttCode)) {
// Skip silently. The data model checker will tell you something about this...
$sAttCode = null;
}
}
elseif(MetaModel::IsValidAttCode($sClass, 'org_id'))
{
elseif(MetaModel::IsValidAttCode($sClass, 'org_id')) {
$sAttCode = 'org_id';
}

Expand Down

0 comments on commit 311a0d9

Please sign in to comment.