@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | if ($val['type'] == 'text' || $val['type'] == 'html') { |
156 | 156 | $rightpart .= ' tdtop'; |
157 | 157 | } |
158 | - $rightpart.= '">'; |
|
158 | + $rightpart .= '">'; |
|
159 | 159 | $labeltoshow = ''; |
160 | 160 | if (!empty($val['help'])) { |
161 | 161 | $labeltoshow .= $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $out = $object->showOutputField($val, $key, $value, '', '', '', 0); |
196 | 196 | $rightpart .= showValueWithClipboardCPButton($out, 0, $out); |
197 | 197 | } else { |
198 | - $rightpart.= $object->showOutputField($val, $key, $value, '', '', '', 0); |
|
198 | + $rightpart .= $object->showOutputField($val, $key, $value, '', '', '', 0); |
|
199 | 199 | } |
200 | 200 | } |
201 | 201 | if (preg_match('/^(text|html)/', $val['type'])) { |
@@ -383,7 +383,7 @@ |
||
383 | 383 | $object->actionmsg = $message; // Long text |
384 | 384 | $object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentBy')...); |
385 | 385 | if (!empty($conf->global->MAIN_MAIL_REPLACE_EVENT_TITLE_BY_EMAIL_SUBJECT)) { |
386 | - $object->actionmsg2 = $subject; // Short text |
|
386 | + $object->actionmsg2 = $subject; // Short text |
|
387 | 387 | } |
388 | 388 | |
389 | 389 | $object->trackid = $trackid; |
@@ -150,9 +150,9 @@ |
||
150 | 150 | $productstatic->accountancy_code_buy_export = $objp->accountancy_code_buy_export; |
151 | 151 | $productstatic->date_modification = $datem; |
152 | 152 | |
153 | - $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('product', 'product_advance', 'read_prices'):$user->hasRight('product', 'read'); |
|
153 | + $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('product', 'product_advance', 'read_prices') : $user->hasRight('product', 'read'); |
|
154 | 154 | if ($productstatic->isService()) { |
155 | - $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('service', 'service_advance', 'read_prices'):$user->hasRight('service', 'read'); |
|
155 | + $usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('service', 'service_advance', 'read_prices') : $user->hasRight('service', 'read'); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | $this->info_box_contents[$line][] = array( |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | $badgeStatus7 = '#baa32b'; |
84 | 84 | $badgeStatus8 = '#993013'; |
85 | 85 | $badgeStatus9 = '#e7f0f0'; |
86 | - if (file_exists(DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php')) { |
|
87 | - include DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php'; |
|
86 | + if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php')) { |
|
87 | + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; |
|
88 | 88 | } |
89 | 89 | $this->max = $max; |
90 | 90 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $colorseriesstat = array(); |
102 | 102 | if ($user->hasRight('ticket', 'read')) { |
103 | 103 | $sql = "SELECT cts.rowid, cts.label, cts.code"; |
104 | - $sql .= " FROM " . MAIN_DB_PREFIX . "c_ticket_severity as cts"; |
|
104 | + $sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_severity as cts"; |
|
105 | 105 | $sql .= " WHERE cts.active = 1"; |
106 | 106 | $sql .= $this->db->order('cts.rowid', 'ASC'); |
107 | 107 | $resql = $this->db->query($sql); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $dataseries = array(); |
139 | 139 | $data = array(); |
140 | 140 | $sql = "SELECT t.severity_code, COUNT(t.severity_code) as nb"; |
141 | - $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t"; |
|
141 | + $sql .= " FROM ".MAIN_DB_PREFIX."ticket as t"; |
|
142 | 142 | $sql .= " WHERE t.fk_statut <> 8"; |
143 | 143 | $sql .= " GROUP BY t.severity_code"; |
144 | 144 | $resql = $this->db->query($sql); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | } |
153 | 153 | foreach ($listofoppcode as $rowid => $code) { |
154 | 154 | $dataseries[] = array( |
155 | - 'label' => $langs->getLabelFromKey($this->db, 'TicketSeverityShort' . $code, 'c_ticket_severity', 'code', 'label', $code), |
|
155 | + 'label' => $langs->getLabelFromKey($this->db, 'TicketSeverityShort'.$code, 'c_ticket_severity', 'code', 'label', $code), |
|
156 | 156 | 'data' => (empty($data[$code]) ? 0 : $data[$code]) |
157 | 157 | ); |
158 | 158 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $stringtoprint .= $px1->show($totalnb ? 0 : 1); |
191 | 191 | } |
192 | 192 | $stringtoprint .= '</div>'; |
193 | - $this->info_box_contents[][]=array( |
|
193 | + $this->info_box_contents[][] = array( |
|
194 | 194 | 'td' => 'class="center"', |
195 | 195 | 'text' => $stringtoprint |
196 | 196 | ); |
@@ -122,9 +122,9 @@ |
||
122 | 122 | |
123 | 123 | $response = getURLContent($tmpobject->url, 'POST', $jsonstr, 1, array(), array('http', 'https'), 0, -1); |
124 | 124 | if (empty($response['curl_error_no']) && $response['http_code'] >= 200 && $response['http_code'] < 300) { |
125 | - $nbPosts ++; |
|
125 | + $nbPosts++; |
|
126 | 126 | } else { |
127 | - $errors ++; |
|
127 | + $errors++; |
|
128 | 128 | dol_syslog("Failed to get url with httpcode=".(!empty($response['http_code']) ? $response['http_code'] : "")." curl_error_no=".(!empty($response['curl_error_no']) ? $response['curl_error_no'] : ""), LOG_DEBUG); |
129 | 129 | } |
130 | 130 | } |
@@ -756,10 +756,10 @@ |
||
756 | 756 | public function regexpsql($subject, $pattern, $sqlstring = false) |
757 | 757 | { |
758 | 758 | if ($sqlstring) { |
759 | - return "(". $subject ." ~ '" . $pattern . "')"; |
|
759 | + return "(".$subject." ~ '".$pattern."')"; |
|
760 | 760 | } |
761 | 761 | |
762 | - return "('". $subject ."' ~ '" . $pattern . "')"; |
|
762 | + return "('".$subject."' ~ '".$pattern."')"; |
|
763 | 763 | } |
764 | 764 | |
765 | 765 |
@@ -119,10 +119,10 @@ |
||
119 | 119 | public function regexpsql($subject, $pattern, $sqlstring = false) |
120 | 120 | { |
121 | 121 | if ($sqlstring) { |
122 | - return "(". $subject ." REGEXP '" . $pattern . "')"; |
|
122 | + return "(".$subject." REGEXP '".$pattern."')"; |
|
123 | 123 | } |
124 | 124 | |
125 | - return "('". $subject ."' REGEXP '" . $pattern . "')"; |
|
125 | + return "('".$subject."' REGEXP '".$pattern."')"; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 |
@@ -113,7 +113,7 @@ |
||
113 | 113 | if (isModEnabled('supplier_proposal') && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->hasRight('supplier_proposal', 'lire')) { |
114 | 114 | $arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_supplier_proposal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_proposal', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); |
115 | 115 | } |
116 | -if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED)) { |
|
116 | +if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED)) { |
|
117 | 117 | $arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_supplier_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_order', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); |
118 | 118 | } |
119 | 119 | if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | if ($reshook > 0) { |
133 | 133 | $perm = $hookmanager->resArray['perm']; |
134 | 134 | } |
135 | - if (! $perm) { |
|
135 | + if (!$perm) { |
|
136 | 136 | // We should not be here. If we are not allowed to reorder rows, feature should not be visible on script. |
137 | 137 | // If we are here, it is a hack attempt, so we report a warning. |
138 | 138 | print 'Bad permission to modify position of lines for object in table '.$table_element_line; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | |
155 | 155 | // Reorder line to have position of children lines sharing same counter than parent lines |
156 | 156 | // This should be useless because there is no need to have children sharing same counter than parent, but well, it's cleaner into database. |
157 | - if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande','fk_contrat'))) { |
|
157 | + if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande', 'fk_contrat'))) { |
|
158 | 158 | $result = $row->line_order(true); |
159 | 159 | } |
160 | 160 | } else { |