@@ -240,7 +240,9 @@ |
||
| 240 | 240 | if (empty($nocommentremoval)) { |
| 241 | 241 | $buf = preg_replace('/([,;ERLT\)])\s*--.*$/i', '\1', $buf); //remove comment from a line that not start with -- before add it to the buffer |
| 242 | 242 | } |
| 243 | - if ($buffer) $buffer .= ' '; |
|
| 243 | + if ($buffer) { |
|
| 244 | + $buffer .= ' '; |
|
| 245 | + } |
|
| 244 | 246 | $buffer .= trim($buf); |
| 245 | 247 | } |
| 246 | 248 | |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | if ($sql) { |
| 329 | 329 | // Test if th SQL is allowed SQL |
| 330 | 330 | if ($onlysqltoimportwebsite) { |
| 331 | - $newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' char |
|
| 331 | + $newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' char |
|
| 332 | 332 | |
| 333 | 333 | // Remove all strings contents including the ' so we can analyse SQL instruction only later |
| 334 | 334 | $l = strlen($newsql); |
@@ -1067,7 +1067,7 @@ discard block |
||
| 1067 | 1067 | |
| 1068 | 1068 | if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session |
| 1069 | 1069 | preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues) && // limit to current entity |
| 1070 | - preg_match('/dol_company\|s:([0-9]+):"(' . getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name |
|
| 1070 | + preg_match('/dol_company\|s:([0-9]+):"('.getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name |
|
| 1071 | 1071 | $tmp = explode('_', $file); |
| 1072 | 1072 | $idsess = $tmp[1]; |
| 1073 | 1073 | // We remove session if it's not ourself |
@@ -1230,7 +1230,7 @@ discard block |
||
| 1230 | 1230 | |
| 1231 | 1231 | if (!count($ret['errors'])) { |
| 1232 | 1232 | $ret['nbmodules']++; |
| 1233 | - $ret['nbperms'] += (is_array($objMod->rights)?count($objMod->rights):0); |
|
| 1233 | + $ret['nbperms'] += (is_array($objMod->rights) ?count($objMod->rights) : 0); |
|
| 1234 | 1234 | } |
| 1235 | 1235 | |
| 1236 | 1236 | return $ret; |
@@ -1870,7 +1870,7 @@ discard block |
||
| 1870 | 1870 | global $conf, $langs; |
| 1871 | 1871 | |
| 1872 | 1872 | $text = $langs->trans("OnlyFollowingModulesAreOpenedToExternalUsers"); |
| 1873 | - $listofmodules = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); // List of modules qualified for external user management |
|
| 1873 | + $listofmodules = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); // List of modules qualified for external user management |
|
| 1874 | 1874 | |
| 1875 | 1875 | $i = 0; |
| 1876 | 1876 | if (!empty($modules)) { |
@@ -373,7 +373,7 @@ |
||
| 373 | 373 | $caction = new CActionComm($this->db); |
| 374 | 374 | |
| 375 | 375 | // Suggest a list with manual events or all auto events |
| 376 | - $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by. |
|
| 376 | + $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by. |
|
| 377 | 377 | if (empty($multiselect)) { |
| 378 | 378 | // Add empty line at start only if no multiselect |
| 379 | 379 | array_unshift($arraylist, ' '); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | //Calcul total qty and amount for global if full scan list |
| 130 | 130 | $total_qty_toconsume = 0; |
| 131 | 131 | $total_qty_toproduce = 0; |
| 132 | - $product_cache=array(); |
|
| 132 | + $product_cache = array(); |
|
| 133 | 133 | $bom_data_result = array(); |
| 134 | 134 | |
| 135 | 135 | //Qauntity to produce |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | } |
| 180 | 180 | $bomtmp->fk_product = $objp->fk_product; |
| 181 | 181 | $bom_data_result[$objp->rowid]['link'] = $bomtmp->getNomUrl(1, 'production'); |
| 182 | - $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache)? $product_cache[$objp->fk_product]->getNomUrl(1): ''); |
|
| 182 | + $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache) ? $product_cache[$objp->fk_product]->getNomUrl(1) : ''); |
|
| 183 | 183 | $bom_data_result[$objp->rowid]['qty_toproduce'] += ($objp->qty_toproduce > 0 ? $objp->qty_toproduce : 0); |
| 184 | 184 | $bom_data_result[$objp->rowid]['qty_toconsume'] = 0; |
| 185 | 185 | $bom_data_result[$objp->rowid]['date_valid'] = dol_print_date($db->jdate($objp->date_valid), 'dayhour'); |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | |
| 243 | 243 | if (!array_key_exists($objp->rowid, $bom_data_result)) { |
| 244 | 244 | $bom_data_result[$objp->rowid]['link'] = $bomtmp->getNomUrl(1, 'production'); |
| 245 | - $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache)? $product_cache[$objp->fk_product]->getNomUrl(1): ''); |
|
| 245 | + $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache) ? $product_cache[$objp->fk_product]->getNomUrl(1) : ''); |
|
| 246 | 246 | $bom_data_result[$objp->rowid]['qty_toproduce'] = 0; |
| 247 | 247 | $bom_data_result[$objp->rowid]['qty_toconsume'] += ($objp->qty_toconsume > 0 ? $objp->qty_toconsume : 0); |
| 248 | 248 | $bom_data_result[$objp->rowid]['date_valid'] = dol_print_date($db->jdate($objp->date_valid), 'dayhour'); |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | } else { |
| 81 | 81 | dol_print_error($db); |
| 82 | 82 | } |
| 83 | - dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 83 | + dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
| 84 | 84 | } |
| 85 | 85 | $head[$tab][0] = DOL_URL_ROOT.'/contact/project.php?id='.$object->id; |
| 86 | 86 | $head[$tab][1] = $langs->trans("Projects"); |
@@ -61,7 +61,9 @@ |
||
| 61 | 61 | |
| 62 | 62 | // Security check |
| 63 | 63 | $id = GETPOST("id", 'int'); |
| 64 | -if ($user->socid > 0) $socid = $user->socid; |
|
| 64 | +if ($user->socid > 0) { |
|
| 65 | + $socid = $user->socid; |
|
| 66 | +} |
|
| 65 | 67 | $result = restrictedArea($user, 'ticket', $object->id, ''); |
| 66 | 68 | |
| 67 | 69 | // restrict access for externals users |
@@ -88,21 +88,21 @@ discard block |
||
| 88 | 88 | $error = 0; |
| 89 | 89 | |
| 90 | 90 | $codecontact = dol_getIdFromCode($db, $typeid, 'c_type_contact', 'rowid', 'code'); |
| 91 | - if ($codecontact=='SUPPORTTEC') { |
|
| 91 | + if ($codecontact == 'SUPPORTTEC') { |
|
| 92 | 92 | $internal_contacts = $object->listeContact(-1, 'internal', 0, 'SUPPORTTEC'); |
| 93 | 93 | foreach ($internal_contacts as $key => $contact) { |
| 94 | 94 | if ($contact['id'] !== $contactid) { |
| 95 | 95 | //print "user à effacer : ".$useroriginassign; |
| 96 | 96 | $result = $object->delete_contact($contact['rowid']); |
| 97 | - if ($result<0) { |
|
| 98 | - $error ++; |
|
| 97 | + if ($result < 0) { |
|
| 98 | + $error++; |
|
| 99 | 99 | setEventMessages($object->error, $object->errors, 'errors'); |
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | $ret = $object->assignUser($user, $contactid); |
| 104 | 104 | if ($ret < 0) { |
| 105 | - $error ++; |
|
| 105 | + $error++; |
|
| 106 | 106 | setEventMessages($object->error, $object->errors, 'errors'); |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -139,10 +139,10 @@ discard block |
||
| 139 | 139 | if ($object->fetch($id, '', $track_id)) { |
| 140 | 140 | $internal_contacts = $object->listeContact(-1, 'internal', 0, 'SUPPORTTEC'); |
| 141 | 141 | foreach ($internal_contacts as $key => $contact) { |
| 142 | - if ($contact['rowid'] == $lineid && $object->fk_user_assign==$contact['id']) { |
|
| 142 | + if ($contact['rowid'] == $lineid && $object->fk_user_assign == $contact['id']) { |
|
| 143 | 143 | $ret = $object->assignUser($user, null); |
| 144 | 144 | if ($ret < 0) { |
| 145 | - $error ++; |
|
| 145 | + $error++; |
|
| 146 | 146 | setEventMessages($object->error, $object->errors, 'errors'); |
| 147 | 147 | } |
| 148 | 148 | } |
@@ -115,7 +115,9 @@ |
||
| 115 | 115 | $url_page_current = DOL_URL_ROOT.'/ticket/card.php'; |
| 116 | 116 | |
| 117 | 117 | // Security check - Protection if external user |
| 118 | -if ($user->socid > 0) $socid = $user->socid; |
|
| 118 | +if ($user->socid > 0) { |
|
| 119 | + $socid = $user->socid; |
|
| 120 | +} |
|
| 119 | 121 | $result = restrictedArea($user, 'ticket', $object->id); |
| 120 | 122 | |
| 121 | 123 | $triggermodname = 'TICKET_MODIFY'; |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | $object->ref = $getRef; |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | - $object->fk_soc = $object->socid = GETPOST("socid", 'int') > 0 ? GETPOST("socid", 'int') : 0; |
|
| 229 | + $object->fk_soc = $object->socid = GETPOST("socid", 'int') > 0 ? GETPOST("socid", 'int') : 0; |
|
| 230 | 230 | $object->subject = GETPOST("subject", 'alphanohtml'); |
| 231 | 231 | $object->message = GETPOST("message", 'restricthtml'); |
| 232 | 232 | |
@@ -237,20 +237,20 @@ discard block |
||
| 237 | 237 | $object->severity_code = GETPOST("severity_code", 'alpha'); |
| 238 | 238 | $object->severity_label = $langs->trans($langs->getLabelFromKey($db, $object->severity_code, 'c_ticket_severity', 'code', 'label')); |
| 239 | 239 | $object->fk_user_create = $user->id; |
| 240 | - $object->email_from = $user->email; |
|
| 241 | - $object->origin_email = null; |
|
| 240 | + $object->email_from = $user->email; |
|
| 241 | + $object->origin_email = null; |
|
| 242 | 242 | |
| 243 | - $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); |
|
| 244 | - $object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1; |
|
| 243 | + $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); |
|
| 244 | + $object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1; |
|
| 245 | 245 | |
| 246 | 246 | $fk_user_assign = GETPOST("fk_user_assign", 'int'); |
| 247 | 247 | if ($fk_user_assign > 0) { |
| 248 | - $object->fk_user_assign = $fk_user_assign; |
|
| 248 | + $object->fk_user_assign = $fk_user_assign; |
|
| 249 | 249 | $object->status = $object::STATUS_ASSIGNED; |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | - $object->fk_project = $projectid; |
|
| 253 | - $object->fk_contract = GETPOST('fk_contract', 'int'); |
|
| 252 | + $object->fk_project = $projectid; |
|
| 253 | + $object->fk_contract = GETPOST('fk_contract', 'int'); |
|
| 254 | 254 | |
| 255 | 255 | |
| 256 | 256 | $id = $object->create($user); |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | |
| 288 | 288 | // Auto mark as read if created from backend |
| 289 | 289 | if (!empty($conf->global->TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND) && $user->hasRight('ticket', 'write')) { |
| 290 | - if ( ! $object->markAsRead($user) > 0) { |
|
| 290 | + if (!$object->markAsRead($user) > 0) { |
|
| 291 | 291 | setEventMessages($object->error, $object->errors, 'errors'); |
| 292 | 292 | } |
| 293 | 293 | } |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | |
| 302 | 302 | if (!$error) { |
| 303 | 303 | // File transfer |
| 304 | - $object->copyFilesForTicket(''); // trackid is forced to '' because files were uploaded when no id for ticket exists yet and trackid was '' |
|
| 304 | + $object->copyFilesForTicket(''); // trackid is forced to '' because files were uploaded when no id for ticket exists yet and trackid was '' |
|
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | if (!$error) { |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | foreach ($internal_contacts as $key => $contact) { |
| 435 | 435 | if ($contact['id'] !== $usertoassign) { |
| 436 | 436 | $result = $object->delete_contact($contact['rowid']); |
| 437 | - if ($result<0) { |
|
| 437 | + if ($result < 0) { |
|
| 438 | 438 | $error++; |
| 439 | 439 | setEventMessages($object->error, $object->errors, 'errors'); |
| 440 | 440 | } |
@@ -442,9 +442,9 @@ discard block |
||
| 442 | 442 | } |
| 443 | 443 | } |
| 444 | 444 | |
| 445 | - if ($usertoassign > 0 && $usertoassign!==$useroriginassign) { |
|
| 445 | + if ($usertoassign > 0 && $usertoassign !== $useroriginassign) { |
|
| 446 | 446 | $result = $object->add_contact($usertoassign, "SUPPORTTEC", 'internal', $notrigger = 0); |
| 447 | - if ($result<0) { |
|
| 447 | + if ($result < 0) { |
|
| 448 | 448 | $error++; |
| 449 | 449 | setEventMessages($object->error, $object->errors, 'errors'); |
| 450 | 450 | } |
@@ -738,7 +738,7 @@ discard block |
||
| 738 | 738 | |
| 739 | 739 | print load_fiche_titre($langs->trans('NewTicket'), '', 'ticket'); |
| 740 | 740 | |
| 741 | - $formticket->trackid = ''; // TODO Use a unique key 'tic' to avoid conflict in upload file feature |
|
| 741 | + $formticket->trackid = ''; // TODO Use a unique key 'tic' to avoid conflict in upload file feature |
|
| 742 | 742 | $formticket->withfromsocid = $socid ? $socid : $user->socid; |
| 743 | 743 | $formticket->withfromcontactid = $contactid ? $contactid : ''; |
| 744 | 744 | $formticket->withtitletopic = 1; |
@@ -805,7 +805,7 @@ discard block |
||
| 805 | 805 | |
| 806 | 806 | print '</form>'; */ |
| 807 | 807 | } elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'presend' || $action == 'presend_addmessage' || $action == 'close' || $action == 'abandon' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'categories' || $action == 'reopen' |
| 808 | - || $action== 'edit_contrat' || $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink') { |
|
| 808 | + || $action == 'edit_contrat' || $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink') { |
|
| 809 | 809 | if ($res > 0) { |
| 810 | 810 | // or for unauthorized internals users |
| 811 | 811 | if (!$user->socid && (!empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY) && $object->fk_user_assign != $user->id) && !$user->hasRight('ticket', 'manage')) { |
@@ -820,7 +820,7 @@ discard block |
||
| 820 | 820 | '-3' => $langs->trans('TicketNotNotifyTiersAtClose') |
| 821 | 821 | ); |
| 822 | 822 | foreach ($thirdparty_contacts as $thirdparty_contact) { |
| 823 | - $contacts_select[$thirdparty_contact['id']] = $thirdparty_contact['civility'] . ' ' . $thirdparty_contact['lastname'] . ' ' . $thirdparty_contact['firstname']; |
|
| 823 | + $contacts_select[$thirdparty_contact['id']] = $thirdparty_contact['civility'].' '.$thirdparty_contact['lastname'].' '.$thirdparty_contact['firstname']; |
|
| 824 | 824 | } |
| 825 | 825 | |
| 826 | 826 | // Default select all or no contact |
@@ -1013,8 +1013,8 @@ discard block |
||
| 1013 | 1013 | $morehtmlref .= $formcontract->formSelectContract($_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $object->fk_contract, 'contratid', 0, 1, 1, 1); |
| 1014 | 1014 | } else { |
| 1015 | 1015 | $morehtmlref .= '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit_contrat&token='.newToken().'&id='.$object->id.'">'; |
| 1016 | - $morehtmlref .= img_edit($langs->trans('SetContract')); |
|
| 1017 | - $morehtmlref .= '</a>'; |
|
| 1016 | + $morehtmlref .= img_edit($langs->trans('SetContract')); |
|
| 1017 | + $morehtmlref .= '</a>'; |
|
| 1018 | 1018 | } |
| 1019 | 1019 | } else { |
| 1020 | 1020 | if (!empty($object->fk_contract)) { |
@@ -1120,7 +1120,7 @@ discard block |
||
| 1120 | 1120 | print '<input type="hidden" name="action" value="assign_user">'; |
| 1121 | 1121 | print '<input type="hidden" name="track_id" value="'.$object->track_id.'">'; |
| 1122 | 1122 | //print '<label for="fk_user_assign">'.$langs->trans("AssignUser").'</label> '; |
| 1123 | - print $form->select_dolusers(empty($object->fk_user_assign)?$user->id:$object->fk_user_assign, 'fk_user_assign', 1); |
|
| 1123 | + print $form->select_dolusers(empty($object->fk_user_assign) ? $user->id : $object->fk_user_assign, 'fk_user_assign', 1); |
|
| 1124 | 1124 | print ' <input type="submit" class="button small" name="btn_assign_user" value="'.$langs->trans("Validate").'" />'; |
| 1125 | 1125 | print '</form>'; |
| 1126 | 1126 | } |
@@ -1459,10 +1459,10 @@ discard block |
||
| 1459 | 1459 | // Link to create an intervention |
| 1460 | 1460 | // socid is needed otherwise fichinter ask it and forgot origin after form submit :\ |
| 1461 | 1461 | if (!$object->fk_soc && $user->hasRight("ficheinter", "creer")) { |
| 1462 | - print dolGetButtonAction($langs->trans('UnableToCreateInterIfNoSocid'), $langs->trans('TicketAddIntervention'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 1462 | + print dolGetButtonAction($langs->trans('UnableToCreateInterIfNoSocid'), $langs->trans('TicketAddIntervention'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 1463 | 1463 | } |
| 1464 | 1464 | if ($object->fk_soc > 0 && isset($object->status) && $object->status < Ticket::STATUS_CLOSED && $user->hasRight('ficheinter', 'creer')) { |
| 1465 | - print dolGetButtonAction('', $langs->trans('TicketAddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&token='.newToken().'&socid='. $object->fk_soc.'&origin=ticket_ticket&originid='. $object->id, ''); |
|
| 1465 | + print dolGetButtonAction('', $langs->trans('TicketAddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&token='.newToken().'&socid='.$object->fk_soc.'&origin=ticket_ticket&originid='.$object->id, ''); |
|
| 1466 | 1466 | } |
| 1467 | 1467 | |
| 1468 | 1468 | // Close ticket if status is read |
@@ -158,7 +158,9 @@ |
||
| 158 | 158 | accessforbidden(); |
| 159 | 159 | } |
| 160 | 160 | // restrict view to current user's company |
| 161 | -if ($user->socid > 0) $socid = $user->socid; |
|
| 161 | +if ($user->socid > 0) { |
|
| 162 | + $socid = $user->socid; |
|
| 163 | +} |
|
| 162 | 164 | |
| 163 | 165 | // Store current page url |
| 164 | 166 | $url_page_current = DOL_URL_ROOT.'/ticket/list.php'; |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { |
| 928 | 928 | print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); |
| 929 | 929 | } elseif (strpos($val['type'], 'integer:') === 0) { |
| 930 | - print $object->showInputField($val, $key, !empty($search[$key])?$search[$key]:"", '', '', 'search_', 'maxwidth150', 1); |
|
| 930 | + print $object->showInputField($val, $key, !empty($search[$key]) ? $search[$key] : "", '', '', 'search_', 'maxwidth150', 1); |
|
| 931 | 931 | } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) { |
| 932 | 932 | print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]).'">'; |
| 933 | 933 | } |
@@ -972,7 +972,7 @@ discard block |
||
| 972 | 972 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
| 973 | 973 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
| 974 | 974 | } |
| 975 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 975 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 976 | 976 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
| 977 | 977 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
| 978 | 978 | $totalarray['nbfield']++; |
@@ -1143,20 +1143,20 @@ discard block |
||
| 1143 | 1143 | print $object->showOutputField($val, $key, $obj->$key, ''); |
| 1144 | 1144 | |
| 1145 | 1145 | // display a warning on untreated tickets |
| 1146 | - $is_open = ($object->status != Ticket::STATUS_CLOSED && $object->status != Ticket::STATUS_CANCELED ); |
|
| 1146 | + $is_open = ($object->status != Ticket::STATUS_CLOSED && $object->status != Ticket::STATUS_CANCELED); |
|
| 1147 | 1147 | $should_show_warning = (!empty($conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE) || !empty($conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE)); |
| 1148 | 1148 | if ($is_open && $should_show_warning) { |
| 1149 | 1149 | $date_last_msg_sent = (int) $object->date_last_msg_sent; |
| 1150 | - $hour_diff = ($now - $date_last_msg_sent) / 3600 ; |
|
| 1150 | + $hour_diff = ($now - $date_last_msg_sent) / 3600; |
|
| 1151 | 1151 | |
| 1152 | 1152 | if (!empty($conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE && $date_last_msg_sent == 0)) { |
| 1153 | - $creation_date = $object->datec; |
|
| 1154 | - $hour_diff_creation = ($now - $creation_date) / 3600 ; |
|
| 1153 | + $creation_date = $object->datec; |
|
| 1154 | + $hour_diff_creation = ($now - $creation_date) / 3600; |
|
| 1155 | 1155 | if ($hour_diff_creation > $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE) { |
| 1156 | - print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayForFirstResponseTooLong', $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE), 'warning', 'style="color: red;"', false, 0, 0, '', ''); |
|
| 1156 | + print " ".img_picto($langs->trans('Late').' : '.$langs->trans('TicketsDelayForFirstResponseTooLong', $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE), 'warning', 'style="color: red;"', false, 0, 0, '', ''); |
|
| 1157 | 1157 | } |
| 1158 | 1158 | } elseif (!empty($conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE) && $hour_diff > $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE) { |
| 1159 | - print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayFromLastResponseTooLong', $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE), 'warning'); |
|
| 1159 | + print " ".img_picto($langs->trans('Late').' : '.$langs->trans('TicketsDelayFromLastResponseTooLong', $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE), 'warning'); |
|
| 1160 | 1160 | } |
| 1161 | 1161 | } |
| 1162 | 1162 | } else { // Example: key=fk_soc, obj->key=123 val=array('type'=>'integer', ... |
@@ -1246,7 +1246,7 @@ discard block |
||
| 1246 | 1246 | |
| 1247 | 1247 | print '</table>'."\n"; |
| 1248 | 1248 | print '</div>'."\n"; |
| 1249 | -print '</div>'."\n"; // end div-responsive-inside |
|
| 1249 | +print '</div>'."\n"; // end div-responsive-inside |
|
| 1250 | 1250 | |
| 1251 | 1251 | print '</form>'."\n"; |
| 1252 | 1252 | |
@@ -235,7 +235,7 @@ |
||
| 235 | 235 | $this->dateh = $this->db->jdate($obj->dateh); |
| 236 | 236 | $this->datef = $this->db->jdate($obj->datef); |
| 237 | 237 | $this->amount = $obj->subscription; |
| 238 | - $this->note = $obj->note_public; // deprecated |
|
| 238 | + $this->note = $obj->note_public; // deprecated |
|
| 239 | 239 | $this->note_public = $obj->note_public; |
| 240 | 240 | $this->fk_bank = $obj->fk_bank; |
| 241 | 241 | return 1; |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | // Parameters |
| 69 | 69 | $action = GETPOST('action', 'aZ09'); |
| 70 | 70 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 71 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 71 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
| 72 | 72 | |
| 73 | 73 | $value = GETPOST('value', 'alpha'); |
| 74 | 74 | $label = GETPOST('label', 'alpha'); |