diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 4517bee15c6..d3aa8cc2211 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -80,7 +80,7 @@ if ($id > 0 || !empty($ref)) { // Define variables to know what current user can do on properties of user linked to edited member if ($object->user_id) { // $User is the user who edits, $object->user_id is the id of the related user in the edited member - $caneditfielduser = ((($user->id == $object->user_id) && $$user->hasRight('user', 'self', 'creer')) + $caneditfielduser = ((($user->id == $object->user_id) && $user->hasRight('user', 'self', 'creer')) || (($user->id != $object->user_id) && $user->hasRight('user', 'user', 'creer'))); $caneditpassworduser = ((($user->id == $object->user_id) && $user->hasRight('user', 'self', 'password')) || (($user->id != $object->user_id) && $user->hasRight('user', 'user', 'password'))); diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 735bef1e688..6916a2dfe5d 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -33,6 +33,7 @@ $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $optioncss = GETPOST('optioncss', 'alpha'); +$massaction = GETPOST('massaction', 'alpha'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; diff --git a/htdocs/core/modules/mailings/eventorganization.modules.php b/htdocs/core/modules/mailings/eventorganization.modules.php index 84c27c5f673..0d0ffb63c3a 100644 --- a/htdocs/core/modules/mailings/eventorganization.modules.php +++ b/htdocs/core/modules/mailings/eventorganization.modules.php @@ -188,7 +188,7 @@ class mailing_eventorganization extends MailingTargets include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; $formproject = new FormProjets($this->db); - $s .= $formproject->select_projects(-1, 0, "filter_eventorganization", 0, 0, 1, 1, 0, 0, 0, '', 1, 0, '', '', 'usage_organize_event=1'); + $s = $formproject->select_projects(-1, 0, "filter_eventorganization", 0, 0, 1, 1, 0, 0, 0, '', 1, 0, '', '', 'usage_organize_event=1'); return $s; } diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php index 942a913c8ea..36c798c8571 100644 --- a/htdocs/stripe/payout.php +++ b/htdocs/stripe/payout.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018-2023 Thibault FOUCART * Copyright (C) 2019 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -65,8 +65,6 @@ $result = restrictedArea($user, 'banque'); */ $form = new Form($db); -$societestatic = new Societe($db); -$memberstatic = new Adherent($db); $acc = new Account($db); $stripe = new Stripe($db); @@ -129,47 +127,12 @@ if (!$rowid) { } foreach ($payout->data as $payout) { - //$charge = $payout; - //var_dump($payout); - - // The metadata FULLTAG is defined by the online payment page - /*$FULLTAG=$charge->metadata->FULLTAG; - - // Save into $tmparray all metadata - $tmparray = dolExplodeIntoArray($FULLTAG,'.','='); - // Load origin object according to metadata - if (!empty($tmparray['CUS'])) - { - $societestatic->fetch($tmparray['CUS']); - } - else - { - $societestatic->id = 0; - } - if (!empty($tmparray['MEM'])) - { - $memberstatic->fetch($tmparray['MEM']); - } - else - { - $memberstatic->id = 0; - }*/ - - $societestatic->fetch($charge->metadata->idcustomer); - $societestatic->id = $charge->metadata->idcustomer; - $societestatic->lastname = $obj->lastname; - $societestatic->firstname = $obj->firstname; - $societestatic->admin = $obj->admin; - $societestatic->login = $obj->login; - $societestatic->email = $obj->email; - $societestatic->socid = $obj->fk_soc; - print ''; // Ref if (!empty($stripeacc)) { $connect = $stripeacc.'/'; - } + } else $connect = null; $url = 'https://dashboard.stripe.com/'.$connect.'test/payouts/'.$payout->id; if ($servicestatus) { @@ -178,32 +141,6 @@ if (!$rowid) { print "".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$payout->id."\n"; - - // Stripe customer - //print "".$charge->customer."\n"; - // Link - /*print ""; - if ($societestatic->id > 0) - { - print $societestatic->getNomUrl(1); - } - if ($memberstatic->id > 0) - { - print $memberstatic->getNomUrl(1); - } - print "\n";*/ - // Origine - //print ""; - ////if ($charge->metadata->dol_type=="order"){ - // $object = new Commande($db); - // $object->fetch($charge->metadata->dol_id); - // print "".img_picto('', 'object_order')." ".$object->ref.""; - //} elseif ($charge->metadata->dol_type=="invoice"){ - // $object = new Facture($db); - // $object->fetch($charge->metadata->dol_id); - // print "".img_picto('', 'object_invoice')." ".$object->ref.""; - //} - //print "\n"; // Date payment print ''.dol_print_date($payout->created, 'dayhour')."\n"; // Date payment