@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $customerStatic->loadCacheOfProspStatus(); |
126 | 126 | if (!empty($customerStatic->cacheprospectstatus)) { |
127 | 127 | foreach ($customerStatic->cacheprospectstatus as $dataProspectSt) { |
128 | - $this->type_statuscommprospect[$dataProspectSt['id']]=$dataProspectSt['label']; |
|
128 | + $this->type_statuscommprospect[$dataProspectSt['id']] = $dataProspectSt['label']; |
|
129 | 129 | } |
130 | 130 | } else { |
131 | 131 | $this->type_statuscommprospect = array( |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | } |
629 | 629 | } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') { |
630 | 630 | if ($arrayquery['options_'.$key] > 0) { |
631 | - $sqlwhere[]= " (te.".$key." = ".((int) $arrayquery["options_".$key]).")"; |
|
631 | + $sqlwhere[] = " (te.".$key." = ".((int) $arrayquery["options_".$key]).")"; |
|
632 | 632 | } |
633 | 633 | } else { |
634 | 634 | if (is_array($arrayquery['options_'.$key])) { |
@@ -95,7 +95,7 @@ |
||
95 | 95 | // Create a line of payments |
96 | 96 | $payment = new PaymentDonation($db); |
97 | 97 | $payment->chid = $chid; |
98 | - $payment->datep = $datepaid; |
|
98 | + $payment->datep = $datepaid; |
|
99 | 99 | $payment->amounts = $amounts; // Tableau de montant |
100 | 100 | $payment->paymenttype = GETPOST("paymenttype", 'int'); |
101 | 101 | $payment->num_payment = GETPOST("num_payment", 'alphanohtml'); |
@@ -81,7 +81,7 @@ |
||
81 | 81 | } |
82 | 82 | $result = restrictedArea($user, 'don', $object->id); |
83 | 83 | |
84 | -$permissiontoadd = $user->rights->don->creer; // Used by the include of actions_dellink.inc.php |
|
84 | +$permissiontoadd = $user->rights->don->creer; // Used by the include of actions_dellink.inc.php |
|
85 | 85 | |
86 | 86 | |
87 | 87 | /* |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | |
65 | 65 | public $amounts = array(); // Array of amounts |
66 | 66 | |
67 | - public $fk_typepayment; // Payment mode ID |
|
68 | - public $paymenttype; // Payment mode ID or Code. TODO Use only the code in this field. |
|
67 | + public $fk_typepayment; // Payment mode ID |
|
68 | + public $paymenttype; // Payment mode ID or Code. TODO Use only the code in this field. |
|
69 | 69 | |
70 | 70 | public $num_payment; |
71 | 71 | |
@@ -269,8 +269,8 @@ discard block |
||
269 | 269 | $this->tms = $this->db->jdate($obj->tms); |
270 | 270 | $this->datep = $this->db->jdate($obj->datep); |
271 | 271 | $this->amount = $obj->amount; |
272 | - $this->fk_typepayment = $obj->fk_typepayment; // Id on type of payent |
|
273 | - $this->paymenttype = $obj->fk_typepayment; // Id on type of payment. We should store the code into paymenttype. |
|
272 | + $this->fk_typepayment = $obj->fk_typepayment; // Id on type of payent |
|
273 | + $this->paymenttype = $obj->fk_typepayment; // Id on type of payment. We should store the code into paymenttype. |
|
274 | 274 | $this->num_payment = $obj->num_payment; |
275 | 275 | $this->note_public = $obj->note_public; |
276 | 276 | $this->fk_bank = $obj->fk_bank; |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | } |
689 | 689 | |
690 | 690 | global $action; |
691 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
691 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
692 | 692 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
693 | 693 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
694 | 694 | if ($reshook > 0) { |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | return $pass; |
195 | 195 | } |
196 | 196 | |
197 | - return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible |
|
197 | + return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | global $langs; |
210 | 210 | |
211 | - $this->initAll(); // For the case this method is called alone |
|
211 | + $this->initAll(); // For the case this method is called alone |
|
212 | 212 | |
213 | 213 | $password_a = preg_split('//u', $password, null, PREG_SPLIT_NO_EMPTY); |
214 | 214 | $maj = preg_split('//u', $this->Maj, null, PREG_SPLIT_NO_EMPTY); |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | if (is_array($cpt)) { |
628 | 628 | $listofaccount = ''; |
629 | 629 | foreach ($cpt as $cptcursor) { |
630 | - if (! is_null($cptcursor)) { |
|
630 | + if (!is_null($cptcursor)) { |
|
631 | 631 | if ($listofaccount) { |
632 | 632 | $listofaccount .= ","; |
633 | 633 | } |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | |
777 | 777 | $sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type, c.sens"; |
778 | 778 | $sql .= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c"; |
779 | - $sql .= " WHERE c.active = " . (int) $active; |
|
779 | + $sql .= " WHERE c.active = ".(int) $active; |
|
780 | 780 | $sql .= " AND c.entity = ".$conf->entity; |
781 | 781 | if ($categorytype >= 0) { |
782 | 782 | $sql .= " AND c.category_type = 1"; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public $fk_website; |
58 | 58 | |
59 | - public $fk_page; // If translation of another page |
|
59 | + public $fk_page; // If translation of another page |
|
60 | 60 | |
61 | 61 | public $pageurl; |
62 | 62 | public $aliasalt; |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public $fk_object; |
120 | 120 | |
121 | - const STATUS_DRAFT = 0; // offline |
|
122 | - const STATUS_VALIDATED = 1; // online |
|
121 | + const STATUS_DRAFT = 0; // offline |
|
122 | + const STATUS_VALIDATED = 1; // online |
|
123 | 123 | |
124 | 124 | |
125 | 125 | /** |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $maxfilesizearray = getMaxFileSizeArray(); |
180 | 180 | $maxmin = $maxfilesizearray['maxmin']; |
181 | 181 | if ($maxmin > 0) { |
182 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
182 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
183 | 183 | } |
184 | 184 | $texte .= ' <input type="file" name="uploadfile">'; |
185 | 185 | $texte .= '<input type="hidden" value="RECEPTION_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | $newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile); |
274 | 274 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
275 | 275 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
276 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
276 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
277 | 277 | //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; |
278 | 278 | // Get extension (ods or odt) |
279 | 279 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -282,11 +282,11 @@ discard block |
||
282 | 282 | if ($format == '1') { |
283 | 283 | $format = '%Y%m%d%H%M%S'; |
284 | 284 | } |
285 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
285 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
286 | 286 | } else { |
287 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
287 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
288 | 288 | } |
289 | - $file = $dir . '/' . $filename; |
|
289 | + $file = $dir.'/'.$filename; |
|
290 | 290 | //print "newdir=".$dir; |
291 | 291 | //print "newfile=".$newfile; |
292 | 292 | //print "file=".$file; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | dol_mkdir($conf->reception->dir_temp); |
296 | 296 | if (!is_writable($conf->reception->dir_temp)) { |
297 | 297 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->reception->dir_temp); |
298 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
298 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
299 | 299 | return -1; |
300 | 300 | } |
301 | 301 |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $maxfilesizearray = getMaxFileSizeArray(); |
187 | 187 | $maxmin = $maxfilesizearray['maxmin']; |
188 | 188 | if ($maxmin > 0) { |
189 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
189 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
190 | 190 | } |
191 | 191 | $texte .= ' <input type="file" name="uploadfile">'; |
192 | 192 | $texte .= '<input type="hidden" value="EXPEDITION_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile); |
281 | 281 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
282 | 282 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
283 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
283 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
284 | 284 | //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; |
285 | 285 | // Get extension (ods or odt) |
286 | 286 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -289,11 +289,11 @@ discard block |
||
289 | 289 | if ($format == '1') { |
290 | 290 | $format = '%Y%m%d%H%M%S'; |
291 | 291 | } |
292 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
292 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
293 | 293 | } else { |
294 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
294 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
295 | 295 | } |
296 | - $file = $dir . '/' . $filename; |
|
296 | + $file = $dir.'/'.$filename; |
|
297 | 297 | //print "newdir=".$dir; |
298 | 298 | //print "newfile=".$newfile; |
299 | 299 | //print "file=".$file; |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | dol_mkdir($conf->expedition->dir_temp); |
303 | 303 | if (!is_writable($conf->expedition->dir_temp)) { |
304 | 304 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->expedition->dir_temp); |
305 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
305 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
306 | 306 | return -1; |
307 | 307 | } |
308 | 308 |