@@ -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 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | $maxfilesizearray = getMaxFileSizeArray(); |
| 181 | 181 | $maxmin = $maxfilesizearray['maxmin']; |
| 182 | 182 | if ($maxmin > 0) { |
| 183 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 183 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 184 | 184 | } |
| 185 | 185 | $texte .= ' <input type="file" name="uploadfile">'; |
| 186 | 186 | $texte .= '<input type="hidden" value="BOM_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | $newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile); |
| 277 | 277 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
| 278 | 278 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
| 279 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
| 279 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
| 280 | 280 | //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; |
| 281 | 281 | // Get extension (ods or odt) |
| 282 | 282 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -285,11 +285,11 @@ discard block |
||
| 285 | 285 | if ($format == '1') { |
| 286 | 286 | $format = '%Y%m%d%H%M%S'; |
| 287 | 287 | } |
| 288 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
| 288 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
| 289 | 289 | } else { |
| 290 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
| 290 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
| 291 | 291 | } |
| 292 | - $file = $dir . '/' . $filename; |
|
| 292 | + $file = $dir.'/'.$filename; |
|
| 293 | 293 | //print "newdir=".$dir; |
| 294 | 294 | //print "newfile=".$newfile; |
| 295 | 295 | //print "file=".$file; |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | dol_mkdir($conf->bom->dir_temp); |
| 299 | 299 | if (!is_writable($conf->bom->dir_temp)) { |
| 300 | 300 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->bom->dir_temp); |
| 301 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
| 301 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
| 302 | 302 | return -1; |
| 303 | 303 | } |
| 304 | 304 | |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | $newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile); |
| 270 | 270 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
| 271 | 271 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
| 272 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
| 272 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
| 273 | 273 | //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; |
| 274 | 274 | // Get extension (ods or odt) |
| 275 | 275 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -278,11 +278,11 @@ discard block |
||
| 278 | 278 | if ($format == '1') { |
| 279 | 279 | $format = '%Y%m%d%H%M%S'; |
| 280 | 280 | } |
| 281 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
| 281 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
| 282 | 282 | } else { |
| 283 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
| 283 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
| 284 | 284 | } |
| 285 | - $file = $dir . '/' . $filename; |
|
| 285 | + $file = $dir.'/'.$filename; |
|
| 286 | 286 | //print "newdir=".$dir; |
| 287 | 287 | //print "newfile=".$newfile; |
| 288 | 288 | //print "file=".$file; |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | dol_mkdir($conf->mrp->dir_temp); |
| 292 | 292 | if (!is_writable($conf->mrp->dir_temp)) { |
| 293 | 293 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->mrp->dir_temp); |
| 294 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
| 294 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
| 295 | 295 | return -1; |
| 296 | 296 | } |
| 297 | 297 | |