Fix phan report

This commit is contained in:
Laurent Destailleur 2024-01-12 22:09:51 +01:00
parent dfdca61c71
commit f773fa2dbd
5 changed files with 5 additions and 5 deletions

View file

@ -46,7 +46,7 @@ class Members extends DolibarrApi
*/
public function __construct()
{
global $db, $conf;
global $db;
$this->db = $db;
}

View file

@ -121,7 +121,7 @@ if ($action == 'add_currency') {
$currency = new MultiCurrency($db);
if ($currency->fetch($fk_multicurrency) > 0) {
if ($currency->delete() > 0) {
if ($currency->delete($user) > 0) {
setEventMessages($langs->trans('RecordDeleted'), array());
} else {
setEventMessages($langs->trans('ErrorDeleteCurrencyFail'), array(), 'errors');

View file

@ -261,7 +261,7 @@ if (($action == 'searchfiles' || $action == 'dl')) {
$sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as t";
$sql .= " WHERE t.date_ech between ".$wheretail;
$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
//$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT;
//$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_UNPAID;
if (!empty($projectid)) {
$sql .= " AND fk_projet = ".((int) $projectid);
}

View file

@ -85,7 +85,7 @@ if ($id > 0 || $ref) {
$permissiontoread = $user->rights->tax->charges->lire;
$permissiontoadd = $user->rights->tax->charges->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$permissiontodelete = $user->rights->tax->charges->supprimer || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
$permissiontodelete = $user->rights->tax->charges->supprimer || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_UNPAID);
$permissionnote = $user->rights->tax->charges->creer; // Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->rights->tax->charges->creer; // Used by the include of actions_dellink.inc.php
$upload_dir = $conf->tax->multidir_output[isset($object->entity) ? $object->entity : 1];

View file

@ -84,7 +84,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ
$permissiontoread = $user->rights->tax->charges->lire;
$permissiontoadd = $user->rights->tax->charges->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$permissiontodelete = $user->rights->tax->charges->supprimer || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
$permissiontodelete = $user->rights->tax->charges->supprimer || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_UNPAID);
$permissionnote = $user->rights->tax->charges->creer; // Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->rights->tax->charges->creer; // Used by the include of actions_dellink.inc.php
$upload_dir = $conf->tax->multidir_output[isset($object->entity) ? $object->entity : 1].'/vat';