Fix phpcs

This commit is contained in:
Laurent Destailleur 2019-02-13 11:32:00 +01:00
parent 5c27ec5d25
commit ced386fdca
5 changed files with 81 additions and 81 deletions

View File

@ -585,7 +585,7 @@ abstract class CommonDocGenerator
$extralabels = $extrafields->fetch_name_optionals_label($extrafieldkey, true); $extralabels = $extrafields->fetch_name_optionals_label($extrafieldkey, true);
$line->fetch_optionals(); $line->fetch_optionals();
$resarray = $this->fill_substitutionarray_with_extrafields($line, $resarray, $extrafields, $array_key=$array_key, $outputlangs); $resarray = $this->fill_substitutionarray_with_extrafields($line, $resarray, $extrafields, $array_key, $outputlangs);
// Load product data optional fields to the line -> enables to use "line_options_{extrafield}" // Load product data optional fields to the line -> enables to use "line_options_{extrafield}"
if (isset($line->fk_product) && $line->fk_product > 0) if (isset($line->fk_product) && $line->fk_product > 0)

View File

@ -212,13 +212,13 @@ if ($result)
else else
print_liste_field_titre("SalesRepresentative", $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("SalesRepresentative", $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("SellingPrice",$_SERVER["PHP_SELF"], "selling_price", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($labelcostprice,$_SERVER["PHP_SELF"], "buying_price", "", $param,' align="right"', $sortfield, $sortorder); print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", $param,' align="right"', $sortfield, $sortorder);
print_liste_field_titre("Margin",$_SERVER["PHP_SELF"], "marge", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", $param, 'align="right"', $sortfield, $sortorder);
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) if (! empty($conf->global->DISPLAY_MARGIN_RATES))
print_liste_field_titre("MarginRate",$_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
if (! empty($conf->global->DISPLAY_MARK_RATES)) if (! empty($conf->global->DISPLAY_MARK_RATES))
print_liste_field_titre("MarkRate",$_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
print "</tr>\n"; print "</tr>\n";
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT); $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);

View File

@ -49,38 +49,38 @@ if (! empty($conf->productbatch->enabled)) $langs->load("productbatch");
// Security check // Security check
$result=restrictedArea($user,'stock'); $result=restrictedArea($user,'stock');
$id=GETPOST('id','int'); $id=GETPOST('id', 'int');
$ref = GETPOST('ref','alpha'); $ref = GETPOST('ref', 'alpha');
$msid=GETPOST('msid','int'); $msid=GETPOST('msid', 'int');
$product_id=GETPOST("product_id"); $product_id=GETPOST("product_id", 'int');
$action=GETPOST('action','aZ09'); $action=GETPOST('action', 'aZ09');
$cancel=GETPOST('cancel','alpha'); $cancel=GETPOST('cancel', 'alpha');
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'movementlist'; $contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'movementlist';
$idproduct = GETPOST('idproduct','int'); $idproduct = GETPOST('idproduct', 'int');
$year = GETPOST("year"); $year = GETPOST("year", 'int');
$month = GETPOST("month"); $month = GETPOST("month", 'int');
$search_ref = GETPOST('search_ref', 'alpha'); $search_ref = GETPOST('search_ref', 'alpha');
$search_movement = GETPOST("search_movement"); $search_movement = GETPOST("search_movement", 'alpha');
$search_product_ref = trim(GETPOST("search_product_ref")); $search_product_ref = trim(GETPOST("search_product_ref", 'alpha'));
$search_product = trim(GETPOST("search_product")); $search_product = trim(GETPOST("search_product", 'alpha'));
$search_warehouse = trim(GETPOST("search_warehouse")); $search_warehouse = trim(GETPOST("search_warehouse", 'alpha'));
$search_inventorycode = trim(GETPOST("search_inventorycode")); $search_inventorycode = trim(GETPOST("search_inventorycode", 'alpha'));
$search_user = trim(GETPOST("search_user")); $search_user = trim(GETPOST("search_user", 'alpha'));
$search_batch = trim(GETPOST("search_batch")); $search_batch = trim(GETPOST("search_batch", 'alpha'));
$search_qty = trim(GETPOST("search_qty")); $search_qty = trim(GETPOST("search_qty", 'alpha'));
$search_type_mouvement=GETPOST('search_type_mouvement','int'); $search_type_mouvement=GETPOST('search_type_mouvement','int');
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
$page = GETPOST("page",'int'); $page = GETPOST("page", 'int');
$sortfield = GETPOST("sortfield",'alpha'); $sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder",'alpha'); $sortorder = GETPOST("sortorder", 'alpha');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page; $offset = $limit * $page;
if (! $sortfield) $sortfield="m.datem"; if (! $sortfield) $sortfield="m.datem";
if (! $sortorder) $sortorder="DESC"; if (! $sortorder) $sortorder="DESC";
$pdluoid=GETPOST('pdluoid','int'); $pdluoid=GETPOST('pdluoid', 'int');
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$object = new MouvementStock($db); $object = new MouvementStock($db);
@ -90,7 +90,7 @@ $formfile = new FormFile($db);
// fetch optionals attributes and labels // fetch optionals attributes and labels
$extralabels = $extrafields->fetch_name_optionals_label('movement'); $extralabels = $extrafields->fetch_name_optionals_label('movement');
$search_array_options=$extrafields->getOptionalsFromPost($object->table_element,'','search_'); $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
$arrayfields=array( $arrayfields=array(
'm.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), 'm.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
@ -132,7 +132,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
// Do we click on purge search criteria ? // Do we click on purge search criteria ?
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // Both test are required to be compatible with all browsers if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // Both test are required to be compatible with all browsers
{ {
$year=''; $year='';
$month=''; $month='';
@ -185,22 +185,22 @@ if ($action == "correct_stock")
if ($product->hasbatch()) if ($product->hasbatch())
{ {
$batch=GETPOST('batch_number'); $batch=GETPOST('batch_number', 'alpha');
//$eatby=GETPOST('eatby'); //$eatby=GETPOST('eatby');
//$sellby=GETPOST('sellby'); //$sellby=GETPOST('sellby');
$eatby=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); $eatby=dol_mktime(0, 0, 0, GETPOST('eatbymonth', 'int'), GETPOST('eatbyday', 'int'), GETPOST('eatbyyear', 'int'));
$sellby=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); $sellby=dol_mktime(0, 0, 0, GETPOST('sellbymonth', 'int'), GETPOST('sellbyday', 'int'), GETPOST('sellbyyear', 'int'));
$result=$product->correct_stock_batch( $result=$product->correct_stock_batch(
$user, $user,
$id, $id,
GETPOST("nbpiece",'int'), GETPOST("nbpiece", 'int'),
GETPOST("mouvement"), GETPOST("mouvement", 'int'),
GETPOST("label",'san_alpha'), GETPOST("label", 'san_alpha'),
GETPOST('unitprice'), GETPOST('unitprice', 'alpha'),
$eatby,$sellby,$batch, $eatby,$sellby,$batch,
GETPOST('inventorycode'), GETPOST('inventorycode', 'alpha'),
$origin_element, $origin_element,
$origin_id $origin_id
); // We do not change value of stock for a correction ); // We do not change value of stock for a correction
@ -210,11 +210,11 @@ if ($action == "correct_stock")
$result=$product->correct_stock( $result=$product->correct_stock(
$user, $user,
$id, $id,
GETPOST("nbpiece",'int'), GETPOST("nbpiece", 'int'),
GETPOST("mouvement"), GETPOST("mouvement", 'alpha'),
GETPOST("label",'san_alpha'), GETPOST("label",'san_alpha'),
GETPOST('unitprice'), GETPOST('unitprice', 'alpha'),
GETPOST('inventorycode'), GETPOST('inventorycode', 'alpha'),
$origin_element, $origin_element,
$origin_id $origin_id
); // We do not change value of stock for a correction ); // We do not change value of stock for a correction
@ -242,7 +242,7 @@ if ($action == "transfert_stock" && ! $cancel)
$product = new Product($db); $product = new Product($db);
if (! empty($product_id)) $result=$product->fetch($product_id); if (! empty($product_id)) $result=$product->fetch($product_id);
if (! (GETPOST("id_entrepot_destination",'int') > 0)) if (! (GETPOST("id_entrepot_destination", 'int') > 0))
{ {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors');
$error++; $error++;
@ -272,7 +272,7 @@ if ($action == "transfert_stock" && ! $cancel)
$product = new Product($db); $product = new Product($db);
$result=$product->fetch($product_id); $result=$product->fetch($product_id);
if ($product->hasbatch() && ! GETPOST("batch_number")) if ($product->hasbatch() && ! GETPOST("batch_number", 'alpha'))
{ {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("batch_number")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("batch_number")), null, 'errors');
$error++; $error++;
@ -319,7 +319,7 @@ if ($action == "transfert_stock" && ! $cancel)
else else
{ {
$srcwarehouseid=$id; $srcwarehouseid=$id;
$batch=GETPOST('batch_number'); $batch=GETPOST('batch_number', 'alpha');
$eatby=$d_eatby; $eatby=$d_eatby;
$sellby=$d_sellby; $sellby=$d_sellby;
} }
@ -330,23 +330,23 @@ if ($action == "transfert_stock" && ! $cancel)
$result1=$product->correct_stock_batch( $result1=$product->correct_stock_batch(
$user, $user,
$srcwarehouseid, $srcwarehouseid,
GETPOST("nbpiece",'int'), GETPOST("nbpiece", 'int'),
1, 1,
GETPOST("label",'san_alpha'), GETPOST("label", 'san_alpha'),
$pricesrc, $pricesrc,
$eatby,$sellby,$batch, $eatby,$sellby,$batch,
GETPOST('inventorycode') GETPOST('inventorycode', 'alpha')
); );
// Add stock // Add stock
$result2=$product->correct_stock_batch( $result2=$product->correct_stock_batch(
$user, $user,
GETPOST("id_entrepot_destination",'int'), GETPOST("id_entrepot_destination", 'int'),
GETPOST("nbpiece",'int'), GETPOST("nbpiece", 'int'),
0, 0,
GETPOST("label",'san_alpha'), GETPOST("label", 'san_alpha'),
$pricedest, $pricedest,
$eatby,$sellby,$batch, $eatby,$sellby,$batch,
GETPOST('inventorycode') GETPOST('inventorycode', 'alpha')
); );
} }
} }
@ -356,22 +356,22 @@ if ($action == "transfert_stock" && ! $cancel)
$result1=$product->correct_stock( $result1=$product->correct_stock(
$user, $user,
$id, $id,
GETPOST("nbpiece"), GETPOST("nbpiece", 'int'),
1, 1,
GETPOST("label"), GETPOST("label", 'alpha'),
$pricesrc, $pricesrc,
GETPOST('inventorycode') GETPOST('inventorycode', 'alpha')
); );
// Add stock // Add stock
$result2=$product->correct_stock( $result2=$product->correct_stock(
$user, $user,
GETPOST("id_entrepot_destination"), GETPOST("id_entrepot_destination"),
GETPOST("nbpiece"), GETPOST("nbpiece", 'int'),
0, 0,
GETPOST("label"), GETPOST("label", 'alpha'),
$pricedest, $pricedest,
GETPOST('inventorycode') GETPOST('inventorycode', 'alpha')
); );
} }
if (! $error && $result1 >= 0 && $result2 >= 0) if (! $error && $result1 >= 0 && $result2 >= 0)
@ -568,7 +568,7 @@ if ($resql)
$morehtmlref.='</div>'; $morehtmlref.='</div>';
$shownav = 1; $shownav = 1;
if ($user->societe_id && ! in_array('stock', explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0; if ($user->societe_id && ! in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0;
dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref); dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref);
@ -693,9 +693,9 @@ if ($resql)
} }
$param=''; $param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($id > 0) $param.='&id='.$id; if ($id > 0) $param.='&id='.urlencode($id);
if ($search_movement) $param.='&search_movement='.urlencode($search_movement); if ($search_movement) $param.='&search_movement='.urlencode($search_movement);
if ($search_inventorycode) $param.='&search_inventorycode='.urlencode($search_inventorycode); if ($search_inventorycode) $param.='&search_inventorycode='.urlencode($search_inventorycode);
if ($search_type_mouvement) $param.='&search_type_mouvement='.urlencode($search_type_mouvement); if ($search_type_mouvement) $param.='&search_type_mouvement='.urlencode($search_type_mouvement);
@ -706,7 +706,7 @@ if ($resql)
if (!empty($sref)) $param.='&sref='.urlencode($sref); // FIXME $sref is not defined if (!empty($sref)) $param.='&sref='.urlencode($sref); // FIXME $sref is not defined
if (!empty($snom)) $param.='&snom='.urlencode($snom); // FIXME $snom is not defined if (!empty($snom)) $param.='&snom='.urlencode($snom); // FIXME $snom is not defined
if ($search_user) $param.='&search_user='.urlencode($search_user); if ($search_user) $param.='&search_user='.urlencode($search_user);
if ($idproduct > 0) $param.='&idproduct='.$idproduct; if ($idproduct > 0) $param.='&idproduct='.urlencode($idproduct);
// Add $param from extra fields // Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@ -737,7 +737,7 @@ if ($resql)
if ($sall) if ($sall)
{ {
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall).'</div>'; print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall) . join(', ', $fieldstosearchall).'</div>';
} }
$moreforfilter=''; $moreforfilter='';
@ -928,9 +928,9 @@ if ($resql)
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
if (! empty($arrayfields['m.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'],$_SERVER["PHP_SELF"],"p.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); if (! empty($arrayfields['m.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'] ,$_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
if (! empty($arrayfields['m.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'],$_SERVER["PHP_SELF"],"p.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); if (! empty($arrayfields['m.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch '); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
print "</tr>\n"; print "</tr>\n";
@ -978,7 +978,7 @@ if ($resql)
if (! empty($arrayfields['m.datem']['checked'])) if (! empty($arrayfields['m.datem']['checked']))
{ {
// Date // Date
print '<td>'.dol_print_date($db->jdate($objp->datem),'dayhour').'</td>'; print '<td>'.dol_print_date($db->jdate($objp->datem), 'dayhour').'</td>';
} }
if (! empty($arrayfields['p.ref']['checked'])) if (! empty($arrayfields['p.ref']['checked']))
{ {
@ -1007,11 +1007,11 @@ if ($resql)
} }
if (! empty($arrayfields['pl.eatby']['checked'])) if (! empty($arrayfields['pl.eatby']['checked']))
{ {
print '<td align="center">'. dol_print_date($objp->eatby,'day') .'</td>'; print '<td align="center">'. dol_print_date($objp->eatby, 'day') .'</td>';
} }
if (! empty($arrayfields['pl.sellby']['checked'])) if (! empty($arrayfields['pl.sellby']['checked']))
{ {
print '<td align="center">'. dol_print_date($objp->sellby,'day') .'</td>'; print '<td align="center">'. dol_print_date($objp->sellby, 'day') .'</td>';
} }
// Warehouse // Warehouse
if (! empty($arrayfields['e.ref']['checked'])) if (! empty($arrayfields['e.ref']['checked']))
@ -1120,14 +1120,14 @@ if ($resql)
$balanceafter=$movement->calculateBalanceForProductBefore($productidselected, $dateafter); $balanceafter=$movement->calculateBalanceForProductBefore($productidselected, $dateafter);
//print '<tr class="total"><td class="liste_total">'; //print '<tr class="total"><td class="liste_total">';
print $langs->trans("NbOfProductBeforePeriod", $productlabelselected, dol_print_date($datebefore,'day','gmt')); print $langs->trans("NbOfProductBeforePeriod", $productlabelselected, dol_print_date($datebefore, 'day', 'gmt'));
//print '</td>'; //print '</td>';
//print '<td class="liste_total" colspan="6" align="right">'; //print '<td class="liste_total" colspan="6" align="right">';
print ': '.$balancebefore; print ': '.$balancebefore;
print "<br>\n"; print "<br>\n";
//print '</td></tr>'; //print '</td></tr>';
//print '<tr class="total"><td class="liste_total">'; //print '<tr class="total"><td class="liste_total">';
print $langs->trans("NbOfProductAfterPeriod", $productlabelselected, dol_print_date($dateafter,'day','gmt')); print $langs->trans("NbOfProductAfterPeriod", $productlabelselected, dol_print_date($dateafter, 'day', 'gmt'));
//print '</td>'; //print '</td>';
//print '<td class="liste_total" colspan="6" align="right">'; //print '<td class="liste_total" colspan="6" align="right">';
print ': '.$balanceafter; print ': '.$balanceafter;
@ -1169,7 +1169,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id>0)
$genallowed=$user->rights->stock->lire; $genallowed=$user->rights->stock->lire;
$delallowed=$user->rights->stock->creer; $delallowed=$user->rights->stock->creer;
print $formfile->showdocuments($modulepart,$objectref,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$object->default_lang, '', $object); print $formfile->showdocuments($modulepart, $objectref, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object);
$somethingshown=$formfile->numoffiles; $somethingshown=$formfile->numoffiles;
print '</div><div class="fichehalfright"><div class="ficheaddleft">'; print '</div><div class="fichehalfright"><div class="ficheaddleft">';

View File

@ -1045,8 +1045,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$contactsofproject=$projectstatic->getListContactId('internal'); $contactsofproject=$projectstatic->getListContactId('internal');
if (count($contactsofproject)>0) if (count($contactsofproject)>0)
{ {
if (in_array($user->id, $userid=$contactsofproject)) $userid = $user->id; if (in_array($user->id, $contactsofproject)) $userid = $user->id;
else $userid=$contactsofproject[0]; else $userid = $contactsofproject[0];
if ($projectstatic->public) $contactsofproject = array(); if ($projectstatic->public) $contactsofproject = array();
print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'maxwidth200'); print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'maxwidth200');
} }

View File

@ -85,7 +85,7 @@ class FormResource
$resourcestat = new Dolresource($this->db); $resourcestat = new Dolresource($this->db);
$resources_used = $resourcestat->fetch_all('ASC', 't.rowid', $limit, $offset, $filter=''); $resources_used = $resourcestat->fetch_all('ASC', 't.rowid', $limit, $offset, $filter);
if ($outputmode != 2) if ($outputmode != 2)
{ {