From 345fe648b3cc11c296c6a44810e7cfba78e2c33d Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 11 Mar 2021 15:37:27 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/core/lib/security.lib.php | 6 +++--- htdocs/societe/card.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 00c2d8ee99b..c8c2c5cdc2b 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -623,10 +623,10 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand // If external user: Check permission for external users if ($user->socid > 0 && empty($conf->global->MAIN_EXTERNAL_USERS_CAN_SEE_SUBSIDIARY_COMPANIES)) { if ($user->socid <> $objectid) { - return false; - } + return false; + } } elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) { - // If internal user: Check permission for internal users that are restricted on their objects + // If internal user: Check permission for internal users that are restricted on their objects $sql = "SELECT COUNT(sc.fk_soc) as nb"; $sql .= " FROM (".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= ", ".MAIN_DB_PREFIX."societe as s)"; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 220576bd927..d69a602c900 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -81,10 +81,10 @@ $confirm = GETPOST('confirm', 'alpha'); $socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int'); if ($user->socid && empty($conf->global->MAIN_EXTERNAL_USERS_CAN_SEE_SUBSIDIARY_COMPANIES)) { - $socid = $user->socid; + $socid = $user->socid; } if (empty($socid) && $action == 'view') { - $action = 'create'; + $action = 'create'; } $object = new Societe($db);