@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $type = 'myobject'; |
| 46 | 46 | |
| 47 | 47 | $arrayofparameters = array( |
| 48 | - 'EVENTORGANIZATION_TASK_LABEL'=>array('type'=>'textarea','enabled'=>1), |
|
| 48 | + 'EVENTORGANIZATION_TASK_LABEL'=>array('type'=>'textarea', 'enabled'=>1), |
|
| 49 | 49 | 'EVENTORGANIZATION_CATEG_THIRDPARTY_CONF'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1), |
| 50 | 50 | 'EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1), |
| 51 | 51 | 'EVENTORGANIZATION_FILTERATTENDEES_CAT'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1), |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | |
| 80 | 80 | if ($cancel) { |
| 81 | - $action =''; |
|
| 81 | + $action = ''; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | if ((float) DOL_VERSION >= 6) { |
@@ -216,25 +216,25 @@ discard block |
||
| 216 | 216 | print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; |
| 217 | 217 | |
| 218 | 218 | foreach ($arrayofparameters as $constname => $val) { |
| 219 | - if ($val['enabled']==1) { |
|
| 219 | + if ($val['enabled'] == 1) { |
|
| 220 | 220 | $setupnotempty++; |
| 221 | 221 | print '<tr class="oddeven"><td>'; |
| 222 | - $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); |
|
| 222 | + $tooltiphelp = (($langs->trans($constname.'Tooltip') != $constname.'Tooltip') ? $langs->trans($constname.'Tooltip') : ''); |
|
| 223 | 223 | print '<span id="helplink'.$constname.'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1, 'info', '', 0, 3, 'tootips'.$constname).'</span>'; |
| 224 | 224 | print '</td><td>'; |
| 225 | 225 | |
| 226 | 226 | if ($val['type'] == 'textarea') { |
| 227 | - print '<textarea class="flat" name="'.$constname.'" id="'.$constname.'" cols="50" rows="5" wrap="soft">' . "\n"; |
|
| 227 | + print '<textarea class="flat" name="'.$constname.'" id="'.$constname.'" cols="50" rows="5" wrap="soft">'."\n"; |
|
| 228 | 228 | print $conf->global->{$constname}; |
| 229 | 229 | print "</textarea>\n"; |
| 230 | - } elseif ($val['type']== 'html') { |
|
| 231 | - require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
| 230 | + } elseif ($val['type'] == 'html') { |
|
| 231 | + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
| 232 | 232 | $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); |
| 233 | 233 | $doleditor->Create(); |
| 234 | 234 | } elseif ($val['type'] == 'yesno') { |
| 235 | 235 | print $form->selectyesno($constname, $conf->global->{$constname}, 1); |
| 236 | 236 | } elseif (preg_match('/emailtemplate:/', $val['type'])) { |
| 237 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; |
|
| 237 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; |
|
| 238 | 238 | $formmail = new FormMail($db); |
| 239 | 239 | |
| 240 | 240 | $tmp = explode(':', $val['type']); |
@@ -246,10 +246,10 @@ discard block |
||
| 246 | 246 | //var_dump($modelmail); |
| 247 | 247 | $moreonlabel = ''; |
| 248 | 248 | if (!empty($arrayofmessagename[$modelmail->label])) { |
| 249 | - $moreonlabel = ' <span class="opacitymedium">(' . $langs->trans("SeveralLangugeVariatFound") . ')</span>'; |
|
| 249 | + $moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>'; |
|
| 250 | 250 | } |
| 251 | 251 | // The 'label' is the key that is unique if we exclude the language |
| 252 | - $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)) . $moreonlabel; |
|
| 252 | + $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; |
|
| 253 | 253 | } |
| 254 | 254 | } |
| 255 | 255 | print $form->selectarray($constname, $arrayofmessagename, $conf->global->{$constname}, 'None', 0, 0, '', 0, 0, 0, '', '', 1); |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | $form->select_produits($selected, $constname, '', 0); |
| 292 | 292 | } |
| 293 | 293 | } else { |
| 294 | - print '<input name="' . $constname . '" class="flat ' . (empty($val['css']) ? 'minwidth200' : $val['css']) . '" value="' . $conf->global->{$constname} . '">'; |
|
| 294 | + print '<input name="'.$constname.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.$conf->global->{$constname}.'">'; |
|
| 295 | 295 | } |
| 296 | 296 | print '</td></tr>'; |
| 297 | 297 | } |
@@ -308,22 +308,22 @@ discard block |
||
| 308 | 308 | print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; |
| 309 | 309 | |
| 310 | 310 | foreach ($arrayofparameters as $constname => $val) { |
| 311 | - if ($val['enabled']==1) { |
|
| 311 | + if ($val['enabled'] == 1) { |
|
| 312 | 312 | $setupnotempty++; |
| 313 | 313 | print '<tr class="oddeven"><td>'; |
| 314 | - $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); |
|
| 314 | + $tooltiphelp = (($langs->trans($constname.'Tooltip') != $constname.'Tooltip') ? $langs->trans($constname.'Tooltip') : ''); |
|
| 315 | 315 | print $form->textwithpicto($langs->trans($constname), $tooltiphelp); |
| 316 | 316 | print '</td><td>'; |
| 317 | 317 | |
| 318 | 318 | if ($val['type'] == 'textarea') { |
| 319 | 319 | print dol_nl2br($conf->global->{$constname}); |
| 320 | - } elseif ($val['type']== 'html') { |
|
| 320 | + } elseif ($val['type'] == 'html') { |
|
| 321 | 321 | print $conf->global->{$constname}; |
| 322 | 322 | } elseif ($val['type'] == 'yesno') { |
| 323 | 323 | print ajax_constantonoff($constname); |
| 324 | 324 | } elseif (preg_match('/emailtemplate:/', $val['type'])) { |
| 325 | 325 | if (!empty($conf->global->{$constname})) { |
| 326 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; |
|
| 326 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; |
|
| 327 | 327 | $formmail = new FormMail($db); |
| 328 | 328 | |
| 329 | 329 | $tmp = explode(':', $val['type']); |
@@ -344,18 +344,18 @@ discard block |
||
| 344 | 344 | $ways = $c->print_all_ways(' >> ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text |
| 345 | 345 | $toprint = array(); |
| 346 | 346 | foreach ($ways as $way) { |
| 347 | - $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '</li>'; |
|
| 347 | + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.$way.'</li>'; |
|
| 348 | 348 | } |
| 349 | - print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>'; |
|
| 349 | + print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>'; |
|
| 350 | 350 | } |
| 351 | 351 | } elseif (preg_match('/thirdparty_type/', $val['type'])) { |
| 352 | - if ($conf->global->{$constname}==2) { |
|
| 352 | + if ($conf->global->{$constname} == 2) { |
|
| 353 | 353 | print $langs->trans("Prospect"); |
| 354 | - } elseif ($conf->global->{$constname}==3) { |
|
| 354 | + } elseif ($conf->global->{$constname} == 3) { |
|
| 355 | 355 | print $langs->trans("ProspectCustomer"); |
| 356 | - } elseif ($conf->global->{$constname}==1) { |
|
| 356 | + } elseif ($conf->global->{$constname} == 1) { |
|
| 357 | 357 | print $langs->trans("Customer"); |
| 358 | - } elseif ($conf->global->{$constname}==0) { |
|
| 358 | + } elseif ($conf->global->{$constname} == 0) { |
|
| 359 | 359 | print $langs->trans("NorProspectNorCustomer"); |
| 360 | 360 | } |
| 361 | 361 | } elseif ($val['type'] == 'product') { |
@@ -833,7 +833,9 @@ |
||
| 833 | 833 | print '<td class="center">'; |
| 834 | 834 | print dol_print_date($db->jdate($obj->date_valid), 'day'); |
| 835 | 835 | print '</td>'; |
| 836 | - if (!$i) $totalarray['nbfield']++; |
|
| 836 | + if (!$i) { |
|
| 837 | + $totalarray['nbfield']++; |
|
| 838 | + } |
|
| 837 | 839 | } |
| 838 | 840 | /*if (!empty($arrayfields['cp.date_approve']['checked'])) { |
| 839 | 841 | print '<td class="center">'; |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | // Action called when page is submitted |
| 223 | -if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conference->status!=2 || !empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { |
|
| 223 | +if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conference->status != 2 || !empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { |
|
| 224 | 224 | $error = 0; |
| 225 | 225 | |
| 226 | 226 | $urlback = ''; |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | $redirection = $dolibarr_main_url_root.'/public/payment/newpayment.php?source='.urlencode($sourcetouse).'&ref='.urlencode($reftouse); |
| 462 | 462 | if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { |
| 463 | 463 | if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { |
| 464 | - $redirection .= '&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical |
|
| 464 | + $redirection .= '&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$sourcetouse.$reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical |
|
| 465 | 465 | } else { |
| 466 | 466 | $redirection .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); |
| 467 | 467 | } |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | |
| 556 | 556 | // Welcome message |
| 557 | 557 | |
| 558 | -print $langs->trans("EvntOrgWelcomeMessage", $project->title . ' '. $conference->label); |
|
| 558 | +print $langs->trans("EvntOrgWelcomeMessage", $project->title.' '.$conference->label); |
|
| 559 | 559 | print '<br>'; |
| 560 | 560 | if ($conference->id) { |
| 561 | 561 | print $langs->trans("Date").': '; |
@@ -578,20 +578,20 @@ discard block |
||
| 578 | 578 | |
| 579 | 579 | dol_htmloutput_errors($errmsg); |
| 580 | 580 | |
| 581 | -if (!empty($conference->id) && $conference->status==ConferenceOrBooth::STATUS_CONFIRMED || (!empty($project->id) && $project->status==Project::STATUS_VALIDATED)) { |
|
| 581 | +if (!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS_CONFIRMED || (!empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { |
|
| 582 | 582 | // Print form |
| 583 | - print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST" name="newmember">' . "\n"; |
|
| 584 | - print '<input type="hidden" name="token" value="' . newToken() . '" / >'; |
|
| 585 | - print '<input type="hidden" name="entity" value="' . $entity . '" />'; |
|
| 583 | + print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="newmember">'."\n"; |
|
| 584 | + print '<input type="hidden" name="token" value="'.newToken().'" / >'; |
|
| 585 | + print '<input type="hidden" name="entity" value="'.$entity.'" />'; |
|
| 586 | 586 | print '<input type="hidden" name="action" value="add" />'; |
| 587 | - print '<input type="hidden" name="type" value="' . $type . '" />'; |
|
| 588 | - print '<input type="hidden" name="id" value="' . $conference->id . '" />'; |
|
| 589 | - print '<input type="hidden" name="fk_project" value="' . $project->id . '" />'; |
|
| 590 | - print '<input type="hidden" name="securekey" value="' . $securekeyreceived . '" />'; |
|
| 587 | + print '<input type="hidden" name="type" value="'.$type.'" />'; |
|
| 588 | + print '<input type="hidden" name="id" value="'.$conference->id.'" />'; |
|
| 589 | + print '<input type="hidden" name="fk_project" value="'.$project->id.'" />'; |
|
| 590 | + print '<input type="hidden" name="securekey" value="'.$securekeyreceived.'" />'; |
|
| 591 | 591 | |
| 592 | 592 | print '<br>'; |
| 593 | 593 | |
| 594 | - print '<br><span class="opacitymedium">' . $langs->trans("FieldsWithAreMandatory", '*') . '</span><br>'; |
|
| 594 | + print '<br><span class="opacitymedium">'.$langs->trans("FieldsWithAreMandatory", '*').'</span><br>'; |
|
| 595 | 595 | //print $langs->trans("FieldsWithIsForPublic",'**').'<br>'; |
| 596 | 596 | |
| 597 | 597 | print dol_get_fiche_head(''); |
@@ -607,29 +607,29 @@ discard block |
||
| 607 | 607 | }); |
| 608 | 608 | </script>'; |
| 609 | 609 | |
| 610 | - print '<table class="border" summary="form to subscribe" id="tablesubscribe">' . "\n"; |
|
| 610 | + print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n"; |
|
| 611 | 611 | |
| 612 | 612 | |
| 613 | - print '<tr><td>' . $langs->trans("Email") . '<font color="red">*</font></td><td><input type="text" name="email" maxlength="255" class="minwidth200" value="' . dol_escape_htmltag(GETPOST('email')) . '"></td></tr>' . "\n"; |
|
| 613 | + print '<tr><td>'.$langs->trans("Email").'<font color="red">*</font></td><td><input type="text" name="email" maxlength="255" class="minwidth200" value="'.dol_escape_htmltag(GETPOST('email')).'"></td></tr>'."\n"; |
|
| 614 | 614 | // Company |
| 615 | - print '<tr id="trcompany" class="trcompany"><td>' . $langs->trans("Company"); |
|
| 615 | + print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company"); |
|
| 616 | 616 | if (!empty(floatval($project->price_registration))) { |
| 617 | 617 | print '<font color="red">*</font>'; |
| 618 | 618 | } |
| 619 | 619 | print ' </td><td>'; |
| 620 | 620 | print img_picto('', 'company', 'class="pictofixedwidth"'); |
| 621 | - print '<input type="text" name="societe" class="minwidth200" value="' . dol_escape_htmltag(GETPOST('societe')) . '"></td></tr>' . "\n"; |
|
| 621 | + print '<input type="text" name="societe" class="minwidth200" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n"; |
|
| 622 | 622 | // Address |
| 623 | - print '<tr><td>' . $langs->trans("Address") . '</td><td>' . "\n"; |
|
| 624 | - print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="' . ROWS_3 . '">' . dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1) . '</textarea></td></tr>' . "\n"; |
|
| 623 | + print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n"; |
|
| 624 | + print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n"; |
|
| 625 | 625 | // Zip / Town |
| 626 | - print '<tr><td>' . $langs->trans('Zip') . ' / ' . $langs->trans('Town') . '</td><td>'; |
|
| 626 | + print '<tr><td>'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td><td>'; |
|
| 627 | 627 | print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1); |
| 628 | 628 | print ' / '; |
| 629 | 629 | print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1); |
| 630 | 630 | print '</td></tr>'; |
| 631 | 631 | // Country |
| 632 | - print '<tr><td>' . $langs->trans('Country') . '<font color="red">*</font></td><td>'; |
|
| 632 | + print '<tr><td>'.$langs->trans('Country').'<font color="red">*</font></td><td>'; |
|
| 633 | 633 | print img_picto('', 'country', 'class="pictofixedwidth"'); |
| 634 | 634 | $country_id = GETPOST('country_id'); |
| 635 | 635 | if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) { |
@@ -651,7 +651,7 @@ discard block |
||
| 651 | 651 | print '</td></tr>'; |
| 652 | 652 | // State |
| 653 | 653 | if (empty($conf->global->SOCIETE_DISABLE_STATE)) { |
| 654 | - print '<tr><td>' . $langs->trans('State') . '</td><td>'; |
|
| 654 | + print '<tr><td>'.$langs->trans('State').'</td><td>'; |
|
| 655 | 655 | if ($country_code) { |
| 656 | 656 | print $formcompany->select_state(GETPOST("state_id"), $country_code); |
| 657 | 657 | } else { |
@@ -661,7 +661,7 @@ discard block |
||
| 661 | 661 | } |
| 662 | 662 | |
| 663 | 663 | if ($project->price_registration) { |
| 664 | - print '<tr><td>' . $langs->trans('Price') . '</td><td>'; |
|
| 664 | + print '<tr><td>'.$langs->trans('Price').'</td><td>'; |
|
| 665 | 665 | print price($project->price_registration, 1, $langs, 1, -1, -1, $conf->currency); |
| 666 | 666 | print '</td></tr>'; |
| 667 | 667 | } |
@@ -672,9 +672,9 @@ discard block |
||
| 672 | 672 | |
| 673 | 673 | // Save |
| 674 | 674 | print '<div class="center">'; |
| 675 | - print '<input type="submit" value="' . $langs->trans("Submit") . '" id="submitsave" class="button">'; |
|
| 675 | + print '<input type="submit" value="'.$langs->trans("Submit").'" id="submitsave" class="button">'; |
|
| 676 | 676 | if (!empty($backtopage)) { |
| 677 | - print ' <input type="submit" value="' . $langs->trans("Cancel") . '" id="submitcancel" class="button button-cancel">'; |
|
| 677 | + print ' <input type="submit" value="'.$langs->trans("Cancel").'" id="submitcancel" class="button button-cancel">'; |
|
| 678 | 678 | } |
| 679 | 679 | print '</div>'; |
| 680 | 680 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $nbContacts = $dataretrieved; |
| 56 | 56 | } else { |
| 57 | 57 | $nbContacts = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external')); |
| 58 | - dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 58 | + dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 59 | 59 | } |
| 60 | 60 | $head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : ''); |
| 61 | 61 | $head[$h][1] = $langs->trans("ProjectContact"); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
| 80 | 80 | $taskstatic = new Task($db); |
| 81 | 81 | $nbTasks = count($taskstatic->getTasksArray(0, 0, $project->id, 0, 0)); |
| 82 | - dol_setcache($cachekey, $nbTasks, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 82 | + dol_setcache($cachekey, $nbTasks, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 83 | 83 | } |
| 84 | 84 | $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : ''); |
| 85 | 85 | $head[$h][1] = $langs->trans("Tasks"); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $obj = $db->fetch_object($resql); |
| 108 | 108 | if ($obj) { |
| 109 | 109 | $nbTimeSpent = 1; |
| 110 | - dol_setcache($cachekey, $nbTimeSpent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 110 | + dol_setcache($cachekey, $nbTimeSpent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 111 | 111 | } |
| 112 | 112 | } else { |
| 113 | 113 | dol_print_error($db); |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | if (!empty($conf->banque->enabled)) { |
| 195 | 195 | $nbElements += $project->getElementCount('variouspayment', 'payment_various'); |
| 196 | 196 | } |
| 197 | - dol_setcache($cachekey, $nbElements, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 197 | + dol_setcache($cachekey, $nbElements, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 198 | 198 | } |
| 199 | 199 | $head[$h][0] = DOL_URL_ROOT.'/projet/element.php?id='.$project->id; |
| 200 | 200 | $head[$h][1] = $langs->trans("ProjectOverview"); |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | |
| 208 | 208 | if ($conf->eventorganization->enabled && !empty($project->usage_organize_event)) { |
| 209 | 209 | $langs->load('eventorganization'); |
| 210 | - $head[$h][0] = DOL_URL_ROOT . '/eventorganization/conferenceorbooth_list.php?projectid=' . $project->id; |
|
| 210 | + $head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_list.php?projectid='.$project->id; |
|
| 211 | 211 | $head[$h][1] = $langs->trans("EventOrganization"); |
| 212 | 212 | |
| 213 | 213 | // Enable caching of conf or booth count |
@@ -219,18 +219,18 @@ discard block |
||
| 219 | 219 | $nbConfOrBooth = $dataretrieved; |
| 220 | 220 | } else { |
| 221 | 221 | require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; |
| 222 | - $conforbooth=new ConferenceOrBooth($db); |
|
| 222 | + $conforbooth = new ConferenceOrBooth($db); |
|
| 223 | 223 | $result = $conforbooth->fetchAll('', '', 0, 0, array('t.fk_project'=>$project->id)); |
| 224 | 224 | //, |
| 225 | - if (!is_array($result) && $result<0) { |
|
| 225 | + if (!is_array($result) && $result < 0) { |
|
| 226 | 226 | setEventMessages($conforbooth->error, $conforbooth->errors, 'errors'); |
| 227 | 227 | } else { |
| 228 | 228 | $nbConfOrBooth = count($result); |
| 229 | 229 | } |
| 230 | - dol_setcache($cachekey, $nbConfOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 230 | + dol_setcache($cachekey, $nbConfOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 231 | 231 | } |
| 232 | 232 | if ($nbConfOrBooth > 0) { |
| 233 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbConfOrBooth . '</span>'; |
|
| 233 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbConfOrBooth.'</span>'; |
|
| 234 | 234 | } |
| 235 | 235 | $head[$h][2] = 'eventorganisation'; |
| 236 | 236 | $h++; |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); |
| 276 | 276 | $nbLinks = Link::count($db, $project->element, $project->id); |
| 277 | 277 | $totalAttached = $nbFiles + $nbLinks; |
| 278 | - dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 278 | + dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 279 | 279 | } |
| 280 | 280 | $head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$project->id; |
| 281 | 281 | $head[$h][1] = $langs->trans('Documents'); |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | $nbComments = $dataretrieved; |
| 297 | 297 | } else { |
| 298 | 298 | $nbComments = $project->getNbComments(); |
| 299 | - dol_setcache($cachekey, $nbComments, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 299 | + dol_setcache($cachekey, $nbComments, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 300 | 300 | } |
| 301 | 301 | $head[$h][0] = DOL_URL_ROOT.'/projet/comment.php?id='.$project->id; |
| 302 | 302 | $head[$h][1] = $langs->trans("CommentLink"); |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | $head[$h][2] = 'attributes_task'; |
| 515 | 515 | $h++; |
| 516 | 516 | |
| 517 | - if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) { |
|
| 517 | + if (!empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) { |
|
| 518 | 518 | $langs->load("members"); |
| 519 | 519 | |
| 520 | 520 | $head[$h][0] = DOL_URL_ROOT.'/projet/admin/website.php'; |
@@ -867,9 +867,9 @@ discard block |
||
| 867 | 867 | print $c->getNomUrl(-2).' '; |
| 868 | 868 | } else { |
| 869 | 869 | if (get_class($c) == 'User') { |
| 870 | - print $c->getNomUrl(2, '', 0, 0, 24, 1);//.' '; |
|
| 870 | + print $c->getNomUrl(2, '', 0, 0, 24, 1); //.' '; |
|
| 871 | 871 | } else { |
| 872 | - print $c->getNomUrl(2);//.' '; |
|
| 872 | + print $c->getNomUrl(2); //.' '; |
|
| 873 | 873 | } |
| 874 | 874 | } |
| 875 | 875 | } |
@@ -1309,7 +1309,7 @@ discard block |
||
| 1309 | 1309 | |
| 1310 | 1310 | $restrictBefore = null; |
| 1311 | 1311 | |
| 1312 | - if (! empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { |
|
| 1312 | + if (!empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { |
|
| 1313 | 1313 | require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
| 1314 | 1314 | $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); |
| 1315 | 1315 | } |
@@ -1713,7 +1713,7 @@ discard block |
||
| 1713 | 1713 | |
| 1714 | 1714 | $restrictBefore = null; |
| 1715 | 1715 | |
| 1716 | - if (! empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { |
|
| 1716 | + if (!empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { |
|
| 1717 | 1717 | require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
| 1718 | 1718 | $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); |
| 1719 | 1719 | } |
@@ -1998,7 +1998,7 @@ discard block |
||
| 1998 | 1998 | |
| 1999 | 1999 | $disabledtaskday = $disabledtask; |
| 2000 | 2000 | |
| 2001 | - if (! $disabledtask && $restrictBefore && $tmpday < $restrictBefore) { |
|
| 2001 | + if (!$disabledtask && $restrictBefore && $tmpday < $restrictBefore) { |
|
| 2002 | 2002 | $disabledtaskday = 1; |
| 2003 | 2003 | } |
| 2004 | 2004 | |
@@ -2106,7 +2106,7 @@ discard block |
||
| 2106 | 2106 | |
| 2107 | 2107 | $restrictBefore = null; |
| 2108 | 2108 | |
| 2109 | - if (! empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { |
|
| 2109 | + if (!empty($conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS)) { |
|
| 2110 | 2110 | require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
| 2111 | 2111 | $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); |
| 2112 | 2112 | } |
@@ -2280,7 +2280,7 @@ discard block |
||
| 2280 | 2280 | $disabledtaskweek = $disabledtask; |
| 2281 | 2281 | $firstdayofweek = dol_mktime(0, 0, 0, $month, $TFirstDay[$weekIndex], $year); |
| 2282 | 2282 | |
| 2283 | - if (! $disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) { |
|
| 2283 | + if (!$disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) { |
|
| 2284 | 2284 | $disabledtaskweek = 1; |
| 2285 | 2285 | } |
| 2286 | 2286 | |
@@ -695,9 +695,9 @@ discard block |
||
| 695 | 695 | } |
| 696 | 696 | |
| 697 | 697 | print ajax_combobox('select'.$htmlname); |
| 698 | - } elseif ($htmlname!='') { |
|
| 699 | - $groupticket=GETPOST($htmlname, 'aZ09'); |
|
| 700 | - $child_id=GETPOST($htmlname.'_child_id', 'aZ09')?GETPOST($htmlname.'_child_id', 'aZ09'):0; |
|
| 698 | + } elseif ($htmlname != '') { |
|
| 699 | + $groupticket = GETPOST($htmlname, 'aZ09'); |
|
| 700 | + $child_id = GETPOST($htmlname.'_child_id', 'aZ09') ?GETPOST($htmlname.'_child_id', 'aZ09') : 0; |
|
| 701 | 701 | $arraycodenotparent[] = ""; |
| 702 | 702 | $arrayidused = array(); |
| 703 | 703 | $stringtoprint = '<span class="supportemailfield bold">'.$langs->trans("GroupOfTicket").'</span> '; |
@@ -733,7 +733,7 @@ discard block |
||
| 733 | 733 | $grouplabel = $label; |
| 734 | 734 | |
| 735 | 735 | $isparent = $obj->isparent; |
| 736 | - $iselected = $groupticket == $obj->code ?'selected':''; |
|
| 736 | + $iselected = $groupticket == $obj->code ? 'selected' : ''; |
|
| 737 | 737 | $stringtoprint .= '<option '.$iselected.' class="'.$htmlname.dol_escape_htmltag($grouprowid).'" value="'.dol_escape_htmltag($groupvalue).'" data-html="'.dol_escape_htmltag($grouplabel).'">'.dol_escape_htmltag($grouplabel).'</option>'; |
| 738 | 738 | if ($isparent == 'NOTPARENT') { |
| 739 | 739 | $arraycodenotparent[] = $groupvalue; |
@@ -782,7 +782,7 @@ discard block |
||
| 782 | 782 | if ($resql) { |
| 783 | 783 | $num_rows = $this->db->num_rows($resql); |
| 784 | 784 | $i = 0; |
| 785 | - $arrayidused=array(); |
|
| 785 | + $arrayidused = array(); |
|
| 786 | 786 | while ($i < $num_rows) { |
| 787 | 787 | $obj = $this->db->fetch_object($resql); |
| 788 | 788 | if ($obj) { |
@@ -803,10 +803,10 @@ discard block |
||
| 803 | 803 | if ($isparent == 'NOTPARENT') { |
| 804 | 804 | $arraycodenotparent[] = $groupvalue; |
| 805 | 805 | } |
| 806 | - $iselected = $groupticket == $obj->code ?'selected':''; |
|
| 806 | + $iselected = $groupticket == $obj->code ? 'selected' : ''; |
|
| 807 | 807 | $stringtoprint .= '<option '.$iselected.' class="'.$htmlname.'_'.dol_escape_htmltag($fatherid).'_child_'.$levelid.'" value="'.dol_escape_htmltag($groupvalue).'" data-html="'.dol_escape_htmltag($grouplabel).'">'.dol_escape_htmltag($grouplabel).'</option>'; |
| 808 | 808 | if (empty($tabscript[$groupcodefather])) { |
| 809 | - $tabscript[$groupcodefather] = 'if ($("#'.$htmlname.($levelid > 1 ?'_child_'.$levelid-1:'').'")[0].value == "'.dol_escape_js($groupcodefather).'"){ |
|
| 809 | + $tabscript[$groupcodefather] = 'if ($("#'.$htmlname.($levelid > 1 ? '_child_'.$levelid - 1 : '').'")[0].value == "'.dol_escape_js($groupcodefather).'"){ |
|
| 810 | 810 | $(".'.$htmlname.'_'.dol_escape_htmltag($fatherid).'_child_'.$levelid.'").show() |
| 811 | 811 | console.log("We show childs tickets of '.$groupcodefather.' group ticket") |
| 812 | 812 | }else{ |
@@ -820,11 +820,11 @@ discard block |
||
| 820 | 820 | } else { |
| 821 | 821 | dol_print_error($this->db); |
| 822 | 822 | } |
| 823 | - $stringtoprint .='</select>'; |
|
| 823 | + $stringtoprint .= '</select>'; |
|
| 824 | 824 | |
| 825 | - $stringtoprint .='<script>'; |
|
| 826 | - $stringtoprint .='arraynotparents = '.json_encode($arraycodenotparent).';'; |
|
| 827 | - $stringtoprint .='if (arraynotparents.includes($("#'.$htmlname.($levelid > 1 ?'_child_'.$levelid-1:'').'")[0].value)){ |
|
| 825 | + $stringtoprint .= '<script>'; |
|
| 826 | + $stringtoprint .= 'arraynotparents = '.json_encode($arraycodenotparent).';'; |
|
| 827 | + $stringtoprint .= 'if (arraynotparents.includes($("#'.$htmlname.($levelid > 1 ? '_child_'.$levelid - 1 : '').'")[0].value)){ |
|
| 828 | 828 | console.log("'.$htmlname.'_child_'.$levelid.'") |
| 829 | 829 | if($("#'.$htmlname.'_child_'.$levelid.'")[0].value == "" && ($("#'.$htmlname.'_child_'.$levelid.'").attr("child_id")>'.$child_id.')){ |
| 830 | 830 | $("#'.$htmlname.'_child_'.$levelid.'").hide(); |
@@ -844,8 +844,8 @@ discard block |
||
| 844 | 844 | console.log("We choose '.$htmlname.' input and reload hidden input"); |
| 845 | 845 | } |
| 846 | 846 | } |
| 847 | - $("#'.$htmlname.($levelid > 1 ?'_child_'.$levelid-1:'').'").change(function() { |
|
| 848 | - child_id = $("#'.$htmlname.($levelid > 1 ?'_child_'.$levelid:'').'").attr("child_id"); |
|
| 847 | + $("#'.$htmlname.($levelid > 1 ? '_child_'.$levelid - 1 : '').'").change(function() { |
|
| 848 | + child_id = $("#'.$htmlname.($levelid > 1 ? '_child_'.$levelid : '').'").attr("child_id"); |
|
| 849 | 849 | |
| 850 | 850 | /* Change of value to select this value*/ |
| 851 | 851 | if (arraynotparents.includes(this.value) || $(this).attr("child_id") == '.$use_multilevel.') { |
@@ -880,16 +880,16 @@ discard block |
||
| 880 | 880 | foreach ($tabscript as $script) { |
| 881 | 881 | $stringtoprint .= $script; |
| 882 | 882 | }; |
| 883 | - $stringtoprint .='})'; |
|
| 884 | - $stringtoprint .='</script>'; |
|
| 883 | + $stringtoprint .= '})'; |
|
| 884 | + $stringtoprint .= '</script>'; |
|
| 885 | 885 | } |
| 886 | - $stringtoprint .='<script>'; |
|
| 887 | - $stringtoprint .='$("#'.$htmlname.'_child_'.$use_multilevel.'").change(function() { |
|
| 886 | + $stringtoprint .= '<script>'; |
|
| 887 | + $stringtoprint .= '$("#'.$htmlname.'_child_'.$use_multilevel.'").change(function() { |
|
| 888 | 888 | $("#ticketcategory_select")[0].value = this.value; |
| 889 | 889 | $("#ticketcategory_select_child_id")[0].value = $(this).attr("child_id"); |
| 890 | 890 | console.log($("#ticketcategory_select")[0].value); |
| 891 | 891 | })'; |
| 892 | - $stringtoprint .='</script>'; |
|
| 892 | + $stringtoprint .= '</script>'; |
|
| 893 | 893 | $stringtoprint .= ajax_combobox($htmlname); |
| 894 | 894 | |
| 895 | 895 | return $stringtoprint; |
@@ -1010,7 +1010,7 @@ |
||
| 1010 | 1010 | { |
| 1011 | 1011 | global $conf, $langs; |
| 1012 | 1012 | if (!empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->fournisseur->enabled)) { |
| 1013 | - return '' ; |
|
| 1013 | + return ''; |
|
| 1014 | 1014 | } |
| 1015 | 1015 | |
| 1016 | 1016 | $out = '<select class="flat '.$morecss.'" name="'.$htmlname.'" id="'.$htmlidname.'">'; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $withproject = GETPOST('withproject', 'int'); |
| 61 | 61 | $fk_project = GETPOST('fk_project', 'int') ? GETPOST('fk_project', 'int') : GETPOST('projectid', 'int'); |
| 62 | 62 | |
| 63 | -$withProjectUrl=''; |
|
| 63 | +$withProjectUrl = ''; |
|
| 64 | 64 | |
| 65 | 65 | // Load variable for pagination |
| 66 | 66 | $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | // Default sort order (if not yet defined by previous GETPOST) |
| 91 | 91 | if (!$sortfield) { |
| 92 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 92 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 93 | 93 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
| 94 | 94 | } |
| 95 | 95 | if (!$sortorder) { |
@@ -162,14 +162,14 @@ discard block |
||
| 162 | 162 | if (preg_match('/^set/', $action) && $projectid > 0 && !empty($user->rights->eventorganization->write)) { |
| 163 | 163 | $project = new Project($db); |
| 164 | 164 | //If "set" fields keys is in projects fields |
| 165 | - $project_attr=preg_replace('/^set/', '', $action); |
|
| 165 | + $project_attr = preg_replace('/^set/', '', $action); |
|
| 166 | 166 | if (array_key_exists($project_attr, $project->fields)) { |
| 167 | 167 | $result = $project->fetch($projectid); |
| 168 | 168 | if ($result < 0) { |
| 169 | 169 | setEventMessages(null, $project->errors, 'errors'); |
| 170 | 170 | } else { |
| 171 | - $project->{$project_attr}=GETPOST($project_attr); |
|
| 172 | - $result=$project->update($user); |
|
| 171 | + $project->{$project_attr} = GETPOST($project_attr); |
|
| 172 | + $result = $project->update($user); |
|
| 173 | 173 | if ($result < 0) { |
| 174 | 174 | setEventMessages(null, $project->errors, 'errors'); |
| 175 | 175 | } |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | $sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'"; |
| 314 | 314 | } |
| 315 | 315 | if (preg_match('/_dtend$/', $key)) { |
| 316 | - $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; |
|
| 316 | + $sql .= " AND t.".$columnName." <= '".$db->idate($search[$key])."'"; |
|
| 317 | 317 | } |
| 318 | 318 | } |
| 319 | 319 | } |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | $projectstatic->fetch_thirdparty(); |
| 385 | 385 | } |
| 386 | 386 | |
| 387 | - $withProjectUrl=''; |
|
| 387 | + $withProjectUrl = ''; |
|
| 388 | 388 | $object->project = clone $projectstatic; |
| 389 | 389 | |
| 390 | 390 | if (!empty($withproject)) { |
@@ -617,12 +617,12 @@ discard block |
||
| 617 | 617 | print '<div class="fichecenter">'; |
| 618 | 618 | print '<div class="fichehalfleft">'; |
| 619 | 619 | print '<div class="underbanner clearboth"></div>'; |
| 620 | - print '<table class="border centpercent tableforfield">' . "\n"; |
|
| 620 | + print '<table class="border centpercent tableforfield">'."\n"; |
|
| 621 | 621 | |
| 622 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; |
|
| 622 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; |
|
| 623 | 623 | |
| 624 | 624 | // Other attributes. Fields from hook formObjectOptions and Extrafields. |
| 625 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 625 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 626 | 626 | $object = $object_evt; |
| 627 | 627 | print '</table>'; |
| 628 | 628 | print '</div>'; |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | } |
| 685 | 685 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |
| 686 | 686 | |
| 687 | -print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].(!empty($conf_or_booth_id)?'?conforboothid='.$conf_or_booth_id:'').'">'."\n"; |
|
| 687 | +print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].(!empty($conf_or_booth_id) ? '?conforboothid='.$conf_or_booth_id : '').'">'."\n"; |
|
| 688 | 688 | if ($optioncss != '') { |
| 689 | 689 | print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
| 690 | 690 | } |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
| 696 | 696 | print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; |
| 697 | 697 | |
| 698 | -$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.(empty($confOrBooth->id) ? '' : '&conforboothid='.$confOrBooth->id).$withProjectUrl), '', $permissiontoadd); |
|
| 698 | +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id) ? '&conforboothid='.$confOrBooth->id : '').(!empty($projectstatic->id) ? '&fk_project='.$projectstatic->id : '').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.(empty($confOrBooth->id) ? '' : '&conforboothid='.$confOrBooth->id).$withProjectUrl), '', $permissiontoadd); |
|
| 699 | 699 | |
| 700 | 700 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); |
| 701 | 701 | |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; |
| 759 | 759 | if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { |
| 760 | 760 | print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); |
| 761 | - } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) { |
|
| 761 | + } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { |
|
| 762 | 762 | print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1); |
| 763 | 763 | } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
| 764 | 764 | print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; |
@@ -867,9 +867,9 @@ discard block |
||
| 867 | 867 | if ($key == 'status') { |
| 868 | 868 | print $object->getLibStatut(5); |
| 869 | 869 | } elseif ($key == 'ref') { |
| 870 | - $optionLink = (!empty($withproject)?'conforboothidproject':'conforboothid'); |
|
| 870 | + $optionLink = (!empty($withproject) ? 'conforboothidproject' : 'conforboothid'); |
|
| 871 | 871 | if (empty($confOrBooth->id)) { |
| 872 | - $optionLink='projectid'; |
|
| 872 | + $optionLink = 'projectid'; |
|
| 873 | 873 | } |
| 874 | 874 | print $object->getNomUrl(1, $optionLink); |
| 875 | 875 | } else { |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | // Default sort order (if not yet defined by previous GETPOST) |
| 84 | 84 | if (!$sortfield) { |
| 85 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 85 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 86 | 86 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
| 87 | 87 | } |
| 88 | 88 | if (!$sortorder) { |
@@ -155,14 +155,14 @@ discard block |
||
| 155 | 155 | if (preg_match('/^set/', $action) && $projectid > 0 && !empty($user->rights->eventorganization->write)) { |
| 156 | 156 | $project = new Project($db); |
| 157 | 157 | //If "set" fields keys is in projects fields |
| 158 | - $project_attr=preg_replace('/^set/', '', $action); |
|
| 158 | + $project_attr = preg_replace('/^set/', '', $action); |
|
| 159 | 159 | if (array_key_exists($project_attr, $project->fields)) { |
| 160 | 160 | $result = $project->fetch($projectid); |
| 161 | 161 | if ($result < 0) { |
| 162 | 162 | setEventMessages(null, $project->errors, 'errors'); |
| 163 | 163 | } else { |
| 164 | - $project->{$project_attr}=GETPOST($project_attr); |
|
| 165 | - $result=$project->update($user); |
|
| 164 | + $project->{$project_attr} = GETPOST($project_attr); |
|
| 165 | + $result = $project->update($user); |
|
| 166 | 166 | if ($result < 0) { |
| 167 | 167 | setEventMessages(null, $project->errors, 'errors'); |
| 168 | 168 | } |
@@ -250,9 +250,9 @@ discard block |
||
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; |
| 253 | - $title = $langs->trans("Project") . ' - ' . $langs->trans("ListOfConferencesOrBooths") . ' - ' . $project->ref . ' ' . $project->name; |
|
| 253 | + $title = $langs->trans("Project").' - '.$langs->trans("ListOfConferencesOrBooths").' - '.$project->ref.' '.$project->name; |
|
| 254 | 254 | if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $project->name) { |
| 255 | - $title = $project->ref . ' ' . $project->name . ' - ' . $langs->trans("ListOfConferencesOrBooths"); |
|
| 255 | + $title = $project->ref.' '.$project->name.' - '.$langs->trans("ListOfConferencesOrBooths"); |
|
| 256 | 256 | } |
| 257 | 257 | } |
| 258 | 258 | |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | $sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'"; |
| 532 | 532 | } |
| 533 | 533 | if (preg_match('/_dtend$/', $key)) { |
| 534 | - $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; |
|
| 534 | + $sql .= " AND t.".$columnName." <= '".$db->idate($search[$key])."'"; |
|
| 535 | 535 | } |
| 536 | 536 | } |
| 537 | 537 | } |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | } |
| 631 | 631 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |
| 632 | 632 | |
| 633 | -print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].(!empty($projectid)?'?projectid='.$projectid:'').'">'."\n"; |
|
| 633 | +print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].(!empty($projectid) ? '?projectid='.$projectid : '').'">'."\n"; |
|
| 634 | 634 | if ($optioncss != '') { |
| 635 | 635 | print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
| 636 | 636 | } |
@@ -643,7 +643,7 @@ discard block |
||
| 643 | 643 | |
| 644 | 644 | $title = $langs->trans("ListOfConferencesOrBooths"); |
| 645 | 645 | |
| 646 | -$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.php?action=create'.(!empty($project->id)?'&withproject=1&fk_project='.$project->id:'').(!empty($project->socid)?'&fk_soc='.$project->socid:'').'&backtopage='.urlencode($_SERVER['PHP_SELF']).(!empty($project->id)?'?projectid='.$project->id:''), '', $permissiontoadd); |
|
| 646 | +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.php?action=create'.(!empty($project->id) ? '&withproject=1&fk_project='.$project->id : '').(!empty($project->socid) ? '&fk_soc='.$project->socid : '').'&backtopage='.urlencode($_SERVER['PHP_SELF']).(!empty($project->id) ? '?projectid='.$project->id : ''), '', $permissiontoadd); |
|
| 647 | 647 | |
| 648 | 648 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); |
| 649 | 649 | |
@@ -708,7 +708,7 @@ discard block |
||
| 708 | 708 | print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; |
| 709 | 709 | if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { |
| 710 | 710 | print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); |
| 711 | - } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) { |
|
| 711 | + } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { |
|
| 712 | 712 | print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1); |
| 713 | 713 | } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
| 714 | 714 | print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; |
@@ -817,7 +817,7 @@ discard block |
||
| 817 | 817 | if ($key == 'status') { |
| 818 | 818 | print $object->getLibStatut(5); |
| 819 | 819 | } elseif ($key == 'ref') { |
| 820 | - print $object->getNomUrl(1, 0, '', (($projectid > 0)?'withproject':'')); |
|
| 820 | + print $object->getNomUrl(1, 0, '', (($projectid > 0) ? 'withproject' : '')); |
|
| 821 | 821 | } else { |
| 822 | 822 | print $object->showOutputField($val, $key, $object->$key, ''); |
| 823 | 823 | } |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $help_url = ''; |
| 187 | 187 | llxHeader('', $title, $help_url); |
| 188 | 188 | |
| 189 | -$result = $projectstatic->fetch(empty($confOrBooth->fk_project)?$fk_project:$confOrBooth->fk_project); |
|
| 189 | +$result = $projectstatic->fetch(empty($confOrBooth->fk_project) ? $fk_project : $confOrBooth->fk_project); |
|
| 190 | 190 | if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { |
| 191 | 191 | $projectstatic->fetchComments(); |
| 192 | 192 | } |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $projectstatic->fetch_thirdparty(); |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | -$withProjectUrl=''; |
|
| 197 | +$withProjectUrl = ''; |
|
| 198 | 198 | $object->project = clone $projectstatic; |
| 199 | 199 | |
| 200 | 200 | if (!empty($withproject)) { |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | if ($action == 'create') { |
| 411 | 411 | print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ConferenceOrBoothAttendee")), '', 'object_'.$object->picto); |
| 412 | 412 | |
| 413 | - print '<form method="POST" action="'.$_SERVER["PHP_SELF"].(!empty($withProjectUrl)?'?'.$withProjectUrl:'').'">'; |
|
| 413 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].(!empty($withProjectUrl) ? '?'.$withProjectUrl : '').'">'; |
|
| 414 | 414 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 415 | 415 | |
| 416 | 416 | if ($confOrBooth->id > 0) { |
@@ -638,9 +638,9 @@ discard block |
||
| 638 | 638 | if (empty($reshook)) { |
| 639 | 639 | // Send |
| 640 | 640 | if (empty($user->socid)) { |
| 641 | - print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=presend&mode=init#formmailbeforetitle'); |
|
| 641 | + print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id) ? '&conforboothid='.$confOrBooth->id : '').(!empty($projectstatic->id) ? '&fk_project='.$projectstatic->id : '').'&action=presend&mode=init#formmailbeforetitle'); |
|
| 642 | 642 | } |
| 643 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=edit', '', $permissiontoadd); |
|
| 643 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id) ? '&conforboothid='.$confOrBooth->id : '').(!empty($projectstatic->id) ? '&fk_project='.$projectstatic->id : '').'&action=edit', '', $permissiontoadd); |
|
| 644 | 644 | |
| 645 | 645 | // Clone |
| 646 | 646 | print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=scrumsprint', '', $permissiontoadd); |