@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | //} |
796 | 796 | |
797 | 797 | $linkstart = '<a href="'.$url.'"'; |
798 | - $linkstart .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
798 | + $linkstart .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
799 | 799 | $linkstart .= $dataparams.' class="'.$classfortooltip.'">'; |
800 | 800 | $linkend = '</a>'; |
801 | 801 | |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | $result .= $linkstart.$this->ref.$linkend; |
809 | 809 | |
810 | 810 | global $action; |
811 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
811 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
812 | 812 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
813 | 813 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
814 | 814 | if ($reshook > 0) { |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | $line->label = $obj->custom_label; |
854 | 854 | $line->description = $obj->description; |
855 | 855 | $line->fk_product = $obj->fk_product; |
856 | - $line->qty_asked = $obj->qty_asked; |
|
856 | + $line->qty_asked = $obj->qty_asked; |
|
857 | 857 | $line->qty_shipped = $obj->qty_shipped; |
858 | 858 | |
859 | 859 | $line->product_label = $obj->product_label; // Product label |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | if ($user->socid > 0) { |
103 | 103 | accessforbidden(); |
104 | 104 | } |
105 | -$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0); |
|
105 | +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); |
|
106 | 106 | $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'id', $isdraft); |
107 | 107 | |
108 | 108 | if (!$permissiontoread) { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $projectstatic->fetch_thirdparty(); |
142 | 142 | } |
143 | 143 | |
144 | -$withProjectUrl=''; |
|
144 | +$withProjectUrl = ''; |
|
145 | 145 | $object->project = clone $projectstatic; |
146 | 146 | |
147 | 147 | if (!empty($withproject)) { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | if ($user->socid > 0) { |
98 | 98 | accessforbidden(); |
99 | 99 | } |
100 | -$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0); |
|
100 | +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); |
|
101 | 101 | $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'id', $isdraft); |
102 | 102 | |
103 | 103 | if (!$permissiontoread) { |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $projectstatic->fetch_thirdparty(); |
187 | 187 | } |
188 | 188 | |
189 | -$withProjectUrl=''; |
|
189 | +$withProjectUrl = ''; |
|
190 | 190 | $object->project = clone $projectstatic; |
191 | 191 | |
192 | 192 | if (!empty($withproject)) { |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field |
572 | 572 | //unset($object->fields['fk_project']); // Hide field already shown in banner |
573 | 573 | //unset($object->fields['fk_soc']); // Hide field already shown in banner |
574 | - $keyforbreak='num_vote'; |
|
574 | + $keyforbreak = 'num_vote'; |
|
575 | 575 | |
576 | 576 | include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; |
577 | 577 | |
@@ -643,12 +643,12 @@ discard block |
||
643 | 643 | |
644 | 644 | $object->fetchObjectLinked(); |
645 | 645 | |
646 | - if (is_array($object->linkedObjects) && count($object->linkedObjects)>0 && array_key_exists("facture", $object->linkedObjects)) { |
|
646 | + if (is_array($object->linkedObjects) && count($object->linkedObjects) > 0 && array_key_exists("facture", $object->linkedObjects)) { |
|
647 | 647 | foreach ($object->linkedObjects["facture"] as $fac) { |
648 | 648 | if (empty($fac->paye)) { |
649 | 649 | $key = 'paymentlink_'.$fac->id; |
650 | 650 | |
651 | - print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')) . ' '. $fac->ref.'</span><br>'; |
|
651 | + print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')).' '.$fac->ref.'</span><br>'; |
|
652 | 652 | |
653 | 653 | $sourcetouse = 'boothlocation'; |
654 | 654 | $reftouse = $fac->id; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothattendeecard'; // To manage different context of search |
48 | 48 | $backtopage = GETPOST('backtopage', 'alpha'); |
49 | 49 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
50 | -$lineid = GETPOST('lineid', 'int'); |
|
50 | +$lineid = GETPOST('lineid', 'int'); |
|
51 | 51 | $mode = GETPOST('mode', 'alpha'); |
52 | 52 | |
53 | 53 | $conf_or_booth_id = GETPOST('conforboothid', 'int'); |
@@ -606,15 +606,15 @@ discard block |
||
606 | 606 | if (empty($reshook)) { |
607 | 607 | // Send |
608 | 608 | if (empty($user->socid)) { |
609 | - 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&token='.newToken().'&mode=init#formmailbeforetitle'); |
|
609 | + 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&token='.newToken().'&mode=init#formmailbeforetitle'); |
|
610 | 610 | } |
611 | - 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&token='.newToken(), '', $permissiontoadd); |
|
611 | + 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&token='.newToken(), '', $permissiontoadd); |
|
612 | 612 | |
613 | 613 | // Clone |
614 | - print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontoadd); |
|
614 | + print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&token='.newToken().(!empty($projectstatic->id) ? '&fk_project='.$projectstatic->id : ''), '', $permissiontoadd); |
|
615 | 615 | |
616 | 616 | // Delete (need delete permission, or if draft, just need create/modify permission) |
617 | - print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); |
|
617 | + print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken().(!empty($projectstatic->id) ? '&fk_project='.$projectstatic->id : ''), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); |
|
618 | 618 | } |
619 | 619 | print '</div>'."\n"; |
620 | 620 | } |
@@ -412,8 +412,11 @@ |
||
412 | 412 | $resql = $db->query($sql); |
413 | 413 | if ($resql) { |
414 | 414 | while ($obj = $db->fetch_object($resql)) { |
415 | - if ($obj->source == 'internal') $listofprojectcontacttype[$obj->rowid] = $obj->code; |
|
416 | - else $listofprojectcontacttypeexternal[$obj->rowid] = $obj->code; |
|
415 | + if ($obj->source == 'internal') { |
|
416 | + $listofprojectcontacttype[$obj->rowid] = $obj->code; |
|
417 | + } else { |
|
418 | + $listofprojectcontacttypeexternal[$obj->rowid] = $obj->code; |
|
419 | + } |
|
417 | 420 | } |
418 | 421 | } else { |
419 | 422 | dol_print_error($db); |
@@ -143,38 +143,38 @@ discard block |
||
143 | 143 | $search_date_start_startmonth = GETPOST('search_date_start_startmonth', 'int'); |
144 | 144 | $search_date_start_startyear = GETPOST('search_date_start_startyear', 'int'); |
145 | 145 | $search_date_start_startday = GETPOST('search_date_start_startday', 'int'); |
146 | -$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
146 | +$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
147 | 147 | $search_date_start_endmonth = GETPOST('search_date_start_endmonth', 'int'); |
148 | 148 | $search_date_start_endyear = GETPOST('search_date_start_endyear', 'int'); |
149 | 149 | $search_date_start_endday = GETPOST('search_date_start_endday', 'int'); |
150 | -$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
150 | +$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
151 | 151 | |
152 | 152 | $search_date_end_startmonth = GETPOST('search_date_end_startmonth', 'int'); |
153 | 153 | $search_date_end_startyear = GETPOST('search_date_end_startyear', 'int'); |
154 | 154 | $search_date_end_startday = GETPOST('search_date_end_startday', 'int'); |
155 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
155 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
156 | 156 | $search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int'); |
157 | 157 | $search_date_end_endyear = GETPOST('search_date_end_endyear', 'int'); |
158 | 158 | $search_date_end_endday = GETPOST('search_date_end_endday', 'int'); |
159 | -$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
159 | +$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
160 | 160 | |
161 | 161 | $search_date_creation_startmonth = GETPOST('search_date_creation_startmonth', 'int'); |
162 | 162 | $search_date_creation_startyear = GETPOST('search_date_creation_startyear', 'int'); |
163 | 163 | $search_date_creation_startday = GETPOST('search_date_creation_startday', 'int'); |
164 | -$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
164 | +$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
165 | 165 | $search_date_creation_endmonth = GETPOST('search_date_creation_endmonth', 'int'); |
166 | 166 | $search_date_creation_endyear = GETPOST('search_date_creation_endyear', 'int'); |
167 | 167 | $search_date_creation_endday = GETPOST('search_date_creation_endday', 'int'); |
168 | -$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
168 | +$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
169 | 169 | |
170 | 170 | $search_date_modif_startmonth = GETPOST('search_date_modif_startmonth', 'int'); |
171 | 171 | $search_date_modif_startyear = GETPOST('search_date_modif_startyear', 'int'); |
172 | 172 | $search_date_modif_startday = GETPOST('search_date_modif_startday', 'int'); |
173 | -$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
173 | +$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
174 | 174 | $search_date_modif_endmonth = GETPOST('search_date_modif_endmonth', 'int'); |
175 | 175 | $search_date_modif_endyear = GETPOST('search_date_modif_endyear', 'int'); |
176 | 176 | $search_date_modif_endday = GETPOST('search_date_modif_endday', 'int'); |
177 | -$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
177 | +$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
178 | 178 | |
179 | 179 | $search_category_array = array(); |
180 | 180 | |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | $sqlfields = $sql; // $sql fields to remove for count total |
493 | 493 | |
494 | 494 | $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as p"; |
495 | -if (!empty($extrafields->attributes[$object->table_element]['label']) &&is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
|
495 | +if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
|
496 | 496 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)"; |
497 | 497 | } |
498 | 498 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | if ($searchCategoryProjectOperator == 0) { |
677 | 677 | $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie = ".((int) $searchCategoryProject).")"; |
678 | 678 | } else { |
679 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); |
|
679 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProject); |
|
680 | 680 | } |
681 | 681 | } |
682 | 682 | } |
@@ -872,7 +872,7 @@ discard block |
||
872 | 872 | $param .= '&search_date_end_endday='.urlencode($search_date_end_endday); |
873 | 873 | } |
874 | 874 | if ($search_date_end_end) { |
875 | - $param .= '&search_date_end_end=' . urlencode($search_date_end_end); |
|
875 | + $param .= '&search_date_end_end='.urlencode($search_date_end_end); |
|
876 | 876 | } |
877 | 877 | if ($search_date_creation_startmonth) { |
878 | 878 | $param .= '&search_date_creation_startmonth='.urlencode($search_date_creation_startmonth); |
@@ -920,7 +920,7 @@ discard block |
||
920 | 920 | $param .= '&search_date_modif_endday='.urlencode($search_date_modif_endday); |
921 | 921 | } |
922 | 922 | if ($search_date_modif_end) { |
923 | - $param .= '&search_date_modif_end=' . urlencode($search_date_modif_end); |
|
923 | + $param .= '&search_date_modif_end='.urlencode($search_date_modif_end); |
|
924 | 924 | } |
925 | 925 | if ($socid) { |
926 | 926 | $param .= '&socid='.urlencode($socid); |
@@ -1133,7 +1133,7 @@ discard block |
||
1133 | 1133 | $categoriesArr[-2] = '- '.$langs->trans('NotCategorized').' -'; |
1134 | 1134 | $moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300im minwidth300 widthcentpercentminusx', 0, 0, '', 'category', $tmptitle); |
1135 | 1135 | $moreforfilter .= ' <input type="checkbox" class="valignmiddle" id="search_category_customer_operator" name="search_category_customer_operator" value="1"'.($searchCategoryCustomerOperator == 1 ? ' checked="checked"' : '').'/>'; |
1136 | - $moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories') . ' : ' . $tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click |
|
1136 | + $moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories').' : '.$tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click |
|
1137 | 1137 | $moreforfilter .= '</div>'; |
1138 | 1138 | } |
1139 | 1139 | |
@@ -1656,7 +1656,7 @@ discard block |
||
1656 | 1656 | // Project url |
1657 | 1657 | if (!empty($arrayfields['p.ref']['checked'])) { |
1658 | 1658 | print '<td class="nowraponall tdoverflowmax200">'; |
1659 | - print $object->getNomUrl(1, (!empty(GETPOST('search_usage_event_organization', 'int'))?'eventorganization':'')); |
|
1659 | + print $object->getNomUrl(1, (!empty(GETPOST('search_usage_event_organization', 'int')) ? 'eventorganization' : '')); |
|
1660 | 1660 | if ($object->hasDelay()) { |
1661 | 1661 | print img_warning($langs->trans('Late')); |
1662 | 1662 | } |
@@ -187,7 +187,9 @@ |
||
187 | 187 | $permissiontocreate = $user->hasRight('projet', 'creer'); |
188 | 188 | $permissiontodelete = $user->hasRight('projet', 'supprimer'); |
189 | 189 | |
190 | -if (!$permissiontoread) accessforbidden(); |
|
190 | +if (!$permissiontoread) { |
|
191 | + accessforbidden(); |
|
192 | +} |
|
191 | 193 | |
192 | 194 | |
193 | 195 | /* |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $search_date_endday = GETPOST('search_date_endday', 'int'); |
93 | 93 | $search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
94 | 94 | $search_date_endyear = GETPOST('search_date_endyear', 'int'); |
95 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
95 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
96 | 96 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
97 | 97 | $search_datelimit_startday = GETPOST('search_datelimit_startday', 'int'); |
98 | 98 | $search_datelimit_startmonth = GETPOST('search_datelimit_startmonth', 'int'); |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | if ($searchCategoryProjectOperator == 0) { |
468 | 468 | $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie = ".((int) $searchCategoryProject).")"; |
469 | 469 | } else { |
470 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); |
|
470 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProject); |
|
471 | 471 | } |
472 | 472 | } |
473 | 473 | } |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | // Direct jump if only one record found |
587 | 587 | if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all) { |
588 | 588 | $obj = $db->fetch_object($resql); |
589 | - $id = $obj->id; // in select, task id has been aliases into 'id' |
|
589 | + $id = $obj->id; // in select, task id has been aliases into 'id' |
|
590 | 590 | header("Location: ".DOL_URL_ROOT.'/projet/tasks/task.php?id='.$id.'&withproject=1'); |
591 | 591 | exit; |
592 | 592 | } |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | // Output page |
596 | 596 | // -------------------------------------------------------------------- |
597 | 597 | |
598 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
598 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
599 | 599 | |
600 | 600 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
601 | 601 | |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | if ($search_date_endyear) { |
628 | 628 | $param .= '&search_date_endyear='.urlencode($search_date_endyear); |
629 | 629 | } |
630 | -if ($search_datelimit_startday) { |
|
630 | +if ($search_datelimit_startday) { |
|
631 | 631 | $param .= '&search_datelimit_startday='.urlencode($search_datelimit_startday); |
632 | 632 | } |
633 | 633 | if ($search_datelimit_startmonth) { |
@@ -816,7 +816,7 @@ discard block |
||
816 | 816 | $categoriesArr[-2] = '- '.$langs->trans('NotCategorized').' -'; |
817 | 817 | $moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300', 0, 0, '', 'category', $tmptitle); |
818 | 818 | $moreforfilter .= ' <input type="checkbox" class="valignmiddle" id="search_category_customer_operator" name="search_category_customer_operator" value="1"'.($searchCategoryCustomerOperator == 1 ? ' checked="checked"' : '').'/>'; |
819 | - $moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories') . ' : ' . $tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click |
|
819 | + $moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories').' : '.$tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click |
|
820 | 820 | $moreforfilter .= '</div>'; |
821 | 821 | } |
822 | 822 | |
@@ -1603,7 +1603,7 @@ discard block |
||
1603 | 1603 | if (isset($totalarray['type']) && $totalarray['type'][$i] == 'duration') { |
1604 | 1604 | print (!empty($totalarray['val'][$totalarray['pos'][$i]]) ? convertSecondToTime($totalarray['val'][$totalarray['pos'][$i]], 'allhourmin') : 0); |
1605 | 1605 | } else { |
1606 | - print price(!empty($totalarray['val'][$totalarray['pos'][$i]])?$totalarray['val'][$totalarray['pos'][$i]]:0); |
|
1606 | + print price(!empty($totalarray['val'][$totalarray['pos'][$i]]) ? $totalarray['val'][$totalarray['pos'][$i]] : 0); |
|
1607 | 1607 | } |
1608 | 1608 | print '</td>'; |
1609 | 1609 | } else { |
@@ -1515,8 +1515,11 @@ |
||
1515 | 1515 | $total_ht_by_third += $total_ht_by_line; |
1516 | 1516 | $total_ttc_by_third += $total_ttc_by_line; |
1517 | 1517 | |
1518 | - if (!isset($total_time)) $total_time = $total_time_by_line; |
|
1519 | - else $total_time += $total_time_by_line; |
|
1518 | + if (!isset($total_time)) { |
|
1519 | + $total_time = $total_time_by_line; |
|
1520 | + } else { |
|
1521 | + $total_time += $total_time_by_line; |
|
1522 | + } |
|
1520 | 1523 | } |
1521 | 1524 | |
1522 | 1525 | if (canApplySubtotalOn($tablename)) { |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
223 | 223 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
224 | 224 | $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); |
225 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
225 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
226 | 226 | } else { |
227 | 227 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
228 | 228 | } |
@@ -1049,7 +1049,7 @@ discard block |
||
1049 | 1049 | if (!in_array($tablename, $array_of_element_linkable_with_different_thirdparty)) { |
1050 | 1050 | $idtofilterthirdparty = empty($object->thirdparty->id) ? 0 : $object->thirdparty->id; |
1051 | 1051 | if (getDolGlobalString('PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS')) { |
1052 | - $idtofilterthirdparty .= ',' . getDolGlobalString('PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS'); |
|
1052 | + $idtofilterthirdparty .= ','.getDolGlobalString('PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS'); |
|
1053 | 1053 | } |
1054 | 1054 | } |
1055 | 1055 |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
123 | 123 | |
124 | 124 | $action = GETPOST('action', 'aZ09'); |
125 | -$original_file = GETPOST('file', 'alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). |
|
126 | -$hashp = GETPOST('hashp', 'aZ09', 1); // Must be read only by GET |
|
127 | -$modulepart = GETPOST('modulepart', 'alpha', 1); // Must be read only by GET |
|
125 | +$original_file = GETPOST('file', 'alphanohtml'); // Do not use urldecode here ($_GET are already decoded by PHP). |
|
126 | +$hashp = GETPOST('hashp', 'aZ09', 1); // Must be read only by GET |
|
127 | +$modulepart = GETPOST('modulepart', 'alpha', 1); // Must be read only by GET |
|
128 | 128 | $urlsource = GETPOST('urlsource', 'alpha'); |
129 | 129 | $entity = (GETPOST('entity', 'int') ? GETPOST('entity', 'int') : $conf->entity); |
130 | 130 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | if (empty($dolibarr_nocache)) { |
159 | 159 | header('Cache-Control: max-age=3600, public, must-revalidate'); |
160 | 160 | header('Pragma: cache'); // This is to avoid to have Pragma: no-cache set by proxy or web server |
161 | - header('Expires: '.gmdate('D, d M Y H:i:s', time() + 3600).' GMT'); // This is to avoid to have Expires set by proxy or web server |
|
161 | + header('Expires: '.gmdate('D, d M Y H:i:s', time() + 3600).' GMT'); // This is to avoid to have Expires set by proxy or web server |
|
162 | 162 | //header('Expires: '.strtotime('+1 hour'); |
163 | 163 | } else { |
164 | 164 | header('Cache-Control: no-cache'); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | |
217 | 217 | // Security: Delete string ../ or ..\ into $original_file |
218 | -$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
218 | +$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
219 | 219 | $original_file = str_replace('../', '/', $original_file); |
220 | 220 | $original_file = str_replace('..\\', '/', $original_file); |
221 | 221 |
@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | if (!defined('NOLOGIN')) { |
30 | - define('NOLOGIN', '1'); // If this page is public (can be called outside logged session) |
|
30 | + define('NOLOGIN', '1'); // If this page is public (can be called outside logged session) |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | if (!defined('NOIPCHECK')) { |
34 | - define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
|
34 | + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | if (!defined('NOBROWSERNOTIF')) { |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | print '<br>'; |
92 | 92 | |
93 | 93 | print '<div class="ticketform">'; |
94 | -print '<a href="'.DOL_URL_ROOT.'/public/ticket/create_ticket.php?action=create'.(!empty($entity) && isModEnabled('multicompany')?'&entity='.$entity:'').'&token='.newToken().'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_create bigrounded"><span class="fa fa-15 fa-plus-circle valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("CreateTicket")).'</div></a>'; |
|
95 | -print '<a href="list.php'.(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded"><span class="fa fa-15 fa-list-alt valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("ViewMyTicketList")).'</div></a>'; |
|
96 | -print '<a href="view.php'.(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded">'.img_picto('', 'ticket', 'class="fa-15"').'<br>'.dol_escape_htmltag($langs->trans("ShowTicketWithTrackId")).'</div></a>'; |
|
94 | +print '<a href="'.DOL_URL_ROOT.'/public/ticket/create_ticket.php?action=create'.(!empty($entity) && isModEnabled('multicompany') ? '&entity='.$entity : '').'&token='.newToken().'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_create bigrounded"><span class="fa fa-15 fa-plus-circle valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("CreateTicket")).'</div></a>'; |
|
95 | +print '<a href="list.php'.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded"><span class="fa fa-15 fa-list-alt valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("ViewMyTicketList")).'</div></a>'; |
|
96 | +print '<a href="view.php'.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded">'.img_picto('', 'ticket', 'class="fa-15"').'<br>'.dol_escape_htmltag($langs->trans("ShowTicketWithTrackId")).'</div></a>'; |
|
97 | 97 | print '<div class="clearboth"></div>'; |
98 | -print '</div>'; // ends '<div class="ticketform">'; |
|
99 | -print '</div>'; // ends '<div class="ticketpublicarea ticketlargemargin centpercent">'; |
|
98 | +print '</div>'; // ends '<div class="ticketform">'; |
|
99 | +print '</div>'; // ends '<div class="ticketpublicarea ticketlargemargin centpercent">'; |
|
100 | 100 | |
101 | 101 | if (getDolGlobalInt('TICKET_SHOW_COMPANY_FOOTER')) { |
102 | 102 | // End of page |