@@ -328,7 +328,7 @@ |
||
| 328 | 328 | |
| 329 | 329 | foreach ($arrayofvat[$key] as $k => $mt) { |
| 330 | 330 | if ($mt) { |
| 331 | - $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
| 331 | + $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
| 332 | 332 | $account_label = $accountingaccount->label; |
| 333 | 333 | |
| 334 | 334 | // get compte id and label |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | $error = 0; |
| 47 | 47 | $connect_id = null; |
| 48 | 48 | $newsectioniso = ''; |
| 49 | - $mesg=""; |
|
| 49 | + $mesg = ""; |
|
| 50 | 50 | |
| 51 | 51 | if (!is_numeric($ftp_port)) { |
| 52 | 52 | $mesg = $langs->transnoentitiesnoconv("FailedToConnectToFTPServer", $ftp_server, $ftp_port); |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'targetcard'; // To manage different context of search |
| 94 | 94 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 95 | 95 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
| 96 | -$lineid = GETPOST('lineid', 'int'); |
|
| 96 | +$lineid = GETPOST('lineid', 'int'); |
|
| 97 | 97 | |
| 98 | 98 | // Initialize technical objects |
| 99 | 99 | $object = new Target($db); |
@@ -1079,8 +1079,8 @@ discard block |
||
| 1079 | 1079 | $stringtoexport = str_replace('file=js/'.$website->ref.'/', "file=js/__WEBSITE_KEY__/", $stringtoexport); |
| 1080 | 1080 | $stringtoexport = str_replace('medias/image/'.$website->ref.'/', "medias/image/__WEBSITE_KEY__/", $stringtoexport); |
| 1081 | 1081 | $stringtoexport = str_replace('medias/js/'.$website->ref.'/', "medias/js/__WEBSITE_KEY__/", $stringtoexport); |
| 1082 | - $stringtoexport = str_replace('"image/'.$website->ref.'/', '"image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="image/websiteref/file.png" into html content |
|
| 1083 | - $stringtoexport = str_replace('"/image/'.$website->ref.'/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content |
|
| 1082 | + $stringtoexport = str_replace('"image/'.$website->ref.'/', '"image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="image/websiteref/file.png" into html content |
|
| 1083 | + $stringtoexport = str_replace('"/image/'.$website->ref.'/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content |
|
| 1084 | 1084 | $stringtoexport = str_replace('"js/'.$website->ref.'/', '"js/__WEBSITE_KEY__/', $stringtoexport); |
| 1085 | 1085 | $stringtoexport = str_replace('"/js/'.$website->ref.'/', '"/js/__WEBSITE_KEY__/', $stringtoexport); |
| 1086 | 1086 | |
@@ -1351,7 +1351,7 @@ discard block |
||
| 1351 | 1351 | foreach ($aliasesarray as $aliasshortcuttocreate) { |
| 1352 | 1352 | if (trim($aliasshortcuttocreate)) { |
| 1353 | 1353 | $filealias = $conf->website->dir_output.'/'.$object->ref.'/'.trim($aliasshortcuttocreate).'.php'; |
| 1354 | - $result = dolSavePageAlias($filealias, $object, $objectpagestatic); // This includes also a copy into sublanguage directories. |
|
| 1354 | + $result = dolSavePageAlias($filealias, $object, $objectpagestatic); // This includes also a copy into sublanguage directories. |
|
| 1355 | 1355 | if (!$result) { |
| 1356 | 1356 | $this->errors[] = 'Failed to write file '.basename($filealias); |
| 1357 | 1357 | $error++; |
@@ -1372,7 +1372,7 @@ discard block |
||
| 1372 | 1372 | $filetpl = $pathofwebsite.'/page'.$object->fk_default_home.'.tpl.php'; |
| 1373 | 1373 | } |
| 1374 | 1374 | $filewrapper = $pathofwebsite.'/wrapper.php'; |
| 1375 | - dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object); // This includes also a version of index.php into sublanguage directories |
|
| 1375 | + dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object); // This includes also a version of index.php into sublanguage directories |
|
| 1376 | 1376 | } |
| 1377 | 1377 | |
| 1378 | 1378 | if ($error) { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $maxfilesizearray = getMaxFileSizeArray(); |
| 182 | 182 | $maxmin = $maxfilesizearray['maxmin']; |
| 183 | 183 | if ($maxmin > 0) { |
| 184 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 184 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 185 | 185 | } |
| 186 | 186 | $texte .= ' <input type="file" name="uploadfile">'; |
| 187 | 187 | $texte .= '<input type="hidden" value="PRODUCT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
| 279 | 279 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
| 280 | 280 | |
| 281 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
| 281 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
| 282 | 282 | |
| 283 | 283 | // Get extension (ods or odt) |
| 284 | 284 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -287,11 +287,11 @@ discard block |
||
| 287 | 287 | if ($format == '1') { |
| 288 | 288 | $format = '%Y%m%d%H%M%S'; |
| 289 | 289 | } |
| 290 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
| 290 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
| 291 | 291 | } else { |
| 292 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
| 292 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
| 293 | 293 | } |
| 294 | - $file = $dir . '/' . $filename; |
|
| 294 | + $file = $dir.'/'.$filename; |
|
| 295 | 295 | //print "newdir=".$dir; |
| 296 | 296 | //print "newfile=".$newfile; |
| 297 | 297 | //print "file=".$file; |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | dol_mkdir($conf->product->dir_temp); |
| 301 | 301 | if (!is_writable($conf->product->dir_temp)) { |
| 302 | 302 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->product->dir_temp); |
| 303 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
| 303 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
| 304 | 304 | return -1; |
| 305 | 305 | } |
| 306 | 306 | |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
| 298 | 298 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
| 299 | 299 | |
| 300 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
| 300 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
| 301 | 301 | |
| 302 | 302 | // Get extension (ods or odt) |
| 303 | 303 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -306,11 +306,11 @@ discard block |
||
| 306 | 306 | if ($format == '1') { |
| 307 | 307 | $format = '%Y%m%d%H%M%S'; |
| 308 | 308 | } |
| 309 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
| 309 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
| 310 | 310 | } else { |
| 311 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
| 311 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
| 312 | 312 | } |
| 313 | - $file = $dir . '/' . $filename; |
|
| 313 | + $file = $dir.'/'.$filename; |
|
| 314 | 314 | //print "newdir=".$dir; |
| 315 | 315 | //print "newfile=".$newfile; |
| 316 | 316 | //print "file=".$file; |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | dol_mkdir($conf->supplier_proposal->dir_temp); |
| 320 | 320 | if (!is_writable($conf->supplier_proposal->dir_temp)) { |
| 321 | 321 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->supplier_proposal->dir_temp); |
| 322 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
| 322 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
| 323 | 323 | return -1; |
| 324 | 324 | } |
| 325 | 325 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $maxfilesizearray = getMaxFileSizeArray(); |
| 174 | 174 | $maxmin = $maxfilesizearray['maxmin']; |
| 175 | 175 | if ($maxmin > 0) { |
| 176 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 176 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 177 | 177 | } |
| 178 | 178 | $texte .= ' <input type="file" name="uploadfile">'; |
| 179 | 179 | $texte .= '<input type="hidden" value="MEMBER_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
| 269 | 269 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
| 270 | 270 | |
| 271 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
| 271 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
| 272 | 272 | |
| 273 | 273 | // Get extension (ods or odt) |
| 274 | 274 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -277,11 +277,11 @@ discard block |
||
| 277 | 277 | if ($format == '1') { |
| 278 | 278 | $format = '%Y%m%d%H%M%S'; |
| 279 | 279 | } |
| 280 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
| 280 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
| 281 | 281 | } else { |
| 282 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
| 282 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
| 283 | 283 | } |
| 284 | - $file = $dir . '/' . $filename; |
|
| 284 | + $file = $dir.'/'.$filename; |
|
| 285 | 285 | //print "newdir=".$dir; |
| 286 | 286 | //print "newfile=".$newfile; |
| 287 | 287 | //print "file=".$file; |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | dol_mkdir($conf->adherent->dir_temp); |
| 291 | 291 | if (!is_writable($conf->adherent->dir_temp)) { |
| 292 | 292 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->adherent->dir_temp); |
| 293 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
| 293 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
| 294 | 294 | return -1; |
| 295 | 295 | } |
| 296 | 296 | |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $maxfilesizearray = getMaxFileSizeArray(); |
| 182 | 182 | $maxmin = $maxfilesizearray['maxmin']; |
| 183 | 183 | if ($maxmin > 0) { |
| 184 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 184 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 185 | 185 | } |
| 186 | 186 | $texte .= ' <input type="file" name="uploadfile">'; |
| 187 | 187 | $texte .= '<input type="hidden" value="STOCK_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
| 280 | 280 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
| 281 | 281 | |
| 282 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
| 282 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
| 283 | 283 | |
| 284 | 284 | // Get extension (ods or odt) |
| 285 | 285 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -288,11 +288,11 @@ discard block |
||
| 288 | 288 | if ($format == '1') { |
| 289 | 289 | $format = '%Y%m%d%H%M%S'; |
| 290 | 290 | } |
| 291 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
| 291 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
| 292 | 292 | } else { |
| 293 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
| 293 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
| 294 | 294 | } |
| 295 | - $file = $dir . '/' . $filename; |
|
| 295 | + $file = $dir.'/'.$filename; |
|
| 296 | 296 | //print "newdir=".$dir; |
| 297 | 297 | //print "newfile=".$newfile; |
| 298 | 298 | //print "file=".$file; |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | dol_mkdir($conf->product->dir_temp); |
| 302 | 302 | if (!is_writable($conf->product->dir_temp)) { |
| 303 | 303 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->product->dir_temp); |
| 304 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
| 304 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
| 305 | 305 | return -1; |
| 306 | 306 | } |
| 307 | 307 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | $maxfilesizearray = getMaxFileSizeArray(); |
| 202 | 202 | $maxmin = $maxfilesizearray['maxmin']; |
| 203 | 203 | if ($maxmin > 0) { |
| 204 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 204 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 205 | 205 | } |
| 206 | 206 | $texte .= ' <input type="file" name="uploadfile">'; |
| 207 | 207 | $texte .= '<input type="hidden" value="USER_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
| 298 | 298 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
| 299 | 299 | |
| 300 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
| 300 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
| 301 | 301 | |
| 302 | 302 | // Get extension (ods or odt) |
| 303 | 303 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -306,11 +306,11 @@ discard block |
||
| 306 | 306 | if ($format == '1') { |
| 307 | 307 | $format = '%Y%m%d%H%M%S'; |
| 308 | 308 | } |
| 309 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
| 309 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
| 310 | 310 | } else { |
| 311 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
| 311 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
| 312 | 312 | } |
| 313 | - $file = $dir . '/' . $filename; |
|
| 313 | + $file = $dir.'/'.$filename; |
|
| 314 | 314 | //print "newdir=".$dir; |
| 315 | 315 | //print "newfile=".$newfile; |
| 316 | 316 | //print "file=".$file; |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | dol_mkdir($conf->user->dir_temp); |
| 320 | 320 | if (!is_writable($conf->user->dir_temp)) { |
| 321 | 321 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->user->dir_temp); |
| 322 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
| 322 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
| 323 | 323 | return -1; |
| 324 | 324 | } |
| 325 | 325 | |