@@ -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="CONTRACT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
265 | 265 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
266 | 266 | |
267 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
267 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
268 | 268 | |
269 | 269 | // Get extension (ods or odt) |
270 | 270 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -273,11 +273,11 @@ discard block |
||
273 | 273 | if ($format == '1') { |
274 | 274 | $format = '%Y%m%d%H%M%S'; |
275 | 275 | } |
276 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
276 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
277 | 277 | } else { |
278 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
278 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
279 | 279 | } |
280 | - $file = $dir . '/' . $filename; |
|
280 | + $file = $dir.'/'.$filename; |
|
281 | 281 | //print "newdir=".$dir; |
282 | 282 | //print "newfile=".$newfile; |
283 | 283 | //print "file=".$file; |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | dol_mkdir($conf->contract->dir_temp); |
287 | 287 | if (!is_writable($conf->contract->dir_temp)) { |
288 | 288 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->contrat->dir_temp); |
289 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
289 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
290 | 290 | return -1; |
291 | 291 | } |
292 | 292 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | /* |
85 | 85 | * View |
86 | 86 | */ |
87 | -$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; |
|
87 | +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; |
|
88 | 88 | |
89 | 89 | llxHeader("", $langs->trans('FicheVentilation'), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-customer page-card'); |
90 | 90 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l"; |
112 | 112 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product"; |
113 | 113 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
114 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
114 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
115 | 115 | } |
116 | 116 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON l.fk_code_ventilation = aa.rowid"; |
117 | 117 | $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = l.fk_facture"; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | /* |
89 | 89 | * View |
90 | 90 | */ |
91 | -$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; |
|
91 | +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; |
|
92 | 92 | |
93 | 93 | llxHeader("", $langs->trans('FicheVentilation'), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-supplier page-card'); |
94 | 94 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as l"; |
114 | 114 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product"; |
115 | 115 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
116 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
116 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
117 | 117 | } |
118 | 118 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON l.fk_code_ventilation = aa.rowid"; |
119 | 119 | $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON f.rowid = l.fk_facture_fourn "; |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | |
28 | 28 | $sapi_type = php_sapi_name(); |
29 | 29 | $script_file = basename(__FILE__); |
30 | -$path = dirname(__FILE__) . '/'; |
|
30 | +$path = dirname(__FILE__).'/'; |
|
31 | 31 | |
32 | 32 | // Test si mode batch |
33 | 33 | $sapi_type = php_sapi_name(); |
34 | 34 | if (substr($sapi_type, 0, 3) == 'cgi') { |
35 | - echo "Error: You are using PHP for CGI. To execute " . $script_file . " from command line, you must use PHP for CLI mode.\n"; |
|
35 | + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; |
|
36 | 36 | exit(); |
37 | 37 | } |
38 | 38 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | // PHAN setup. Configuration is required, otherwise phan is disabled. |
104 | 104 | $PHAN_CONFIG = "{$path}phan/config_extended.php"; |
105 | -$PHAN_BASELINE = "{$path}phan/baseline_extended.txt"; // BASELINE is ignored if it does not exist |
|
105 | +$PHAN_BASELINE = "{$path}phan/baseline_extended.txt"; // BASELINE is ignored if it does not exist |
|
106 | 106 | $PHAN_MIN_PHP = "7.0"; |
107 | 107 | $PHAN_MEMORY_OPT = "--memory-limit 5G"; |
108 | 108 | |
@@ -993,8 +993,8 @@ discard block |
||
993 | 993 | fwrite($fh, '<?xml version="1.0" encoding="UTF-8" ?>'."\n"); |
994 | 994 | fwrite($fh, '<rss version="2.0">'."\n"); |
995 | 995 | fwrite($fh, '<channel>'."\n"); |
996 | - fwrite($fh, '<title>' . htmlspecialchars($title_security) . '</title>'."\n"); |
|
997 | - fwrite($fh, '<description>' . htmlspecialchars("Feed of the latest security reports on the project") . '</description>'."\n"); |
|
996 | + fwrite($fh, '<title>'.htmlspecialchars($title_security).'</title>'."\n"); |
|
997 | + fwrite($fh, '<description>'.htmlspecialchars("Feed of the latest security reports on the project").'</description>'."\n"); |
|
998 | 998 | //fwrite($fh, '<atom:link href="https://cti.dolibarr.org/index-security.rss" rel="self" type="application/rss+xml" />'."\n"); |
999 | 999 | fwrite($fh, '<language>en-US</language>'."\n"); |
1000 | 1000 | fwrite($fh, '<lastBuildDate>'.date('r').'</lastBuildDate>'."\n"); |
@@ -1003,14 +1003,14 @@ discard block |
||
1003 | 1003 | <atom:link href="https://cti.dolibarr.org/security-index.rss" rel="self" type="application/rss+xml" /> |
1004 | 1004 | */ |
1005 | 1005 | if ($url_site) { |
1006 | - fwrite($fh, '<link>' . htmlspecialchars($url_site) . '</link>'."\n"); |
|
1006 | + fwrite($fh, '<link>'.htmlspecialchars($url_site).'</link>'."\n"); |
|
1007 | 1007 | } |
1008 | 1008 | // Image |
1009 | 1009 | fwrite($fh, '<image>'."\n"); |
1010 | 1010 | fwrite($fh, '<url>https://www.dolibarr.org/medias/image/www.dolibarr.org/badge-openssf.png</url>'."\n"); |
1011 | - fwrite($fh, '<title>' . htmlspecialchars($title_security) . '</title>'."\n"); |
|
1011 | + fwrite($fh, '<title>'.htmlspecialchars($title_security).'</title>'."\n"); |
|
1012 | 1012 | if ($url_site) { |
1013 | - fwrite($fh, '<link>' . htmlspecialchars($url_site) . '</link>'."\n"); |
|
1013 | + fwrite($fh, '<link>'.htmlspecialchars($url_site).'</link>'."\n"); |
|
1014 | 1014 | } |
1015 | 1015 | fwrite($fh, '</image>'."\n"); |
1016 | 1016 | |
@@ -1018,13 +1018,13 @@ discard block |
||
1018 | 1018 | $alert['url_commit'] = 'https://github.com/Dolibarr/dolibarr/commit/'.$alert['commitid']; |
1019 | 1019 | |
1020 | 1020 | fwrite($fh, '<item>'."\n"); |
1021 | - fwrite($fh, '<title>' . htmlspecialchars($alert['title']) . '</title>'."\n"); |
|
1021 | + fwrite($fh, '<title>'.htmlspecialchars($alert['title']).'</title>'."\n"); |
|
1022 | 1022 | // Description of alert, list of links to sources and branches of fixes |
1023 | - fwrite($fh, '<description>' . $alert['description'] . '</description>'."\n"); // no htmlspeciachars here |
|
1024 | - fwrite($fh, '<link>' . htmlspecialchars($alert['url_commit']) . '</link>'."\n"); |
|
1023 | + fwrite($fh, '<description>'.$alert['description'].'</description>'."\n"); // no htmlspeciachars here |
|
1024 | + fwrite($fh, '<link>'.htmlspecialchars($alert['url_commit']).'</link>'."\n"); |
|
1025 | 1025 | $tmpdate = strtotime($alert['created_at']); |
1026 | - fwrite($fh, '<pubDate>' . htmlspecialchars(date('r', $tmpdate)) . '</pubDate>'."\n"); |
|
1027 | - fwrite($fh, '<guid isPermaLink="false"><![CDATA['.htmlspecialchars($alert['commitid']).']]></guid>'."\n"); // A hidden unique ID |
|
1026 | + fwrite($fh, '<pubDate>'.htmlspecialchars(date('r', $tmpdate)).'</pubDate>'."\n"); |
|
1027 | + fwrite($fh, '<guid isPermaLink="false"><![CDATA['.htmlspecialchars($alert['commitid']).']]></guid>'."\n"); // A hidden unique ID |
|
1028 | 1028 | |
1029 | 1029 | fwrite($fh, '</item>'."\n"); |
1030 | 1030 | } |
@@ -184,7 +184,7 @@ |
||
184 | 184 | // Update old jobs that were not closed correctly so processing is moved from 1 to 0 (otherwise task stopped with fatal error are always in status "in progress") |
185 | 185 | $sql = "UPDATE ".MAIN_DB_PREFIX."cronjob set processing = 0"; |
186 | 186 | $sql .= " WHERE processing = 1"; |
187 | -$sql .= " AND datelastrun <= '".$db->idate(dol_now() - 24*3600, 'gmt')."'"; |
|
187 | +$sql .= " AND datelastrun <= '".$db->idate(dol_now() - 24 * 3600, 'gmt')."'"; |
|
188 | 188 | $sql .= " AND datelastresult IS NULL"; |
189 | 189 | $db->query($sql); |
190 | 190 |