diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index ab075348c3a..13634b1619d 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -468,8 +468,7 @@ class Translate } } - if (!$found && !empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) - { + if (!$found && !empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) { // Overwrite translation with database read $sql = "SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where lang='".$db->escape($this->defaultlang)."' OR lang IS NULL"; $sql .= " AND entity IN (0, ".getEntity('overwrite_trans').")"; diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 492916935f8..a0722b1b848 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1119,7 +1119,7 @@ class Thirdparties extends DolibarrApi */ public function getCompanyBankAccount($id) { - if (!DolibarrApiAccess::$user->rights->facture->lire) { + if (!DolibarrApiAccess::$user->rights->societe->lire) { throw new RestException(401); } if (empty($id)) {