@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | if ($action == "setlive") { |
| 162 | 162 | $liveenable = GETPOSTINT('value'); |
| 163 | - $res = dolibarr_set_const($db, "STRIPE_LIVE", (string) $liveenable, 'yesno', 0, '', $conf->entity); |
|
| 163 | + $res = dolibarr_set_const($db, "STRIPE_LIVE", (string) $liveenable, 'yesno', 0, '', $conf->entity); |
|
| 164 | 164 | if ($res > 0) { |
| 165 | 165 | setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); |
| 166 | 166 | } else { |
@@ -218,12 +218,12 @@ discard block |
||
| 218 | 218 | if (empty($conf->stripeconnect->enabled)) { |
| 219 | 219 | print '<tr class="oddeven"><td>'; |
| 220 | 220 | print '<span class="fieldrequired">'.$langs->trans("STRIPE_TEST_PUBLISHABLE_KEY").'</span></td><td>'; |
| 221 | - print '<input class="minwidth300" type="text" name="STRIPE_TEST_PUBLISHABLE_KEY" value="' . getDolGlobalString('STRIPE_TEST_PUBLISHABLE_KEY').'" placeholder="'.$langs->trans("Example").': pk_test_xxxxxxxxxxxxxxxxxxxxxxxx">'; |
|
| 221 | + print '<input class="minwidth300" type="text" name="STRIPE_TEST_PUBLISHABLE_KEY" value="'.getDolGlobalString('STRIPE_TEST_PUBLISHABLE_KEY').'" placeholder="'.$langs->trans("Example").': pk_test_xxxxxxxxxxxxxxxxxxxxxxxx">'; |
|
| 222 | 222 | print '</td><td></td></tr>'; |
| 223 | 223 | |
| 224 | 224 | print '<tr class="oddeven"><td>'; |
| 225 | 225 | print '<span class="titlefield fieldrequired">'.$langs->trans("STRIPE_TEST_SECRET_KEY").'</span></td><td>'; |
| 226 | - print '<input class="minwidth300" type="text" name="STRIPE_TEST_SECRET_KEY" value="' . getDolGlobalString('STRIPE_TEST_SECRET_KEY').'" placeholder="'.$langs->trans("Example").': sk_test_xxxxxxxxxxxxxxxxxxxxxxxx">'; |
|
| 226 | + print '<input class="minwidth300" type="text" name="STRIPE_TEST_SECRET_KEY" value="'.getDolGlobalString('STRIPE_TEST_SECRET_KEY').'" placeholder="'.$langs->trans("Example").': sk_test_xxxxxxxxxxxxxxxxxxxxxxxx">'; |
|
| 227 | 227 | print '</td><td></td></tr>'; |
| 228 | 228 | |
| 229 | 229 | print '<tr class="oddeven"><td>'; |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | |
| 536 | 536 | print '<tr class="oddeven"><td>'; |
| 537 | 537 | print $langs->trans("CSSUrlForPaymentForm").'</td><td>'; |
| 538 | -print '<input class="width500" type="text" name="ONLINE_PAYMENT_CSS_URL" value="' . getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'">'; |
|
| 538 | +print '<input class="width500" type="text" name="ONLINE_PAYMENT_CSS_URL" value="'.getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'">'; |
|
| 539 | 539 | print ' <span class="opacitymedium">'.$langs->trans("Example").': http://mysite/mycss.css</span>'; |
| 540 | 540 | print '</td></tr>'; |
| 541 | 541 | |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | print '<tr class="oddeven"><td>'; |
| 561 | 561 | print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").'</td><td>'; |
| 562 | 562 | print img_picto('', 'email', 'class="pictofixedwidth"'); |
| 563 | -print '<input class="minwidth200" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="' . getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'">'; |
|
| 563 | +print '<input class="minwidth200" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="'.getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'">'; |
|
| 564 | 564 | print ' <span class="opacitymedium">'.$langs->trans("Example").': [email protected], Payment service <[email protected]></span>'; |
| 565 | 565 | print '</td></tr>'; |
| 566 | 566 | |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | // Payment token for URL |
| 581 | 581 | print '<tr class="oddeven"><td>'; |
| 582 | 582 | print $langs->trans("SecurityToken").'</td><td>'; |
| 583 | -print '<input class="minwidth300" type="text" id="PAYMENT_SECURITY_TOKEN" name="PAYMENT_SECURITY_TOKEN" value="' . getDolGlobalString('PAYMENT_SECURITY_TOKEN').'">'; |
|
| 583 | +print '<input class="minwidth300" type="text" id="PAYMENT_SECURITY_TOKEN" name="PAYMENT_SECURITY_TOKEN" value="'.getDolGlobalString('PAYMENT_SECURITY_TOKEN').'">'; |
|
| 584 | 584 | if (!empty($conf->use_javascript_ajax)) { |
| 585 | 585 | print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); |
| 586 | 586 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $confirm = GETPOST('confirm', 'alpha'); |
| 52 | 52 | $cancel = GETPOST('cancel', 'aZ09'); |
| 53 | 53 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'projecttasklist'; |
| 54 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 54 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 55 | 55 | //$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
| 56 | 56 | //$backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
| 57 | 57 | $optioncss = GETPOST('optioncss', 'aZ'); |
@@ -94,20 +94,20 @@ discard block |
||
| 94 | 94 | $search_date_start_startmonth = GETPOSTINT('search_date_start_startmonth'); |
| 95 | 95 | $search_date_start_startyear = GETPOSTINT('search_date_start_startyear'); |
| 96 | 96 | $search_date_start_startday = GETPOSTINT('search_date_start_startday'); |
| 97 | -$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
| 97 | +$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
| 98 | 98 | $search_date_start_endmonth = GETPOSTINT('search_date_start_endmonth'); |
| 99 | 99 | $search_date_start_endyear = GETPOSTINT('search_date_start_endyear'); |
| 100 | 100 | $search_date_start_endday = GETPOSTINT('search_date_start_endday'); |
| 101 | -$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
| 101 | +$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
| 102 | 102 | |
| 103 | 103 | $search_date_end_startmonth = GETPOSTINT('search_date_end_startmonth'); |
| 104 | 104 | $search_date_end_startyear = GETPOSTINT('search_date_end_startyear'); |
| 105 | 105 | $search_date_end_startday = GETPOSTINT('search_date_end_startday'); |
| 106 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 106 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 107 | 107 | $search_date_end_endmonth = GETPOSTINT('search_date_end_endmonth'); |
| 108 | 108 | $search_date_end_endyear = GETPOSTINT('search_date_end_endyear'); |
| 109 | 109 | $search_date_end_endday = GETPOSTINT('search_date_end_endday'); |
| 110 | -$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
| 110 | +$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
| 111 | 111 | |
| 112 | 112 | //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects |
| 113 | 113 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | $progress = GETPOSTINT('progress'); |
| 151 | 151 | $budget_amount = GETPOSTFLOAT('budget_amount'); |
| 152 | -$billable = (GETPOST('billable', 'aZ') == 'yes'? 1 : 0); |
|
| 152 | +$billable = (GETPOST('billable', 'aZ') == 'yes' ? 1 : 0); |
|
| 153 | 153 | $label = GETPOST('label', 'alpha'); |
| 154 | 154 | $description = GETPOST('description', 'restricthtml'); |
| 155 | 155 | $planned_workloadhour = (GETPOSTISSET('planned_workloadhour') ? GETPOSTINT('planned_workloadhour') : ''); |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
| 188 | 188 | |
| 189 | 189 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 190 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 190 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 191 | 191 | |
| 192 | 192 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 193 | 193 | |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | $param .= '&search_date_end_endday='.urlencode((string) ($search_date_end_endday)); |
| 549 | 549 | } |
| 550 | 550 | if ($search_date_end_end) { |
| 551 | - $param .= '&search_date_end_end=' . urlencode($search_date_end_end); |
|
| 551 | + $param .= '&search_date_end_end='.urlencode($search_date_end_end); |
|
| 552 | 552 | } |
| 553 | 553 | if ($search_planedworkload) { |
| 554 | 554 | $param .= '&search_planedworkload='.urlencode($search_planedworkload); |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
| 592 | 592 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
| 593 | 593 | $tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl); |
| 594 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
| 594 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
| 595 | 595 | } else { |
| 596 | 596 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
| 597 | 597 | } |
@@ -756,8 +756,8 @@ discard block |
||
| 756 | 756 | |
| 757 | 757 | $defaultref = ''; |
| 758 | 758 | $obj = getDolGlobalString('PROJECT_TASK_ADDON', 'mod_task_simple'); |
| 759 | - if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').".php")) { |
|
| 760 | - require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').'.php'; |
|
| 759 | + if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').".php")) { |
|
| 760 | + require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').'.php'; |
|
| 761 | 761 | $modTask = new $obj(); |
| 762 | 762 | $defaultref = $modTask->getNextValue($object->thirdparty, null); |
| 763 | 763 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | $permissiontoadd = $user->hasRight('projet', 'creer'); |
| 113 | 113 | $permissiontodelete = $user->hasRight('projet', 'supprimer'); |
| 114 | -$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 114 | +$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 115 | 115 | |
| 116 | 116 | |
| 117 | 117 | /* |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $action = ''; |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 165 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 166 | 166 | |
| 167 | 167 | // Action setdraft object |
| 168 | 168 | if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) { |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $action = ''; |
| 177 | 177 | |
| 178 | 178 | // For backward compatibility |
| 179 | - $object->statut = $object::STATUS_DRAFT; // this already set for $object->status by $object->setStatut() |
|
| 179 | + $object->statut = $object::STATUS_DRAFT; // this already set for $object->status by $object->setStatut() |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | // Action add |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | $object->date_end_event = (!GETPOST('date_end_event')) ? '' : $date_end_event; |
| 326 | 326 | $object->location = $location; |
| 327 | 327 | if (GETPOSTISSET('opp_amount')) { |
| 328 | - $object->opp_amount = price2num(GETPOST('opp_amount', 'alpha')); |
|
| 328 | + $object->opp_amount = price2num(GETPOST('opp_amount', 'alpha')); |
|
| 329 | 329 | } |
| 330 | 330 | if (GETPOSTISSET('budget_amount')) { |
| 331 | 331 | $object->budget_amount = price2num(GETPOST('budget_amount', 'alpha')); |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
| 514 | 514 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
| 515 | 515 | $tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl); |
| 516 | - $urlback = $tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1'; |
|
| 516 | + $urlback = $tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1'; |
|
| 517 | 517 | } else { |
| 518 | 518 | $urlback = DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1'; |
| 519 | 519 | } |
@@ -1074,7 +1074,7 @@ discard block |
||
| 1074 | 1074 | print '<br>'; |
| 1075 | 1075 | } |
| 1076 | 1076 | if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { |
| 1077 | - print '<input type="checkbox" id="usage_task" name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')) . '> '; |
|
| 1077 | + print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'> '; |
|
| 1078 | 1078 | $htmltext = $langs->trans("ProjectFollowTasks"); |
| 1079 | 1079 | print '<label for="usage_task">'.$form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext).'</label>'; |
| 1080 | 1080 | print '<script>'; |
@@ -1100,7 +1100,7 @@ discard block |
||
| 1100 | 1100 | print '<br>'; |
| 1101 | 1101 | } |
| 1102 | 1102 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 1103 | - print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')) . '> '; |
|
| 1103 | + print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'> '; |
|
| 1104 | 1104 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
| 1105 | 1105 | print '<label for="usage_bill_time">'.$form->textwithpicto($langs->trans("BillTime"), $htmltext).'</label>'; |
| 1106 | 1106 | print '<script>'; |
@@ -1126,7 +1126,7 @@ discard block |
||
| 1126 | 1126 | print '<br>'; |
| 1127 | 1127 | } |
| 1128 | 1128 | if (isModEnabled('eventorganization')) { |
| 1129 | - print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'. (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')) . '> '; |
|
| 1129 | + print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'> '; |
|
| 1130 | 1130 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
| 1131 | 1131 | print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>'; |
| 1132 | 1132 | print '<script>'; |
@@ -1305,7 +1305,7 @@ discard block |
||
| 1305 | 1305 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
| 1306 | 1306 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
| 1307 | 1307 | $tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl); |
| 1308 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
| 1308 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
| 1309 | 1309 | } else { |
| 1310 | 1310 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
| 1311 | 1311 | } |
@@ -1393,8 +1393,8 @@ discard block |
||
| 1393 | 1393 | print '<a class="editfielda paddingtop" href="'.$_SERVER["PHP_SELF"].'?action=edit_opp_status&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a>'; |
| 1394 | 1394 | } |
| 1395 | 1395 | print '</td><td>'; |
| 1396 | - $html_name_status = ($action == 'edit_opp_status') ? 'opp_status' : 'none'; |
|
| 1397 | - $html_name_percent = ($action == 'edit_opp_status') ? 'opp_percent' : 'none'; |
|
| 1396 | + $html_name_status = ($action == 'edit_opp_status') ? 'opp_status' : 'none'; |
|
| 1397 | + $html_name_percent = ($action == 'edit_opp_status') ? 'opp_percent' : 'none'; |
|
| 1398 | 1398 | $percent_value = (GETPOSTISSET('opp_percent') ? GETPOST('opp_percent') : (strcmp($object->opp_percent, '') ? vatrate($object->opp_percent) : '')); |
| 1399 | 1399 | $formproject->formOpportunityStatus($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->opp_status, $percent_value, $html_name_status, $html_name_percent); |
| 1400 | 1400 | print '</td></tr>'; |
@@ -1605,7 +1605,7 @@ discard block |
||
| 1605 | 1605 | if ($userWrite > 0) { |
| 1606 | 1606 | print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?action=confirm_setdraft&confirm=yes&token='.newToken().'&id='.$object->id, ''); |
| 1607 | 1607 | } else { |
| 1608 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('SetToDraft'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1608 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('SetToDraft'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1609 | 1609 | } |
| 1610 | 1610 | } |
| 1611 | 1611 | } |
@@ -1615,7 +1615,7 @@ discard block |
||
| 1615 | 1615 | if ($userWrite > 0) { |
| 1616 | 1616 | print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, ''); |
| 1617 | 1617 | } else { |
| 1618 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1618 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Modify'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1619 | 1619 | } |
| 1620 | 1620 | } |
| 1621 | 1621 | |
@@ -1624,7 +1624,7 @@ discard block |
||
| 1624 | 1624 | if ($userWrite > 0) { |
| 1625 | 1625 | print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, ''); |
| 1626 | 1626 | } else { |
| 1627 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1627 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1628 | 1628 | } |
| 1629 | 1629 | } |
| 1630 | 1630 | |
@@ -1633,7 +1633,7 @@ discard block |
||
| 1633 | 1633 | if ($userWrite > 0) { |
| 1634 | 1634 | print dolGetButtonAction('', $langs->trans('Close'), 'default', $_SERVER["PHP_SELF"].'?action=close&token='.newToken().'&id='.$object->id, ''); |
| 1635 | 1635 | } else { |
| 1636 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Close'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1636 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Close'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1637 | 1637 | } |
| 1638 | 1638 | } |
| 1639 | 1639 | |
@@ -1642,7 +1642,7 @@ discard block |
||
| 1642 | 1642 | if ($userWrite > 0) { |
| 1643 | 1643 | print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, ''); |
| 1644 | 1644 | } else { |
| 1645 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ReOpen'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1645 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ReOpen'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1646 | 1646 | } |
| 1647 | 1647 | } |
| 1648 | 1648 | |
@@ -1671,7 +1671,7 @@ discard block |
||
| 1671 | 1671 | if ($userWrite > 0) { |
| 1672 | 1672 | print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER["PHP_SELF"].'?action=clone&token='.newToken().'&id='.((int) $object->id), ''); |
| 1673 | 1673 | } else { |
| 1674 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1674 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1675 | 1675 | } |
| 1676 | 1676 | } |
| 1677 | 1677 | |
@@ -1680,7 +1680,7 @@ discard block |
||
| 1680 | 1680 | if ($userDelete > 0 || ($object->status == Project::STATUS_DRAFT && $user->hasRight('projet', 'creer'))) { |
| 1681 | 1681 | print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); |
| 1682 | 1682 | } else { |
| 1683 | - print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1683 | + print dolGetButtonAction($langs->trans('NotOwnerOfProject'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1684 | 1684 | } |
| 1685 | 1685 | } |
| 1686 | 1686 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $optioncss = GETPOST('optioncss', 'alpha'); |
| 60 | 60 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'projectlist'; |
| 61 | 61 | $mode = GETPOST('mode', 'alpha'); |
| 62 | -$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
| 62 | +$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
| 63 | 63 | |
| 64 | 64 | $title = $langs->trans("Projects"); |
| 65 | 65 | |
@@ -146,38 +146,38 @@ discard block |
||
| 146 | 146 | $search_date_start_startmonth = GETPOSTINT('search_date_start_startmonth'); |
| 147 | 147 | $search_date_start_startyear = GETPOSTINT('search_date_start_startyear'); |
| 148 | 148 | $search_date_start_startday = GETPOSTINT('search_date_start_startday'); |
| 149 | -$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
| 149 | +$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
| 150 | 150 | $search_date_start_endmonth = GETPOSTINT('search_date_start_endmonth'); |
| 151 | 151 | $search_date_start_endyear = GETPOSTINT('search_date_start_endyear'); |
| 152 | 152 | $search_date_start_endday = GETPOSTINT('search_date_start_endday'); |
| 153 | -$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
| 153 | +$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
| 154 | 154 | |
| 155 | 155 | $search_date_end_startmonth = GETPOSTINT('search_date_end_startmonth'); |
| 156 | 156 | $search_date_end_startyear = GETPOSTINT('search_date_end_startyear'); |
| 157 | 157 | $search_date_end_startday = GETPOSTINT('search_date_end_startday'); |
| 158 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 158 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 159 | 159 | $search_date_end_endmonth = GETPOSTINT('search_date_end_endmonth'); |
| 160 | 160 | $search_date_end_endyear = GETPOSTINT('search_date_end_endyear'); |
| 161 | 161 | $search_date_end_endday = GETPOSTINT('search_date_end_endday'); |
| 162 | -$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
| 162 | +$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
| 163 | 163 | |
| 164 | 164 | $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
| 165 | 165 | $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
| 166 | 166 | $search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
| 167 | -$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
| 167 | +$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
| 168 | 168 | $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
| 169 | 169 | $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
| 170 | 170 | $search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
| 171 | -$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
| 171 | +$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
| 172 | 172 | |
| 173 | 173 | $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth'); |
| 174 | 174 | $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear'); |
| 175 | 175 | $search_date_modif_startday = GETPOSTINT('search_date_modif_startday'); |
| 176 | -$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
| 176 | +$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
| 177 | 177 | $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth'); |
| 178 | 178 | $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear'); |
| 179 | 179 | $search_date_modif_endday = GETPOSTINT('search_date_modif_endday'); |
| 180 | -$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
| 180 | +$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
| 181 | 181 | |
| 182 | 182 | $search_category_array = array(); |
| 183 | 183 | |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | |
| 264 | 264 | $object->fields = dol_sort_array($object->fields, 'position'); |
| 265 | 265 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 266 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 266 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 267 | 267 | |
| 268 | 268 | // Add a groupby field. Set $groupby and $groupbyvalues. |
| 269 | 269 | // TODO Move this into a inc file |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | $sql .= " WHERE active = 1"; |
| 294 | 294 | //$sql .= " AND cls.code <> 'LOST'"; |
| 295 | 295 | //$sql .= " AND cls.code <> 'WON'"; |
| 296 | - $sql .= $db->order('cls.rowid', 'ASC'); // Must use the same order key than the key in $groupby |
|
| 296 | + $sql .= $db->order('cls.rowid', 'ASC'); // Must use the same order key than the key in $groupby |
|
| 297 | 297 | $resql = $db->query($sql); |
| 298 | 298 | if ($resql) { |
| 299 | 299 | $num = $db->num_rows($resql); |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | } |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | - $groupofcollpasedvalues = array(6,7); // LOST and WON |
|
| 309 | + $groupofcollpasedvalues = array(6, 7); // LOST and WON |
|
| 310 | 310 | } |
| 311 | 311 | //var_dump($groupbyvalues); |
| 312 | 312 | } |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | if ($searchCategoryProjectOperator == 0) { |
| 724 | 724 | $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).")"; |
| 725 | 725 | } else { |
| 726 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); |
|
| 726 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProject); |
|
| 727 | 727 | } |
| 728 | 728 | } |
| 729 | 729 | } |
@@ -930,7 +930,7 @@ discard block |
||
| 930 | 930 | $param .= '&search_date_end_endday='.urlencode((string) ($search_date_end_endday)); |
| 931 | 931 | } |
| 932 | 932 | if ($search_date_end_end) { |
| 933 | - $param .= '&search_date_end_end=' . urlencode($search_date_end_end); |
|
| 933 | + $param .= '&search_date_end_end='.urlencode($search_date_end_end); |
|
| 934 | 934 | } |
| 935 | 935 | if ($search_date_creation_startmonth) { |
| 936 | 936 | $param .= '&search_date_creation_startmonth='.urlencode((string) ($search_date_creation_startmonth)); |
@@ -978,7 +978,7 @@ discard block |
||
| 978 | 978 | $param .= '&search_date_modif_endday='.urlencode((string) ($search_date_modif_endday)); |
| 979 | 979 | } |
| 980 | 980 | if ($search_date_modif_end) { |
| 981 | - $param .= '&search_date_modif_end=' . urlencode($search_date_modif_end); |
|
| 981 | + $param .= '&search_date_modif_end='.urlencode($search_date_modif_end); |
|
| 982 | 982 | } |
| 983 | 983 | if (!empty($search_category_array)) { |
| 984 | 984 | foreach ($search_category_array as $tmpval) { |
@@ -1199,7 +1199,7 @@ discard block |
||
| 1199 | 1199 | } |
| 1200 | 1200 | |
| 1201 | 1201 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 1202 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 1202 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 1203 | 1203 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 1204 | 1204 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 1205 | 1205 | |
@@ -1660,7 +1660,7 @@ discard block |
||
| 1660 | 1660 | |
| 1661 | 1661 | if (!empty($groupby)) { |
| 1662 | 1662 | if (is_null($groupbyold)) { |
| 1663 | - print '<div class="box-flex-container-columns kanban">'; // Start div for all kanban columns |
|
| 1663 | + print '<div class="box-flex-container-columns kanban">'; // Start div for all kanban columns |
|
| 1664 | 1664 | } |
| 1665 | 1665 | // Start kanban column |
| 1666 | 1666 | if (is_null($obj->$groupbyfield)) { |
@@ -1670,7 +1670,7 @@ discard block |
||
| 1670 | 1670 | } |
| 1671 | 1671 | if ($groupbyold !== $groupbyvalue) { |
| 1672 | 1672 | if (!is_null($groupbyold)) { |
| 1673 | - print '</div>'; // We need a new kanban column - end box-flex-container |
|
| 1673 | + print '</div>'; // We need a new kanban column - end box-flex-container |
|
| 1674 | 1674 | } |
| 1675 | 1675 | foreach ($groupbyvalues as $tmpcursor => $tmpgroupbyvalue) { |
| 1676 | 1676 | //var_dump("tmpcursor=".$tmpcursor." groupbyold=".$groupbyold." groupbyvalue=".$groupbyvalue); |
@@ -1683,9 +1683,9 @@ discard block |
||
| 1683 | 1683 | } |
| 1684 | 1684 | print '" data-groupbyid="'.preg_replace('/[^a-z0-9]/', '', $tmpcursor).'">'; |
| 1685 | 1685 | print '<div class="kanbanlabel">'.$langs->trans($tmpgroupbyvalue).'</div>'; |
| 1686 | - print '</div>'; // Start and end the new column |
|
| 1686 | + print '</div>'; // Start and end the new column |
|
| 1687 | 1687 | } |
| 1688 | - print '<div class="box-flex-container-column kanban column" data-groupbyid="'.preg_replace('/[^a-z0-9]/', '', $groupbyvalue).'">'; // Start new column |
|
| 1688 | + print '<div class="box-flex-container-column kanban column" data-groupbyid="'.preg_replace('/[^a-z0-9]/', '', $groupbyvalue).'">'; // Start new column |
|
| 1689 | 1689 | print '<div class="kanbanlabel">'.$langs->trans(empty($groupbyvalues[$groupbyvalue]) ? 'Undefined' : $groupbyvalues[$groupbyvalue]).'</div>'; |
| 1690 | 1690 | } |
| 1691 | 1691 | $groupbyold = $groupbyvalue; |
@@ -1709,7 +1709,7 @@ discard block |
||
| 1709 | 1709 | if ($i == ($imaxinloop - 1)) { |
| 1710 | 1710 | // Close kanban column |
| 1711 | 1711 | if (!empty($groupby)) { |
| 1712 | - print '</div>'; // end box-flex-container |
|
| 1712 | + print '</div>'; // end box-flex-container |
|
| 1713 | 1713 | foreach ($groupbyvalues as $tmpcursor => $tmpgroupbyvalue) { |
| 1714 | 1714 | //var_dump("tmpcursor=".$tmpcursor." groupbyold=".$groupbyold." groupbyvalue=".$groupbyvalue); |
| 1715 | 1715 | if ($tmpcursor <= $groupbyvalue) { continue; } |
@@ -1720,11 +1720,11 @@ discard block |
||
| 1720 | 1720 | } |
| 1721 | 1721 | print '" data-groupbyid="'.preg_replace('/[^a-z0-9]/', '', $tmpcursor).'">'; |
| 1722 | 1722 | print '<div class="kanbanlabel">'.$langs->trans(empty($tmpgroupbyvalue) ? 'Undefined' : $tmpgroupbyvalue).'</div>'; |
| 1723 | - print '</div>'; // Start and end the new column |
|
| 1723 | + print '</div>'; // Start and end the new column |
|
| 1724 | 1724 | } |
| 1725 | - print '</div>'; // end box-flex-container-columns |
|
| 1725 | + print '</div>'; // end box-flex-container-columns |
|
| 1726 | 1726 | } else { |
| 1727 | - print '</div>'; // end box-flex-container |
|
| 1727 | + print '</div>'; // end box-flex-container |
|
| 1728 | 1728 | } |
| 1729 | 1729 | |
| 1730 | 1730 | print '</td></tr>'; |
@@ -32,14 +32,14 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | // Load Dolibarr environment |
| 34 | 34 | require '../../main.inc.php'; |
| 35 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 36 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php'; |
|
| 37 | -require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 38 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php'; |
|
| 39 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
| 40 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; |
|
| 41 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 42 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php'; |
|
| 35 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 36 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
|
| 37 | +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 38 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; |
|
| 39 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
| 40 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; |
|
| 41 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 42 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php'; |
|
| 43 | 43 | |
| 44 | 44 | // Load translation files required by the page |
| 45 | 45 | $langsLoad = array('projects', 'bills', 'orders', 'companies'); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | -include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
| 168 | +include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
| 169 | 169 | |
| 170 | 170 | // Purge search criteria |
| 171 | 171 | if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers |
@@ -351,10 +351,10 @@ discard block |
||
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) { |
| 354 | - $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 354 | + $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 355 | 355 | |
| 356 | 356 | if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
| 357 | - $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 357 | + $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 358 | 358 | |
| 359 | 359 | if ($result < 0) { |
| 360 | 360 | $langs->load("errors"); |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | if (count($tasksarray) > 0) { |
| 375 | 375 | $id = $tasksarray[0]->id; |
| 376 | 376 | } else { |
| 377 | - header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode)); |
|
| 377 | + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode)); |
|
| 378 | 378 | exit; |
| 379 | 379 | } |
| 380 | 380 | } |
@@ -411,9 +411,9 @@ discard block |
||
| 411 | 411 | if (!($projectstatic->thirdparty->id > 0)) { |
| 412 | 412 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors'); |
| 413 | 413 | } else { |
| 414 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 415 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 416 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 414 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 415 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 416 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 417 | 417 | |
| 418 | 418 | $tmpinvoice = new Facture($db); |
| 419 | 419 | $tmptimespent = new Task($db); |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | $arrayoftasks = array(); |
| 480 | 480 | foreach ($toselect as $key => $value) { |
| 481 | 481 | // Get userid, timepent |
| 482 | - $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 482 | + $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 483 | 483 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 484 | 484 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
| 485 | 485 | } |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | // Add lines |
| 555 | - $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), $remiseproject); |
|
| 555 | + $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), $remiseproject); |
|
| 556 | 556 | if ($lineid < 0) { |
| 557 | 557 | $error++; |
| 558 | 558 | setEventMessages(null, $tmpinvoice->errors, 'errors'); |
@@ -585,16 +585,16 @@ discard block |
||
| 585 | 585 | |
| 586 | 586 | $arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration; |
| 587 | 587 | $arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm; |
| 588 | - $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref . ' - ' . $ftask->label . ' - ' . $username; |
|
| 588 | + $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username; |
|
| 589 | 589 | $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note); |
| 590 | 590 | |
| 591 | 591 | if (!empty($withdetail)) { |
| 592 | 592 | if (!empty($object->timespent_withhour)) { |
| 593 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour)); |
|
| 593 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour)); |
|
| 594 | 594 | } else { |
| 595 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date)); |
|
| 595 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date)); |
|
| 596 | 596 | } |
| 597 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration") . ': ' . convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY)); |
|
| 597 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration").': '.convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY)); |
|
| 598 | 598 | } |
| 599 | 599 | $arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user; |
| 600 | 600 | $arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product; |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | $arrayoftasks = array(); |
| 673 | 673 | foreach ($toselect as $key => $value) { |
| 674 | 674 | // Get userid, timepent |
| 675 | - $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
| 675 | + $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
| 676 | 676 | // $object->id is now the task id |
| 677 | 677 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 678 | 678 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | // Add lines |
| 749 | 749 | $date_start = ''; |
| 750 | 750 | $date_end = ''; |
| 751 | - $lineName = $ftask->ref . ' - ' . $ftask->label; |
|
| 751 | + $lineName = $ftask->ref.' - '.$ftask->label; |
|
| 752 | 752 | $lineid = $tmpinvoice->addline($lineName, $pu_ht_for_task, price2num($qtyhour / $prodDurationHours, 'MS'), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), $remiseproject, $date_start, $date_end, 0, 0, '', 'HT', 0, 1, -1, 0, '', 0, 0, null, $pa_ht); |
| 753 | 753 | if ($lineid < 0) { |
| 754 | 754 | $error++; |
@@ -758,8 +758,8 @@ discard block |
||
| 758 | 758 | |
| 759 | 759 | if (!$error) { |
| 760 | 760 | // Update lineid into line of timespent |
| 761 | - $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id); |
|
| 762 | - $sql .= ' WHERE rowid IN (' . $db->sanitize(implode(',', $toselect)) . ')'; |
|
| 761 | + $sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); |
|
| 762 | + $sql .= ' WHERE rowid IN ('.$db->sanitize(implode(',', $toselect)).')'; |
|
| 763 | 763 | $result = $db->query($sql); |
| 764 | 764 | if (!$result) { |
| 765 | 765 | $error++; |
@@ -797,12 +797,12 @@ discard block |
||
| 797 | 797 | if (!($projectstatic->thirdparty->id > 0)) { |
| 798 | 798 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors'); |
| 799 | 799 | } else { |
| 800 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 801 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 802 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 800 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 801 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 802 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 803 | 803 | |
| 804 | 804 | |
| 805 | - require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php'; |
|
| 805 | + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; |
|
| 806 | 806 | $tmpinter = new Fichinter($db); |
| 807 | 807 | $tmptimespent = new Task($db); |
| 808 | 808 | $fuser = new User($db); |
@@ -814,7 +814,7 @@ discard block |
||
| 814 | 814 | $tmpinter->socid = $projectstatic->thirdparty->id; |
| 815 | 815 | $tmpinter->date = dol_mktime(GETPOSTINT('rehour'), GETPOSTINT('remin'), GETPOSTINT('resec'), GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); |
| 816 | 816 | $tmpinter->fk_project = $projectstatic->id; |
| 817 | - $tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : ''); |
|
| 817 | + $tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : ''); |
|
| 818 | 818 | |
| 819 | 819 | if ($interToUse) { |
| 820 | 820 | $tmpinter->fetch($interToUse); |
@@ -847,7 +847,7 @@ discard block |
||
| 847 | 847 | $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); |
| 848 | 848 | |
| 849 | 849 | // Add lines |
| 850 | - $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), $value['date'], $value['timespent']); |
|
| 850 | + $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), $value['date'], $value['timespent']); |
|
| 851 | 851 | } |
| 852 | 852 | } |
| 853 | 853 | |
@@ -878,9 +878,9 @@ discard block |
||
| 878 | 878 | //$result = $projectstatic->fetch($object->fk_project); |
| 879 | 879 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 880 | 880 | |
| 881 | -$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); |
|
| 881 | +$title = $object->ref.' - '.$langs->trans("TimeSpent"); |
|
| 882 | 882 | if (!empty($withproject)) { |
| 883 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
| 883 | + $title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : ''); |
|
| 884 | 884 | } |
| 885 | 885 | $help_url = ''; |
| 886 | 886 | |
@@ -929,13 +929,13 @@ discard block |
||
| 929 | 929 | |
| 930 | 930 | $param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : ''); |
| 931 | 931 | if ($search_user) { |
| 932 | - $param .= '&search_user=' . ((int) $search_user); |
|
| 932 | + $param .= '&search_user='.((int) $search_user); |
|
| 933 | 933 | } |
| 934 | 934 | if ($search_month) { |
| 935 | - $param .= '&search_month=' . ((int) $search_month); |
|
| 935 | + $param .= '&search_month='.((int) $search_month); |
|
| 936 | 936 | } |
| 937 | 937 | if ($search_year) { |
| 938 | - $param .= '&search_year=' . ((int) $search_year); |
|
| 938 | + $param .= '&search_year='.((int) $search_year); |
|
| 939 | 939 | } |
| 940 | 940 | |
| 941 | 941 | // Project card |
@@ -947,14 +947,14 @@ discard block |
||
| 947 | 947 | $morehtmlref .= $projectstatic->title; |
| 948 | 948 | // Thirdparty |
| 949 | 949 | if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { |
| 950 | - $morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 950 | + $morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 951 | 951 | } |
| 952 | 952 | $morehtmlref .= '</div>'; |
| 953 | 953 | |
| 954 | 954 | // Define a complementary filter for search of next/prev ref. |
| 955 | 955 | if (!$user->hasRight('projet', 'all', 'lire')) { |
| 956 | 956 | $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); |
| 957 | - $projectstatic->next_prev_filter = "rowid IN (" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0') . ")"; |
|
| 957 | + $projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; |
|
| 958 | 958 | } |
| 959 | 959 | |
| 960 | 960 | dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); |
@@ -972,25 +972,25 @@ discard block |
||
| 972 | 972 | print '</td>'; |
| 973 | 973 | print '<td>'; |
| 974 | 974 | if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) { |
| 975 | - print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> '; |
|
| 975 | + print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; |
|
| 976 | 976 | $htmltext = $langs->trans("ProjectFollowOpportunity"); |
| 977 | 977 | print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); |
| 978 | 978 | print '<br>'; |
| 979 | 979 | } |
| 980 | 980 | if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { |
| 981 | - print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> '; |
|
| 981 | + print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; |
|
| 982 | 982 | $htmltext = $langs->trans("ProjectFollowTasks"); |
| 983 | 983 | print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); |
| 984 | 984 | print '<br>'; |
| 985 | 985 | } |
| 986 | 986 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 987 | - print '<input type="checkbox" disabled name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')) . '"> '; |
|
| 987 | + print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> '; |
|
| 988 | 988 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
| 989 | 989 | print $form->textwithpicto($langs->trans("BillTime"), $htmltext); |
| 990 | 990 | print '<br>'; |
| 991 | 991 | } |
| 992 | 992 | if (isModEnabled('eventorganization')) { |
| 993 | - print '<input type="checkbox" disabled name="usage_organize_event"' . (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')) . '"> '; |
|
| 993 | + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')).'"> '; |
|
| 994 | 994 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
| 995 | 995 | print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); |
| 996 | 996 | } |
@@ -998,7 +998,7 @@ discard block |
||
| 998 | 998 | } |
| 999 | 999 | |
| 1000 | 1000 | // Visibility |
| 1001 | - print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>'; |
|
| 1001 | + print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; |
|
| 1002 | 1002 | if ($projectstatic->public) { |
| 1003 | 1003 | print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"'); |
| 1004 | 1004 | print $langs->trans('SharedProject'); |
@@ -1009,14 +1009,14 @@ discard block |
||
| 1009 | 1009 | print '</td></tr>'; |
| 1010 | 1010 | |
| 1011 | 1011 | // Budget |
| 1012 | - print '<tr><td>' . $langs->trans("Budget") . '</td><td>'; |
|
| 1012 | + print '<tr><td>'.$langs->trans("Budget").'</td><td>'; |
|
| 1013 | 1013 | if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) { |
| 1014 | - print '<span class="amount">' . price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency) . '</span>'; |
|
| 1014 | + print '<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).'</span>'; |
|
| 1015 | 1015 | } |
| 1016 | 1016 | print '</td></tr>'; |
| 1017 | 1017 | |
| 1018 | 1018 | // Date start - end project |
| 1019 | - print '<tr><td>' . $langs->trans("Dates") . '</td><td>'; |
|
| 1019 | + print '<tr><td>'.$langs->trans("Dates").'</td><td>'; |
|
| 1020 | 1020 | $start = dol_print_date($projectstatic->date_start, 'day'); |
| 1021 | 1021 | print($start ? $start : '?'); |
| 1022 | 1022 | $end = dol_print_date($projectstatic->date_end, 'day'); |
@@ -1031,7 +1031,7 @@ discard block |
||
| 1031 | 1031 | $cols = 2; |
| 1032 | 1032 | $savobject = $object; |
| 1033 | 1033 | $object = $projectstatic; |
| 1034 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 1034 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 1035 | 1035 | $object = $savobject; |
| 1036 | 1036 | |
| 1037 | 1037 | print '</table>'; |
@@ -1049,7 +1049,7 @@ discard block |
||
| 1049 | 1049 | |
| 1050 | 1050 | // Categories |
| 1051 | 1051 | if (isModEnabled('category')) { |
| 1052 | - print '<tr><td class="valignmiddle">' . $langs->trans("Categories") . '</td><td>'; |
|
| 1052 | + print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>'; |
|
| 1053 | 1053 | print $form->showCategories($projectstatic->id, 'project', 1); |
| 1054 | 1054 | print "</td></tr>"; |
| 1055 | 1055 | } |
@@ -1078,12 +1078,12 @@ discard block |
||
| 1078 | 1078 | |
| 1079 | 1079 | if (!empty($projectidforalltimes)) { |
| 1080 | 1080 | // We are on tab 'Time Spent' of project |
| 1081 | - $backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : ''); |
|
| 1082 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1081 | + $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : ''); |
|
| 1082 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1083 | 1083 | } else { |
| 1084 | 1084 | // We are on tab 'Time Spent' of task |
| 1085 | - $backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : ''); |
|
| 1086 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1085 | + $backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : ''); |
|
| 1086 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1087 | 1087 | } |
| 1088 | 1088 | } else { |
| 1089 | 1089 | $linktocreatetimeBtnStatus = -2; |
@@ -1128,19 +1128,19 @@ discard block |
||
| 1128 | 1128 | print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); |
| 1129 | 1129 | |
| 1130 | 1130 | if ($action == 'deleteline') { |
| 1131 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
| 1131 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
| 1132 | 1132 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1133 | 1133 | } |
| 1134 | 1134 | |
| 1135 | 1135 | $param = ($withproject ? '&withproject=1' : ''); |
| 1136 | - $param .= ($param ? '&' : '') . 'id=' . $object->id; // ID of task |
|
| 1137 | - $linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : ''; |
|
| 1136 | + $param .= ($param ? '&' : '').'id='.$object->id; // ID of task |
|
| 1137 | + $linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; |
|
| 1138 | 1138 | |
| 1139 | 1139 | if (!GETPOST('withproject') || empty($projectstatic->id)) { |
| 1140 | 1140 | $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); |
| 1141 | - $object->next_prev_filter = "fk_projet IN (" . $db->sanitize($projectsListId) . ")"; |
|
| 1141 | + $object->next_prev_filter = "fk_projet IN (".$db->sanitize($projectsListId).")"; |
|
| 1142 | 1142 | } else { |
| 1143 | - $object->next_prev_filter = "fk_projet = " . ((int) $projectstatic->id); |
|
| 1143 | + $object->next_prev_filter = "fk_projet = ".((int) $projectstatic->id); |
|
| 1144 | 1144 | } |
| 1145 | 1145 | |
| 1146 | 1146 | $morehtmlref = ''; |
@@ -1148,12 +1148,12 @@ discard block |
||
| 1148 | 1148 | // Project |
| 1149 | 1149 | if (empty($withproject)) { |
| 1150 | 1150 | $morehtmlref .= '<div class="refidno">'; |
| 1151 | - $morehtmlref .= $langs->trans("Project") . ': '; |
|
| 1151 | + $morehtmlref .= $langs->trans("Project").': '; |
|
| 1152 | 1152 | $morehtmlref .= $projectstatic->getNomUrl(1); |
| 1153 | 1153 | $morehtmlref .= '<br>'; |
| 1154 | 1154 | |
| 1155 | 1155 | // Third party |
| 1156 | - $morehtmlref .= $langs->trans("ThirdParty") . ': '; |
|
| 1156 | + $morehtmlref .= $langs->trans("ThirdParty").': '; |
|
| 1157 | 1157 | if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) { |
| 1158 | 1158 | $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1); |
| 1159 | 1159 | } |
@@ -1169,7 +1169,7 @@ discard block |
||
| 1169 | 1169 | print '<table class="border centpercent tableforfield">'; |
| 1170 | 1170 | |
| 1171 | 1171 | // Task parent |
| 1172 | - print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>'; |
|
| 1172 | + print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>'; |
|
| 1173 | 1173 | if ($object->fk_task_parent > 0) { |
| 1174 | 1174 | $tasktmp = new Task($db); |
| 1175 | 1175 | $tasktmp->fetch($object->fk_task_parent); |
@@ -1178,7 +1178,7 @@ discard block |
||
| 1178 | 1178 | print '</td></tr>'; |
| 1179 | 1179 | |
| 1180 | 1180 | // Date start - Date end task |
| 1181 | - print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>'; |
|
| 1181 | + print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>'; |
|
| 1182 | 1182 | $start = dol_print_date($object->date_start, 'dayhour'); |
| 1183 | 1183 | print($start ? $start : '?'); |
| 1184 | 1184 | $end = dol_print_date($object->date_end, 'dayhour'); |
@@ -1190,7 +1190,7 @@ discard block |
||
| 1190 | 1190 | print '</td></tr>'; |
| 1191 | 1191 | |
| 1192 | 1192 | // Planned workload |
| 1193 | - print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>'; |
|
| 1193 | + print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>'; |
|
| 1194 | 1194 | if ($object->planned_workload) { |
| 1195 | 1195 | print convertSecondToTime($object->planned_workload, 'allhourmin'); |
| 1196 | 1196 | } |
@@ -1205,21 +1205,21 @@ discard block |
||
| 1205 | 1205 | print '<table class="border tableforfield centpercent">'; |
| 1206 | 1206 | |
| 1207 | 1207 | // Progress declared |
| 1208 | - print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>'; |
|
| 1209 | - print $object->progress != '' ? $object->progress . ' %' : ''; |
|
| 1208 | + print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>'; |
|
| 1209 | + print $object->progress != '' ? $object->progress.' %' : ''; |
|
| 1210 | 1210 | print '</td></tr>'; |
| 1211 | 1211 | |
| 1212 | 1212 | // Progress calculated |
| 1213 | - print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>'; |
|
| 1213 | + print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>'; |
|
| 1214 | 1214 | if ($object->planned_workload) { |
| 1215 | 1215 | $tmparray = $object->getSummaryOfTimeSpent(); |
| 1216 | 1216 | if ($tmparray['total_duration'] > 0) { |
| 1217 | - print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %'; |
|
| 1217 | + print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; |
|
| 1218 | 1218 | } else { |
| 1219 | 1219 | print '0 %'; |
| 1220 | 1220 | } |
| 1221 | 1221 | } else { |
| 1222 | - print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>'; |
|
| 1222 | + print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; |
|
| 1223 | 1223 | } |
| 1224 | 1224 | print '</td>'; |
| 1225 | 1225 | |
@@ -1235,7 +1235,7 @@ discard block |
||
| 1235 | 1235 | print dol_get_fiche_end(); |
| 1236 | 1236 | } else { |
| 1237 | 1237 | if ($action == 'deleteline') { |
| 1238 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
| 1238 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
| 1239 | 1239 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1240 | 1240 | } |
| 1241 | 1241 | } |
@@ -1249,7 +1249,7 @@ discard block |
||
| 1249 | 1249 | |
| 1250 | 1250 | if ($action == 'deleteline' && !empty($projectidforalltimes)) { |
| 1251 | 1251 | // We must use projectidprojectid if on list of timespent of project and id=taskid if on list of timespent of a task |
| 1252 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($projectstatic->id > 0 ? 'projectid=' . $projectstatic->id : ($object->id > 0 ? "id=" . $object->id : '')) . '&lineid=' . GETPOSTINT('lineid') . ($withproject ? '&withproject=1' : '') . "&contextpage=" . urlencode($contextpage); |
|
| 1252 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($projectstatic->id > 0 ? 'projectid='.$projectstatic->id : ($object->id > 0 ? "id=".$object->id : '')).'&lineid='.GETPOSTINT('lineid').($withproject ? '&withproject=1' : '')."&contextpage=".urlencode($contextpage); |
|
| 1253 | 1253 | $formconfirm = $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1254 | 1254 | } |
| 1255 | 1255 | |
@@ -1268,10 +1268,10 @@ discard block |
||
| 1268 | 1268 | // Definition of fields for list |
| 1269 | 1269 | $arrayfields = array(); |
| 1270 | 1270 | $arrayfields['t.element_date'] = array('label' => $langs->trans("Date"), 'checked' => 1); |
| 1271 | - $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1','checked' => 1); |
|
| 1271 | + $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1', 'checked' => 1); |
|
| 1272 | 1272 | $arrayfields['s.name_alias'] = array('label' => $langs->trans("AliasNameShort"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1'); |
| 1273 | 1273 | if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task |
| 1274 | - if (! empty($allprojectforuser)) { |
|
| 1274 | + if (!empty($allprojectforuser)) { |
|
| 1275 | 1275 | $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1]; |
| 1276 | 1276 | $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1]; |
| 1277 | 1277 | } |
@@ -1287,83 +1287,83 @@ discard block |
||
| 1287 | 1287 | $arrayfields['value'] = array('label' => $langs->trans("Value"), 'checked' => 1, 'enabled' => isModEnabled("salaries")); |
| 1288 | 1288 | $arrayfields['valuebilled'] = array('label' => $langs->trans("Billed"), 'checked' => 1, 'enabled' => (((getDolGlobalInt('PROJECT_HIDE_TASKS') || !getDolGlobalInt('PROJECT_BILL_TIME_SPENT')) ? 0 : 1) && $projectstatic->usage_bill_time)); |
| 1289 | 1289 | // Extra fields |
| 1290 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1290 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1291 | 1291 | |
| 1292 | 1292 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 1293 | - '@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 1293 | + '@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 1294 | 1294 | |
| 1295 | 1295 | $param = ''; |
| 1296 | 1296 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
| 1297 | - $param .= '&contextpage=' . urlencode($contextpage); |
|
| 1297 | + $param .= '&contextpage='.urlencode($contextpage); |
|
| 1298 | 1298 | } |
| 1299 | 1299 | if ($limit > 0 && $limit != $conf->liste_limit) { |
| 1300 | 1300 | $param .= '&limit='.((int) $limit); |
| 1301 | 1301 | } |
| 1302 | 1302 | if ($search_month > 0) { |
| 1303 | - $param .= '&search_month=' . urlencode((string) ($search_month)); |
|
| 1303 | + $param .= '&search_month='.urlencode((string) ($search_month)); |
|
| 1304 | 1304 | } |
| 1305 | 1305 | if ($search_year > 0) { |
| 1306 | - $param .= '&search_year=' . urlencode((string) ($search_year)); |
|
| 1306 | + $param .= '&search_year='.urlencode((string) ($search_year)); |
|
| 1307 | 1307 | } |
| 1308 | 1308 | if (!empty($search_user)) { // We keep param if -1 because default value is forced to user id if not set |
| 1309 | 1309 | $param .= '&search_user='.urlencode($search_user); |
| 1310 | 1310 | } |
| 1311 | 1311 | if ($search_task_ref != '') { |
| 1312 | - $param .= '&search_task_ref=' . urlencode($search_task_ref); |
|
| 1312 | + $param .= '&search_task_ref='.urlencode($search_task_ref); |
|
| 1313 | 1313 | } |
| 1314 | 1314 | if ($search_company != '') { |
| 1315 | - $param .= '&$search_company=' . urlencode($search_company); |
|
| 1315 | + $param .= '&$search_company='.urlencode($search_company); |
|
| 1316 | 1316 | } |
| 1317 | 1317 | if ($search_company_alias != '') { |
| 1318 | - $param .= '&$search_company_alias=' . urlencode($search_company_alias); |
|
| 1318 | + $param .= '&$search_company_alias='.urlencode($search_company_alias); |
|
| 1319 | 1319 | } |
| 1320 | 1320 | if ($search_project_ref != '') { |
| 1321 | - $param .= '&$search_project_ref=' . urlencode($search_project_ref); |
|
| 1321 | + $param .= '&$search_project_ref='.urlencode($search_project_ref); |
|
| 1322 | 1322 | } |
| 1323 | 1323 | if ($search_project_label != '') { |
| 1324 | - $param .= '&$search_project_label=' . urlencode($search_project_label); |
|
| 1324 | + $param .= '&$search_project_label='.urlencode($search_project_label); |
|
| 1325 | 1325 | } |
| 1326 | 1326 | if ($search_task_label != '') { |
| 1327 | - $param .= '&search_task_label=' . urlencode($search_task_label); |
|
| 1327 | + $param .= '&search_task_label='.urlencode($search_task_label); |
|
| 1328 | 1328 | } |
| 1329 | 1329 | if ($search_note != '') { |
| 1330 | - $param .= '&search_note=' . urlencode($search_note); |
|
| 1330 | + $param .= '&search_note='.urlencode($search_note); |
|
| 1331 | 1331 | } |
| 1332 | 1332 | if ($search_duration != '') { |
| 1333 | - $param .= '&search_field2=' . urlencode((string) ($search_duration)); |
|
| 1333 | + $param .= '&search_field2='.urlencode((string) ($search_duration)); |
|
| 1334 | 1334 | } |
| 1335 | 1335 | if ($optioncss != '') { |
| 1336 | - $param .= '&optioncss=' . urlencode($optioncss); |
|
| 1336 | + $param .= '&optioncss='.urlencode($optioncss); |
|
| 1337 | 1337 | } |
| 1338 | 1338 | if ($search_date_startday) { |
| 1339 | - $param .= '&search_date_startday=' . urlencode((string) ($search_date_startday)); |
|
| 1339 | + $param .= '&search_date_startday='.urlencode((string) ($search_date_startday)); |
|
| 1340 | 1340 | } |
| 1341 | 1341 | if ($search_date_startmonth) { |
| 1342 | - $param .= '&search_date_startmonth=' . urlencode((string) ($search_date_startmonth)); |
|
| 1342 | + $param .= '&search_date_startmonth='.urlencode((string) ($search_date_startmonth)); |
|
| 1343 | 1343 | } |
| 1344 | 1344 | if ($search_date_startyear) { |
| 1345 | - $param .= '&search_date_startyear=' . urlencode((string) ($search_date_startyear)); |
|
| 1345 | + $param .= '&search_date_startyear='.urlencode((string) ($search_date_startyear)); |
|
| 1346 | 1346 | } |
| 1347 | 1347 | if ($search_date_endday) { |
| 1348 | - $param .= '&search_date_endday=' . urlencode((string) ($search_date_endday)); |
|
| 1348 | + $param .= '&search_date_endday='.urlencode((string) ($search_date_endday)); |
|
| 1349 | 1349 | } |
| 1350 | 1350 | if ($search_date_endmonth) { |
| 1351 | - $param .= '&search_date_endmonth=' . urlencode((string) ($search_date_endmonth)); |
|
| 1351 | + $param .= '&search_date_endmonth='.urlencode((string) ($search_date_endmonth)); |
|
| 1352 | 1352 | } |
| 1353 | 1353 | if ($search_date_endyear) { |
| 1354 | - $param .= '&search_date_endyear=' . urlencode((string) ($search_date_endyear)); |
|
| 1354 | + $param .= '&search_date_endyear='.urlencode((string) ($search_date_endyear)); |
|
| 1355 | 1355 | } |
| 1356 | 1356 | if ($search_timespent_starthour) { |
| 1357 | - $param .= '&search_timespent_duration_starthour=' . urlencode((string) ($search_timespent_starthour)); |
|
| 1357 | + $param .= '&search_timespent_duration_starthour='.urlencode((string) ($search_timespent_starthour)); |
|
| 1358 | 1358 | } |
| 1359 | 1359 | if ($search_timespent_startmin) { |
| 1360 | - $param .= '&search_timespent_duration_startmin=' . urlencode((string) ($search_timespent_startmin)); |
|
| 1360 | + $param .= '&search_timespent_duration_startmin='.urlencode((string) ($search_timespent_startmin)); |
|
| 1361 | 1361 | } |
| 1362 | 1362 | if ($search_timespent_endhour) { |
| 1363 | - $param .= '&search_timespent_duration_endhour=' . urlencode((string) ($search_timespent_endhour)); |
|
| 1363 | + $param .= '&search_timespent_duration_endhour='.urlencode((string) ($search_timespent_endhour)); |
|
| 1364 | 1364 | } |
| 1365 | 1365 | if ($search_timespent_endmin) { |
| 1366 | - $param .= '&search_timespent_duration_endmin=' . urlencode((string) ($search_timespent_endmin)); |
|
| 1366 | + $param .= '&search_timespent_duration_endmin='.urlencode((string) ($search_timespent_endmin)); |
|
| 1367 | 1367 | } |
| 1368 | 1368 | |
| 1369 | 1369 | /* |
@@ -1371,24 +1371,24 @@ discard block |
||
| 1371 | 1371 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
| 1372 | 1372 | */ |
| 1373 | 1373 | if ($id) { |
| 1374 | - $param .= '&id=' . urlencode((string) ($id)); |
|
| 1374 | + $param .= '&id='.urlencode((string) ($id)); |
|
| 1375 | 1375 | } |
| 1376 | 1376 | if ($projectid) { |
| 1377 | - $param .= '&projectid=' . urlencode((string) ($projectid)); |
|
| 1377 | + $param .= '&projectid='.urlencode((string) ($projectid)); |
|
| 1378 | 1378 | } |
| 1379 | 1379 | if ($withproject) { |
| 1380 | - $param .= '&withproject=' . urlencode((string) ($withproject)); |
|
| 1380 | + $param .= '&withproject='.urlencode((string) ($withproject)); |
|
| 1381 | 1381 | } |
| 1382 | 1382 | // Add $param from hooks |
| 1383 | 1383 | $parameters = array('param' => &$param); |
| 1384 | 1384 | $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook |
| 1385 | 1385 | $param .= $hookmanager->resPrint; |
| 1386 | 1386 | |
| 1387 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
| 1387 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
| 1388 | 1388 | if ($optioncss != '') { |
| 1389 | - print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; |
|
| 1389 | + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
|
| 1390 | 1390 | } |
| 1391 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 1391 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 1392 | 1392 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
| 1393 | 1393 | if ($action == 'editline') { |
| 1394 | 1394 | print '<input type="hidden" name="action" value="updateline">'; |
@@ -1403,13 +1403,13 @@ discard block |
||
| 1403 | 1403 | } else { |
| 1404 | 1404 | print '<input type="hidden" name="action" value="list">'; |
| 1405 | 1405 | } |
| 1406 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
| 1407 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
| 1406 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
| 1407 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
| 1408 | 1408 | |
| 1409 | - print '<input type="hidden" name="id" value="' . $id . '">'; |
|
| 1410 | - print '<input type="hidden" name="projectid" value="' . $projectidforalltimes . '">'; |
|
| 1411 | - print '<input type="hidden" name="withproject" value="' . $withproject . '">'; |
|
| 1412 | - print '<input type="hidden" name="tab" value="' . $tab . '">'; |
|
| 1409 | + print '<input type="hidden" name="id" value="'.$id.'">'; |
|
| 1410 | + print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">'; |
|
| 1411 | + print '<input type="hidden" name="withproject" value="'.$withproject.'">'; |
|
| 1412 | + print '<input type="hidden" name="tab" value="'.$tab.'">'; |
|
| 1413 | 1413 | print '<input type="hidden" name="page_y" value="">'; |
| 1414 | 1414 | |
| 1415 | 1415 | // Form to convert time spent into invoice |
@@ -1436,7 +1436,7 @@ discard block |
||
| 1436 | 1436 | 'onelineperperiod' => 'OneLinePerTimeSpentLine', |
| 1437 | 1437 | ); |
| 1438 | 1438 | print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1); |
| 1439 | - print "\n" . '<script type="text/javascript">'; |
|
| 1439 | + print "\n".'<script type="text/javascript">'; |
|
| 1440 | 1440 | print ' |
| 1441 | 1441 | $(document).ready(function () { |
| 1442 | 1442 | setDetailVisibility(); |
@@ -1453,8 +1453,8 @@ discard block |
||
| 1453 | 1453 | } |
| 1454 | 1454 | }); |
| 1455 | 1455 | '; |
| 1456 | - print '</script>' . "\n"; |
|
| 1457 | - print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>' . $langs->trans('AddDetailDateAndDuration') . '</span>'; |
|
| 1456 | + print '</script>'."\n"; |
|
| 1457 | + print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>'.$langs->trans('AddDetailDateAndDuration').'</span>'; |
|
| 1458 | 1458 | print '</td>'; |
| 1459 | 1459 | print '</tr>'; |
| 1460 | 1460 | |
@@ -1504,14 +1504,14 @@ discard block |
||
| 1504 | 1504 | |
| 1505 | 1505 | print '<br>'; |
| 1506 | 1506 | print '<div class="center">'; |
| 1507 | - print '<input type="submit" class="button" id="createbills" name="createbills" value="' . $langs->trans('GenerateBill') . '"> '; |
|
| 1508 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 1507 | + print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('GenerateBill').'"> '; |
|
| 1508 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 1509 | 1509 | print '</div>'; |
| 1510 | 1510 | print '<br>'; |
| 1511 | 1511 | } else { |
| 1512 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateInvoice") . '</div>'; |
|
| 1512 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateInvoice").'</div>'; |
|
| 1513 | 1513 | print '<div class="center">'; |
| 1514 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 1514 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 1515 | 1515 | print '</div>'; |
| 1516 | 1516 | $massaction = ''; |
| 1517 | 1517 | } |
@@ -1524,7 +1524,7 @@ discard block |
||
| 1524 | 1524 | print '<table class="noborder centpercent">'; |
| 1525 | 1525 | print '<tr>'; |
| 1526 | 1526 | print '<td class="titlefield">'; |
| 1527 | - print img_picto('', 'intervention', 'class="pictofixedwidth"') . $langs->trans('InterToUse'); |
|
| 1527 | + print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse'); |
|
| 1528 | 1528 | print '</td>'; |
| 1529 | 1529 | print '<td>'; |
| 1530 | 1530 | $forminter = new FormIntervention($db); |
@@ -1534,14 +1534,14 @@ discard block |
||
| 1534 | 1534 | print '</table>'; |
| 1535 | 1535 | |
| 1536 | 1536 | print '<div class="center">'; |
| 1537 | - print '<input type="submit" class="button" id="createinter" name="createinter" value="' . $langs->trans('GenerateInter') . '"> '; |
|
| 1538 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
| 1537 | + print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'"> '; |
|
| 1538 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
| 1539 | 1539 | print '</div>'; |
| 1540 | 1540 | print '<br>'; |
| 1541 | 1541 | } else { |
| 1542 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateIntervention") . '</div>'; |
|
| 1542 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateIntervention").'</div>'; |
|
| 1543 | 1543 | print '<div class="center">'; |
| 1544 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
| 1544 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
| 1545 | 1545 | print '</div>'; |
| 1546 | 1546 | $massaction = ''; |
| 1547 | 1547 | } |
@@ -1604,14 +1604,14 @@ discard block |
||
| 1604 | 1604 | $sql .= " AND t.fk_element =".((int) $object->id); |
| 1605 | 1605 | } elseif (!empty($projectidforalltimes)) { |
| 1606 | 1606 | // Limit on one project |
| 1607 | - $sql .= " AND pt.fk_projet IN (" . $db->sanitize($projectidforalltimes) . ")"; |
|
| 1607 | + $sql .= " AND pt.fk_projet IN (".$db->sanitize($projectidforalltimes).")"; |
|
| 1608 | 1608 | } elseif (!empty($allprojectforuser)) { |
| 1609 | 1609 | // Limit on on user |
| 1610 | 1610 | if (empty($search_user)) { |
| 1611 | 1611 | $search_user = $user->id; |
| 1612 | 1612 | } |
| 1613 | 1613 | if ($search_user > 0) { |
| 1614 | - $sql .= " AND t.fk_user = " . ((int) $search_user); |
|
| 1614 | + $sql .= " AND t.fk_user = ".((int) $search_user); |
|
| 1615 | 1615 | } |
| 1616 | 1616 | } |
| 1617 | 1617 | |
@@ -1664,13 +1664,13 @@ discard block |
||
| 1664 | 1664 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1665 | 1665 | $timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds |
| 1666 | 1666 | $timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds |
| 1667 | - $sql .= " AND t.element_duration >= " . $timespent_duration_start; |
|
| 1667 | + $sql .= " AND t.element_duration >= ".$timespent_duration_start; |
|
| 1668 | 1668 | } |
| 1669 | 1669 | |
| 1670 | 1670 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 1671 | 1671 | $timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds |
| 1672 | 1672 | $timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds |
| 1673 | - $sql .= " AND t.element_duration <= " . $timespent_duration_end; |
|
| 1673 | + $sql .= " AND t.element_duration <= ".$timespent_duration_end; |
|
| 1674 | 1674 | } |
| 1675 | 1675 | } |
| 1676 | 1676 | |
@@ -1718,13 +1718,13 @@ discard block |
||
| 1718 | 1718 | |
| 1719 | 1719 | if ($num >= 0) { |
| 1720 | 1720 | if (!empty($projectidforalltimes)) { |
| 1721 | - print '<!-- List of time spent for project -->' . "\n"; |
|
| 1721 | + print '<!-- List of time spent for project -->'."\n"; |
|
| 1722 | 1722 | |
| 1723 | 1723 | $title = $langs->trans("ListTaskTimeUserProject"); |
| 1724 | 1724 | |
| 1725 | 1725 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1); |
| 1726 | 1726 | } else { |
| 1727 | - print '<!-- List of time spent -->' . "\n"; |
|
| 1727 | + print '<!-- List of time spent -->'."\n"; |
|
| 1728 | 1728 | |
| 1729 | 1729 | $title = $langs->trans("ListTaskTimeForTask"); |
| 1730 | 1730 | |
@@ -1746,26 +1746,26 @@ discard block |
||
| 1746 | 1746 | * Form to add a new line of time spent |
| 1747 | 1747 | */ |
| 1748 | 1748 | if ($action == 'createtime' && $user->hasRight('projet', 'time')) { |
| 1749 | - print '<!-- table to add time spent -->' . "\n"; |
|
| 1749 | + print '<!-- table to add time spent -->'."\n"; |
|
| 1750 | 1750 | if (!empty($id)) { |
| 1751 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 1751 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 1752 | 1752 | } |
| 1753 | 1753 | |
| 1754 | 1754 | print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table |
| 1755 | 1755 | print '<table class="noborder nohover centpercent">'; |
| 1756 | 1756 | |
| 1757 | 1757 | print '<tr class="liste_titre">'; |
| 1758 | - print '<td>' . $langs->trans("Date") . '</td>'; |
|
| 1758 | + print '<td>'.$langs->trans("Date").'</td>'; |
|
| 1759 | 1759 | if (!empty($allprojectforuser)) { |
| 1760 | - print '<td>' . $langs->trans("Project") . '</td>'; |
|
| 1760 | + print '<td>'.$langs->trans("Project").'</td>'; |
|
| 1761 | 1761 | } |
| 1762 | 1762 | if (empty($id)) { |
| 1763 | - print '<td>' . $langs->trans("Task") . '</td>'; |
|
| 1763 | + print '<td>'.$langs->trans("Task").'</td>'; |
|
| 1764 | 1764 | } |
| 1765 | - print '<td>' . $langs->trans("By") . '</td>'; |
|
| 1766 | - print '<td>' . $langs->trans("Note") . '</td>'; |
|
| 1767 | - print '<td>' . $langs->trans("NewTimeSpent") . '</td>'; |
|
| 1768 | - print '<td>' . $langs->trans("ProgressDeclared") . '</td>'; |
|
| 1765 | + print '<td>'.$langs->trans("By").'</td>'; |
|
| 1766 | + print '<td>'.$langs->trans("Note").'</td>'; |
|
| 1767 | + print '<td>'.$langs->trans("NewTimeSpent").'</td>'; |
|
| 1768 | + print '<td>'.$langs->trans("ProgressDeclared").'</td>'; |
|
| 1769 | 1769 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 1770 | 1770 | print '<td></td>'; |
| 1771 | 1771 | |
@@ -1819,14 +1819,14 @@ discard block |
||
| 1819 | 1819 | print $form->select_dolusers((GETPOSTINT('userid') ? GETPOSTINT('userid') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200'); |
| 1820 | 1820 | } else { |
| 1821 | 1821 | if ($nboftasks) { |
| 1822 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1822 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1823 | 1823 | } |
| 1824 | 1824 | } |
| 1825 | 1825 | print '</td>'; |
| 1826 | 1826 | |
| 1827 | 1827 | // Note |
| 1828 | 1828 | print '<td>'; |
| 1829 | - print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>'; |
|
| 1829 | + print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>'; |
|
| 1830 | 1830 | print '</td>'; |
| 1831 | 1831 | |
| 1832 | 1832 | // Duration - Time spent |
@@ -1894,7 +1894,7 @@ discard block |
||
| 1894 | 1894 | $selectedfields .= (is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 1895 | 1895 | |
| 1896 | 1896 | print '<div class="div-table-responsive">'; |
| 1897 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
| 1897 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
| 1898 | 1898 | |
| 1899 | 1899 | // Fields title search |
| 1900 | 1900 | // -------------------------------------------------------------------- |
@@ -1919,20 +1919,20 @@ discard block |
||
| 1919 | 1919 | } |
| 1920 | 1920 | // Thirdparty |
| 1921 | 1921 | if (!empty($arrayfields['p.fk_soc']['checked'])) { |
| 1922 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>'; |
|
| 1922 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>'; |
|
| 1923 | 1923 | } |
| 1924 | 1924 | |
| 1925 | 1925 | // Thirdparty alias |
| 1926 | 1926 | if (!empty($arrayfields['s.name_alias']['checked'])) { |
| 1927 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>'; |
|
| 1927 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>'; |
|
| 1928 | 1928 | } |
| 1929 | 1929 | |
| 1930 | 1930 | if (!empty($allprojectforuser)) { |
| 1931 | 1931 | if (!empty($arrayfields['p.project_ref']['checked'])) { |
| 1932 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>'; |
|
| 1932 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; |
|
| 1933 | 1933 | } |
| 1934 | 1934 | if (!empty($arrayfields['p.project_label']['checked'])) { |
| 1935 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>'; |
|
| 1935 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>'; |
|
| 1936 | 1936 | } |
| 1937 | 1937 | } |
| 1938 | 1938 | // Task |
@@ -1950,7 +1950,7 @@ discard block |
||
| 1950 | 1950 | } |
| 1951 | 1951 | // Note |
| 1952 | 1952 | if (!empty($arrayfields['t.note']['checked'])) { |
| 1953 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>'; |
|
| 1953 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>'; |
|
| 1954 | 1954 | } |
| 1955 | 1955 | // Duration |
| 1956 | 1956 | if (!empty($arrayfields['t.element_duration']['checked'])) { |
@@ -1961,7 +1961,7 @@ discard block |
||
| 1961 | 1961 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1962 | 1962 | $durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60); |
| 1963 | 1963 | } |
| 1964 | - print '<div class="nowraponall">' . $langs->trans('from') . ' '; |
|
| 1964 | + print '<div class="nowraponall">'.$langs->trans('from').' '; |
|
| 1965 | 1965 | print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1); |
| 1966 | 1966 | print '</div>'; |
| 1967 | 1967 | |
@@ -1969,7 +1969,7 @@ discard block |
||
| 1969 | 1969 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 1970 | 1970 | $durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60); |
| 1971 | 1971 | } |
| 1972 | - print '<div class="nowraponall">' . $langs->trans('to') . ' '; |
|
| 1972 | + print '<div class="nowraponall">'.$langs->trans('to').' '; |
|
| 1973 | 1973 | print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1); |
| 1974 | 1974 | print '</div>'; |
| 1975 | 1975 | |
@@ -1985,7 +1985,7 @@ discard block |
||
| 1985 | 1985 | } |
| 1986 | 1986 | // Value billed |
| 1987 | 1987 | if (!empty($arrayfields['valuebilled']['checked'])) { |
| 1988 | - print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>'; |
|
| 1988 | + print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>'; |
|
| 1989 | 1989 | } |
| 1990 | 1990 | |
| 1991 | 1991 | /* |
@@ -2003,7 +2003,7 @@ discard block |
||
| 2003 | 2003 | print $searchpicto; |
| 2004 | 2004 | print '</td>'; |
| 2005 | 2005 | } |
| 2006 | - print '</tr>' . "\n"; |
|
| 2006 | + print '</tr>'."\n"; |
|
| 2007 | 2007 | |
| 2008 | 2008 | |
| 2009 | 2009 | $totalarray = array(); |
@@ -2117,7 +2117,7 @@ discard block |
||
| 2117 | 2117 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
| 2118 | 2118 | print '<td class="center nowraponall">'; |
| 2119 | 2119 | if (($action == 'editline' || $action == 'splitline') && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2120 | - print '<input type="hidden" name="lineid" value="' . GETPOSTINT('lineid') . '">'; |
|
| 2120 | + print '<input type="hidden" name="lineid" value="'.GETPOSTINT('lineid').'">'; |
|
| 2121 | 2121 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">'; |
| 2122 | 2122 | print '<br>'; |
| 2123 | 2123 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
@@ -2128,7 +2128,7 @@ discard block |
||
| 2128 | 2128 | print '</a>'; |
| 2129 | 2129 | |
| 2130 | 2130 | if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { |
| 2131 | - print '<a class="reposition editfielda paddingleft" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">'; |
|
| 2131 | + print '<a class="reposition editfielda paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; |
|
| 2132 | 2132 | print img_split('', 'class="pictofixedwidth paddingleft"'); |
| 2133 | 2133 | print '</a>'; |
| 2134 | 2134 | } |
@@ -2143,7 +2143,7 @@ discard block |
||
| 2143 | 2143 | $selected = 1; |
| 2144 | 2144 | } |
| 2145 | 2145 | print ' '; |
| 2146 | - print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2146 | + print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2147 | 2147 | } |
| 2148 | 2148 | } |
| 2149 | 2149 | } |
@@ -2262,7 +2262,7 @@ discard block |
||
| 2262 | 2262 | } |
| 2263 | 2263 | } |
| 2264 | 2264 | } elseif ($action !== 'createtime') { |
| 2265 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 2265 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 2266 | 2266 | } |
| 2267 | 2267 | |
| 2268 | 2268 | // Task label |
@@ -2291,9 +2291,9 @@ discard block |
||
| 2291 | 2291 | } |
| 2292 | 2292 | if (count($contactsoftask) > 0) { |
| 2293 | 2293 | print img_object('', 'user', 'class="pictofixedwidth hideonsmartphone"'); |
| 2294 | - print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'minwidth100 maxwidth100'); // maxwidth must be lowed than minwidth of the td |
|
| 2294 | + print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'minwidth100 maxwidth100'); // maxwidth must be lowed than minwidth of the td |
|
| 2295 | 2295 | } else { |
| 2296 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2296 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2297 | 2297 | } |
| 2298 | 2298 | } else { |
| 2299 | 2299 | $userstatic->id = $task_time->fk_user; |
@@ -2315,7 +2315,7 @@ discard block |
||
| 2315 | 2315 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2316 | 2316 | if ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2317 | 2317 | print '<td class="small">'; |
| 2318 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2318 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2319 | 2319 | print '</td>'; |
| 2320 | 2320 | } else { |
| 2321 | 2321 | print '<td class="small tdoverflowmax150 classfortooltip" title="'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($task_time->note)).'">'; |
@@ -2326,7 +2326,7 @@ discard block |
||
| 2326 | 2326 | $totalarray['nbfield']++; |
| 2327 | 2327 | } |
| 2328 | 2328 | } elseif ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2329 | - print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2329 | + print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2330 | 2330 | } |
| 2331 | 2331 | |
| 2332 | 2332 | // Time spent |
@@ -2387,7 +2387,7 @@ discard block |
||
| 2387 | 2387 | $value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1); |
| 2388 | 2388 | |
| 2389 | 2389 | print '<td class="nowraponall right">'; |
| 2390 | - print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">'; |
|
| 2390 | + print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">'; |
|
| 2391 | 2391 | print price($value, 1, $langs, 1, -1, -1, $conf->currency); |
| 2392 | 2392 | print '</span>'; |
| 2393 | 2393 | print '</td>'; |
@@ -2437,14 +2437,14 @@ discard block |
||
| 2437 | 2437 | } |
| 2438 | 2438 | $invoiced = true; |
| 2439 | 2439 | } else { |
| 2440 | - if ( intval($task_time->billable) == 1) { |
|
| 2440 | + if (intval($task_time->billable) == 1) { |
|
| 2441 | 2441 | print $langs->trans("No"); |
| 2442 | 2442 | } else { |
| 2443 | 2443 | print $langs->trans("Disabled"); |
| 2444 | 2444 | } |
| 2445 | 2445 | } |
| 2446 | 2446 | } else { |
| 2447 | - print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>'; |
|
| 2447 | + print '<span class="opacitymedium">'.$langs->trans("NA").'</span>'; |
|
| 2448 | 2448 | } |
| 2449 | 2449 | } |
| 2450 | 2450 | print '</td>'; |
@@ -2478,7 +2478,7 @@ discard block |
||
| 2478 | 2478 | print '</a>'; |
| 2479 | 2479 | |
| 2480 | 2480 | if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { |
| 2481 | - print '<a class="reposition editfielda paddingleft" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">'; |
|
| 2481 | + print '<a class="reposition editfielda paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; |
|
| 2482 | 2482 | print img_split('', 'class="pictofixedwidth paddingleft"'); |
| 2483 | 2483 | print '</a>'; |
| 2484 | 2484 | } |
@@ -2494,13 +2494,13 @@ discard block |
||
| 2494 | 2494 | } |
| 2495 | 2495 | print ' '; |
| 2496 | 2496 | // Disable select if task not billable or already invoiced |
| 2497 | - $disabled = (intval($task_time->billable) !=1 || $invoiced); |
|
| 2498 | - $ctrl = '<input '.($disabled?'disabled':'').' id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2497 | + $disabled = (intval($task_time->billable) != 1 || $invoiced); |
|
| 2498 | + $ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2499 | 2499 | if ($disabled) { |
| 2500 | 2500 | // If disabled, a dbl-click very close outside the control |
| 2501 | 2501 | // will re-enable it, so that user is not blocked if needed. |
| 2502 | - print '<span id="cbsp'. $task_time->rowid . '">'.$ctrl.'</span>'; |
|
| 2503 | - print '<script>$("#cbsp' . $task_time->rowid . '").dblclick(()=>{ $("#cb' . $task_time->rowid . '").removeAttr("disabled") })</script>'; |
|
| 2502 | + print '<span id="cbsp'.$task_time->rowid.'">'.$ctrl.'</span>'; |
|
| 2503 | + print '<script>$("#cbsp'.$task_time->rowid.'").dblclick(()=>{ $("#cb'.$task_time->rowid.'").removeAttr("disabled") })</script>'; |
|
| 2504 | 2504 | } else { |
| 2505 | 2505 | print $ctrl; |
| 2506 | 2506 | } |
@@ -2598,7 +2598,7 @@ discard block |
||
| 2598 | 2598 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2599 | 2599 | print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask); |
| 2600 | 2600 | } else { |
| 2601 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2601 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2602 | 2602 | } |
| 2603 | 2603 | } else { |
| 2604 | 2604 | $userstatic->id = $task_time->fk_user; |
@@ -2615,13 +2615,13 @@ discard block |
||
| 2615 | 2615 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2616 | 2616 | print '<td class="tdoverflowmax300">'; |
| 2617 | 2617 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2618 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2618 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2619 | 2619 | } else { |
| 2620 | 2620 | print dol_nl2br($task_time->note); |
| 2621 | 2621 | } |
| 2622 | 2622 | print '</td>'; |
| 2623 | 2623 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2624 | - print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_1 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2624 | + print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_1.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2625 | 2625 | } |
| 2626 | 2626 | |
| 2627 | 2627 | // Time spent |
@@ -2762,7 +2762,7 @@ discard block |
||
| 2762 | 2762 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2763 | 2763 | print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, '', 0, '', $contactsoftask); |
| 2764 | 2764 | } else { |
| 2765 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2765 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2766 | 2766 | } |
| 2767 | 2767 | } else { |
| 2768 | 2768 | $userstatic->id = $task_time->fk_user; |
@@ -2779,13 +2779,13 @@ discard block |
||
| 2779 | 2779 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2780 | 2780 | print '<td class="small tdoverflowmax300"">'; |
| 2781 | 2781 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2782 | - print '<textarea name="timespent_note_line_2" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2782 | + print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2783 | 2783 | } else { |
| 2784 | 2784 | print dol_nl2br($task_time->note); |
| 2785 | 2785 | } |
| 2786 | 2786 | print '</td>'; |
| 2787 | 2787 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2788 | - print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2788 | + print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2789 | 2789 | } |
| 2790 | 2790 | |
| 2791 | 2791 | // Time spent |
@@ -2859,14 +2859,14 @@ discard block |
||
| 2859 | 2859 | $i++; |
| 2860 | 2860 | if ($i == 1) { |
| 2861 | 2861 | if ($num < $limit && empty($offset)) { |
| 2862 | - print '<td class="left">' . $langs->trans("Total") . '</td>'; |
|
| 2862 | + print '<td class="left">'.$langs->trans("Total").'</td>'; |
|
| 2863 | 2863 | } else { |
| 2864 | 2864 | print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>'; |
| 2865 | 2865 | } |
| 2866 | 2866 | } elseif (isset($totalarray['totaldurationfield']) && $totalarray['totaldurationfield'] == $i) { |
| 2867 | - print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>'; |
|
| 2867 | + print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>'; |
|
| 2868 | 2868 | } elseif (isset($totalarray['totalvaluefield']) && $totalarray['totalvaluefield'] == $i) { |
| 2869 | - print '<td class="right">' . price($totalarray['totalvalue']) . '</td>'; |
|
| 2869 | + print '<td class="right">'.price($totalarray['totalvalue']).'</td>'; |
|
| 2870 | 2870 | //} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>'; |
| 2871 | 2871 | } else { |
| 2872 | 2872 | print '<td></td>'; |
@@ -2882,8 +2882,8 @@ discard block |
||
| 2882 | 2882 | $totalnboffields++; |
| 2883 | 2883 | } |
| 2884 | 2884 | } |
| 2885 | - print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">'; |
|
| 2886 | - print '<span class="opacitymedium">' . $langs->trans("None") . '</span>'; |
|
| 2885 | + print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">'; |
|
| 2886 | + print '<span class="opacitymedium">'.$langs->trans("None").'</span>'; |
|
| 2887 | 2887 | print '</td></tr>'; |
| 2888 | 2888 | } |
| 2889 | 2889 | |
@@ -859,7 +859,7 @@ discard block |
||
| 859 | 859 | print '<td class="nowraponall">'; |
| 860 | 860 | $propal_static->id = $objp->propalid; |
| 861 | 861 | $propal_static->ref = $objp->ref; |
| 862 | - $propal_static->ref_client = $objp->ref_client; // deprecated |
|
| 862 | + $propal_static->ref_client = $objp->ref_client; // deprecated |
|
| 863 | 863 | $propal_static->ref_customer = $objp->ref_client; |
| 864 | 864 | $propal_static->total_ht = $objp->total_ht; |
| 865 | 865 | $propal_static->total_tva = $objp->total_tva; |
@@ -918,7 +918,7 @@ discard block |
||
| 918 | 918 | * Latest orders |
| 919 | 919 | */ |
| 920 | 920 | if (isModEnabled('order') && $user->hasRight('commande', 'lire')) { |
| 921 | - $param =""; |
|
| 921 | + $param = ""; |
|
| 922 | 922 | |
| 923 | 923 | $sql = "SELECT s.nom, s.rowid"; |
| 924 | 924 | $sql .= ", c.rowid as cid, c.entity, c.total_ht"; |
@@ -1211,7 +1211,7 @@ discard block |
||
| 1211 | 1211 | print $late; |
| 1212 | 1212 | print "</td>\n"; |
| 1213 | 1213 | print '<td class="nowrap">'; |
| 1214 | - print dol_trunc(strtolower(get_class($object)) == strtolower(Client::class) ? $objp->refcus : $objp->refsup, 12); |
|
| 1214 | + print dol_trunc(strtolower(get_class($object)) == strtolower(Client::class) ? $objp->refcus : $objp->refsup, 12); |
|
| 1215 | 1215 | print "</td>\n"; |
| 1216 | 1216 | //print '<td class="right" width="80px"><span title="'.$langs->trans("DateCreation").'">'.dol_print_date($db->jdate($objp->dc), 'day')."</span></td>\n"; |
| 1217 | 1217 | print '<td class="right" width="80px"><span title="'.$langs->trans("DateContract").'">'.dol_print_date($db->jdate($objp->dcon), 'day')."</span></td>\n"; |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * \brief File of context class for WebPortal |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -require_once __DIR__ . '/controller.class.php'; |
|
| 27 | -require_once __DIR__ . '/webPortalTheme.class.php'; |
|
| 26 | +require_once __DIR__.'/controller.class.php'; |
|
| 27 | +require_once __DIR__.'/webPortalTheme.class.php'; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * Class Context |
@@ -161,16 +161,16 @@ discard block |
||
| 161 | 161 | |
| 162 | 162 | $this->db = $db; |
| 163 | 163 | |
| 164 | - $this->tplDir = __DIR__ . '/../'; |
|
| 164 | + $this->tplDir = __DIR__.'/../'; |
|
| 165 | 165 | |
| 166 | 166 | $this->getControllerUrl(); |
| 167 | 167 | |
| 168 | 168 | $this->topMenu = new stdClass(); |
| 169 | 169 | |
| 170 | - $this->tplPath = realpath(__DIR__ . '/../../public/webportal/tpl'); |
|
| 170 | + $this->tplPath = realpath(__DIR__.'/../../public/webportal/tpl'); |
|
| 171 | 171 | |
| 172 | 172 | $this->controller = GETPOST('controller', 'aZ09'); // for security, limited to 'aZ09' |
| 173 | - $this->action = GETPOST('action', 'aZ09');// for security, limited to 'aZ09' |
|
| 173 | + $this->action = GETPOST('action', 'aZ09'); // for security, limited to 'aZ09' |
|
| 174 | 174 | |
| 175 | 175 | if (empty($this->controller)) { |
| 176 | 176 | $this->controller = 'default'; |
@@ -212,17 +212,17 @@ discard block |
||
| 212 | 212 | { |
| 213 | 213 | global $db; |
| 214 | 214 | |
| 215 | - $defaultControllersPath = __DIR__ . '/../controllers/'; |
|
| 215 | + $defaultControllersPath = __DIR__.'/../controllers/'; |
|
| 216 | 216 | |
| 217 | 217 | // define controllers definition |
| 218 | - $this->addControllerDefinition('login', $defaultControllersPath . 'login.controller.class.php', 'LoginController'); |
|
| 219 | - $this->addControllerDefinition('default', $defaultControllersPath . 'default.controller.class.php', 'DefaultController'); |
|
| 220 | - $this->addControllerDefinition('document', $defaultControllersPath . 'document.controller.class.php', 'DocumentController'); |
|
| 221 | - $this->addControllerDefinition('propallist', $defaultControllersPath . 'propallist.controller.class.php', 'PropalListController'); |
|
| 222 | - $this->addControllerDefinition('orderlist', $defaultControllersPath . 'orderlist.controller.class.php', 'OrderListController'); |
|
| 223 | - $this->addControllerDefinition('invoicelist', $defaultControllersPath . 'invoicelist.controller.class.php', 'InvoiceListController'); |
|
| 224 | - $this->addControllerDefinition('membercard', $defaultControllersPath . 'membercard.controller.class.php', 'MemberCardController'); |
|
| 225 | - $this->addControllerDefinition('partnershipcard', $defaultControllersPath . 'partnershipcard.controller.class.php', 'PartnershipCardController'); |
|
| 218 | + $this->addControllerDefinition('login', $defaultControllersPath.'login.controller.class.php', 'LoginController'); |
|
| 219 | + $this->addControllerDefinition('default', $defaultControllersPath.'default.controller.class.php', 'DefaultController'); |
|
| 220 | + $this->addControllerDefinition('document', $defaultControllersPath.'document.controller.class.php', 'DocumentController'); |
|
| 221 | + $this->addControllerDefinition('propallist', $defaultControllersPath.'propallist.controller.class.php', 'PropalListController'); |
|
| 222 | + $this->addControllerDefinition('orderlist', $defaultControllersPath.'orderlist.controller.class.php', 'OrderListController'); |
|
| 223 | + $this->addControllerDefinition('invoicelist', $defaultControllersPath.'invoicelist.controller.class.php', 'InvoiceListController'); |
|
| 224 | + $this->addControllerDefinition('membercard', $defaultControllersPath.'membercard.controller.class.php', 'MemberCardController'); |
|
| 225 | + $this->addControllerDefinition('partnershipcard', $defaultControllersPath.'partnershipcard.controller.class.php', 'PartnershipCardController'); |
|
| 226 | 226 | |
| 227 | 227 | // call triggers |
| 228 | 228 | //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | $length = strlen($needle); |
| 257 | 257 | $isControllerFile = $length > 0 ? substr($fileName, -$length) === $needle : true; |
| 258 | 258 | if (!$isControllerFile) { |
| 259 | - $this->setError('Error: controller definition ' . $fileName); |
|
| 259 | + $this->setError('Error: controller definition '.$fileName); |
|
| 260 | 260 | return false; |
| 261 | 261 | } |
| 262 | 262 | |
@@ -378,9 +378,9 @@ discard block |
||
| 378 | 378 | if (!empty($Tparams)) { |
| 379 | 379 | $TCompiledAttr = array(); |
| 380 | 380 | foreach ($Tparams as $key => $value) { |
| 381 | - $TCompiledAttr[] = $key . '=' . $value; |
|
| 381 | + $TCompiledAttr[] = $key.'='.$value; |
|
| 382 | 382 | } |
| 383 | - $url .= '?' . implode("&", $TCompiledAttr); |
|
| 383 | + $url .= '?'.implode("&", $TCompiledAttr); |
|
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | // if $moreParams is a string |
@@ -412,13 +412,13 @@ discard block |
||
| 412 | 412 | |
| 413 | 413 | $ssl = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on'); |
| 414 | 414 | $sp = strtolower($s['SERVER_PROTOCOL']); |
| 415 | - $protocol = substr($sp, 0, strpos($sp, '/')) . (($ssl) ? 's' : ''); |
|
| 415 | + $protocol = substr($sp, 0, strpos($sp, '/')).(($ssl) ? 's' : ''); |
|
| 416 | 416 | $port = $s['SERVER_PORT']; |
| 417 | - $port = ((!$ssl && $port == '80') || ($ssl && $port == '443')) ? '' : ':' . $port; |
|
| 417 | + $port = ((!$ssl && $port == '80') || ($ssl && $port == '443')) ? '' : ':'.$port; |
|
| 418 | 418 | $host = ($use_forwarded_host && isset($s['HTTP_X_FORWARDED_HOST'])) ? $s['HTTP_X_FORWARDED_HOST'] : (isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : null); |
| 419 | - $host = isset($host) ? $host : $s['SERVER_NAME'] . $port; |
|
| 419 | + $host = isset($host) ? $host : $s['SERVER_NAME'].$port; |
|
| 420 | 420 | |
| 421 | - $url = $protocol . '://' . $host; |
|
| 421 | + $url = $protocol.'://'.$host; |
|
| 422 | 422 | |
| 423 | 423 | if ($withRequestUri) { |
| 424 | 424 | $url .= $s['REQUEST_URI']; |
@@ -543,10 +543,10 @@ discard block |
||
| 543 | 543 | public function setEventMessages($mesg, $mesgs, $style = 'mesgs') |
| 544 | 544 | { |
| 545 | 545 | if (empty($mesg) && empty($mesgs)) { |
| 546 | - dol_syslog(__METHOD__ . ' Try to add a message in stack, but value to add is empty message', LOG_WARNING); |
|
| 546 | + dol_syslog(__METHOD__.' Try to add a message in stack, but value to add is empty message', LOG_WARNING); |
|
| 547 | 547 | } else { |
| 548 | 548 | if (!in_array((string) $style, array('mesgs', 'warnings', 'errors'))) { |
| 549 | - dol_print_error(null, 'Bad parameter style=' . $style . ' for setEventMessages'); |
|
| 549 | + dol_print_error(null, 'Bad parameter style='.$style.' for setEventMessages'); |
|
| 550 | 550 | } |
| 551 | 551 | if (empty($mesgs)) { |
| 552 | 552 | $this->setEventMessage($mesg, $style); |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | { |
| 632 | 632 | $token = $this->newToken(); |
| 633 | 633 | if ($token) { |
| 634 | - return '&' . $this->tokenKey . '=' . $this->newToken(); |
|
| 634 | + return '&'.$this->tokenKey.'='.$this->newToken(); |
|
| 635 | 635 | } |
| 636 | 636 | |
| 637 | 637 | return null; |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | { |
| 647 | 647 | $token = $this->newToken(); |
| 648 | 648 | if ($token) { |
| 649 | - return '<input type="hidden" name="' . $this->tokenKey . '" value="' . $this->newToken() . '" />'; |
|
| 649 | + return '<input type="hidden" name="'.$this->tokenKey.'" value="'.$this->newToken().'" />'; |
|
| 650 | 650 | } |
| 651 | 651 | |
| 652 | 652 | return null; |
@@ -664,14 +664,14 @@ discard block |
||
| 664 | 664 | $id = 0; |
| 665 | 665 | |
| 666 | 666 | $sql = "SELECT sa.rowid as id, sa.pass_crypted"; |
| 667 | - $sql .= " FROM " . $this->db->prefix() . "societe_account as sa"; |
|
| 668 | - $sql .= " WHERE BINARY sa.login = '" . $this->db->escape($login) . "'"; // case sensitive |
|
| 667 | + $sql .= " FROM ".$this->db->prefix()."societe_account as sa"; |
|
| 668 | + $sql .= " WHERE BINARY sa.login = '".$this->db->escape($login)."'"; // case sensitive |
|
| 669 | 669 | //$sql .= " AND BINARY sa.pass_crypted = '" . $this->db->escape($pass) . "'"; // case sensitive |
| 670 | 670 | $sql .= " AND sa.site = 'dolibarr_portal'"; |
| 671 | 671 | $sql .= " AND sa.status = 1"; |
| 672 | - $sql .= " AND sa.entity IN (" . getEntity('societe') . ")"; |
|
| 672 | + $sql .= " AND sa.entity IN (".getEntity('societe').")"; |
|
| 673 | 673 | |
| 674 | - dol_syslog(__METHOD__ . ' Try to find the third-party account id for login"' . $login . '" and site="dolibarr_portal"', LOG_DEBUG); |
|
| 674 | + dol_syslog(__METHOD__.' Try to find the third-party account id for login"'.$login.'" and site="dolibarr_portal"', LOG_DEBUG); |
|
| 675 | 675 | $result = $this->db->query($sql); |
| 676 | 676 | if ($result) { |
| 677 | 677 | if ($this->db->num_rows($result) == 1) { |
@@ -702,13 +702,13 @@ discard block |
||
| 702 | 702 | if ($passok) { |
| 703 | 703 | $id = $obj->id; |
| 704 | 704 | } else { |
| 705 | - dol_syslog(__METHOD__ .' Authentication KO bad password for ' . $login . ', cryptType=' . $cryptType, LOG_NOTICE); |
|
| 705 | + dol_syslog(__METHOD__.' Authentication KO bad password for '.$login.', cryptType='.$cryptType, LOG_NOTICE); |
|
| 706 | 706 | sleep(1); // Brut force protection. Must be same delay when login is not valid |
| 707 | 707 | return -3; |
| 708 | 708 | } |
| 709 | 709 | } |
| 710 | 710 | } else { |
| 711 | - dol_syslog(__METHOD__ . ' Many third-party account found for login"' . $login . '" and site="dolibarr_portal"', LOG_ERR); |
|
| 711 | + dol_syslog(__METHOD__.' Many third-party account found for login"'.$login.'" and site="dolibarr_portal"', LOG_ERR); |
|
| 712 | 712 | return -2; |
| 713 | 713 | } |
| 714 | 714 | } else { |
@@ -99,8 +99,8 @@ |
||
| 99 | 99 | { |
| 100 | 100 | global $db, $langs; |
| 101 | 101 | |
| 102 | - require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; |
|
| 103 | - require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; |
|
| 102 | + require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; |
|
| 103 | + require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; |
|
| 104 | 104 | |
| 105 | 105 | $shipment = new Expedition($db); |
| 106 | 106 | $shipment->initAsSpecimen(); |
@@ -109,8 +109,8 @@ |
||
| 109 | 109 | { |
| 110 | 110 | global $db, $langs; |
| 111 | 111 | |
| 112 | - require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; |
|
| 113 | - require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; |
|
| 112 | + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; |
|
| 113 | + require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; |
|
| 114 | 114 | |
| 115 | 115 | $propal = new Propal($db); |
| 116 | 116 | $propal->initAsSpecimen(); |