@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | public $code; // Code of format |
| 72 | 72 | |
| 73 | - // phpcs:disable PEAR.NamingConventions.ValidVariableName.PublicUnderscore |
|
| 73 | + // phpcs:disable PEAR.NamingConventions.ValidVariableName.PublicUnderscore |
|
| 74 | 74 | // protected |
| 75 | 75 | // Name of stick |
| 76 | 76 | protected $_Avery_Name = ''; |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * @var array |
| 110 | 110 | */ |
| 111 | 111 | public $_Avery_Labels; |
| 112 | - // phpcs:enable |
|
| 112 | + // phpcs:enable |
|
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | 115 | * Constructor |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $this->db = $db; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 124 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 125 | 125 | /** |
| 126 | 126 | * Function to build PDF on disk, then output on HTTP stream. |
| 127 | 127 | * |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * @return int 1=OK, 0=KO |
| 133 | 133 | */ |
| 134 | 134 | abstract public function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = ''); |
| 135 | - // phpcs:enable |
|
| 135 | + // phpcs:enable |
|
| 136 | 136 | |
| 137 | 137 | /** |
| 138 | 138 | * Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | abstract public function addSticker(&$pdf, $outputlangs, $param); |
| 146 | 146 | |
| 147 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 147 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 148 | 148 | /** |
| 149 | 149 | * Methode qui permet de modifier la taille des caracteres |
| 150 | 150 | * Cela modiera aussi l'espace entre chaque ligne |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | public function Set_Char_Size(&$pdf, $pt) |
| 157 | 157 | { |
| 158 | - // phpcs:enable |
|
| 158 | + // phpcs:enable |
|
| 159 | 159 | if ($pt > 3) { |
| 160 | 160 | $this->_Char_Size = $pt; |
| 161 | 161 | $this->_Line_Height = $this->_Get_Height_Chars($pt); |
@@ -163,8 +163,8 @@ discard block |
||
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 167 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 166 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 167 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 168 | 168 | /** |
| 169 | 169 | * protected Print dot line |
| 170 | 170 | * |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | */ |
| 180 | 180 | protected function _Pointille(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $nbPointilles = 15) |
| 181 | 181 | { |
| 182 | - // phpcs:enable |
|
| 182 | + // phpcs:enable |
|
| 183 | 183 | $pdf->SetLineWidth($epaisseur); |
| 184 | 184 | $length = abs($x1 - $x2); |
| 185 | 185 | $hauteur = abs($y1 - $y2); |
@@ -210,8 +210,8 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 214 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 213 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 214 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 215 | 215 | /** |
| 216 | 216 | * protected Function realisant une croix aux 4 coins des cartes |
| 217 | 217 | * |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | */ |
| 229 | 229 | protected function _Croix(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $taille = 4) |
| 230 | 230 | { |
| 231 | - // phpcs:enable |
|
| 231 | + // phpcs:enable |
|
| 232 | 232 | $pdf->SetDrawColor(192, 192, 192); |
| 233 | 233 | |
| 234 | 234 | $pdf->SetLineWidth($epaisseur); |
@@ -271,8 +271,8 @@ discard block |
||
| 271 | 271 | return $value; |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 275 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 274 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 275 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 276 | 276 | /** |
| 277 | 277 | * protected Give the height for a char size given. |
| 278 | 278 | * |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | */ |
| 282 | 282 | protected function _Get_Height_Chars($pt) |
| 283 | 283 | { |
| 284 | - // phpcs:enable |
|
| 284 | + // phpcs:enable |
|
| 285 | 285 | // Array for link between height of characters and space between lines |
| 286 | 286 | $_Table_Hauteur_Chars = array(6 => 2, 7 => 2.5, 8 => 3, 9 => 3.5, 10 => 4, 11 => 6, 12 => 7, 13 => 8, 14 => 9, 15 => 10); |
| 287 | 287 | if (in_array($pt, array_keys($_Table_Hauteur_Chars))) { |
@@ -291,8 +291,8 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 295 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 294 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 295 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 296 | 296 | /** |
| 297 | 297 | * protected Set format |
| 298 | 298 | * |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | protected function _Set_Format(&$pdf, $format) |
| 304 | 304 | { |
| 305 | - // phpcs:enable |
|
| 305 | + // phpcs:enable |
|
| 306 | 306 | $this->_Metric = $format['metric']; |
| 307 | 307 | $this->_Avery_Name = $format['name']; |
| 308 | 308 | $this->_Avery_Code = empty($format['code']) ? '' : $format['code']; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | |
| 71 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 71 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 72 | 72 | /** |
| 73 | 73 | * Load array this->attributes with list of fields per object that need an alternate translation. The object and field must be managed with |
| 74 | 74 | * the widgetForTranslation() method. |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | */ |
| 82 | 82 | public function fetch_name_extralanguages($elementtype, $forceload = false) |
| 83 | 83 | { |
| 84 | - // phpcs:enable |
|
| 84 | + // phpcs:enable |
|
| 85 | 85 | global $conf; |
| 86 | 86 | |
| 87 | 87 | if (empty($elementtype)) { |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | |
| 225 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 225 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 226 | 226 | /** |
| 227 | 227 | * Write content of a SendSms request into a dump file (mode = all) |
| 228 | 228 | * Used for debugging. |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | */ |
| 232 | 232 | public function dump_sms() |
| 233 | 233 | { |
| 234 | - // phpcs:enable |
|
| 234 | + // phpcs:enable |
|
| 235 | 235 | global $conf, $dolibarr_main_data_root; |
| 236 | 236 | |
| 237 | 237 | if (@is_writable($dolibarr_main_data_root)) { // Avoid fatal error on fopen with open_basedir |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 255 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 256 | 256 | /** |
| 257 | 257 | * Write content of a SendSms result into a dump file (mode = all) |
| 258 | 258 | * Used for debugging. |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | */ |
| 263 | 263 | public function dump_sms_result($result) |
| 264 | 264 | { |
| 265 | - // phpcs:enable |
|
| 265 | + // phpcs:enable |
|
| 266 | 266 | global $dolibarr_main_data_root; |
| 267 | 267 | |
| 268 | 268 | if (@is_writable($dolibarr_main_data_root)) { // Avoid fatal error on fopen with open_basedir |
@@ -150,10 +150,10 @@ discard block |
||
| 150 | 150 | if (!getDolGlobalString('MAIN_DISABLE_ALL_SMS')) { |
| 151 | 151 | // Action according to the chose sending method |
| 152 | 152 | if (getDolGlobalString('MAIN_SMS_SENDMODE')) { |
| 153 | - $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE'); // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module' |
|
| 154 | - $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode); // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module' |
|
| 153 | + $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE'); // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module' |
|
| 154 | + $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode); // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module' |
|
| 155 | 155 | if ($classmoduleofsender == 'ovh') { |
| 156 | - $classmoduleofsender = 'ovhsms@ovh'; // For backward compatibility |
|
| 156 | + $classmoduleofsender = 'ovhsms@ovh'; // For backward compatibility |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | $tmp = explode('@', $classmoduleofsender); |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | // Send sms method not correctly defined |
| 210 | 210 | // -------------------------------------- |
| 211 | 211 | $this->error = 'Bad value for MAIN_SMS_SENDMODE constant'; |
| 212 | - $res = false; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 212 | + $res = false; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 213 | 213 | } |
| 214 | 214 | } else { |
| 215 | 215 | $this->error = 'No sms sent. Feature is disabled by option MAIN_DISABLE_ALL_SMS'; |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | //print ' => template_dir='.$this->template_dir.'<br>'; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 142 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 143 | 143 | /** |
| 144 | 144 | * Shared method for canvas to assign values for templates |
| 145 | 145 | * |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | */ |
| 151 | 151 | public function assign_values(&$action = 'view', $id = 0, $ref = '') |
| 152 | 152 | { |
| 153 | - // phpcs:enable |
|
| 153 | + // phpcs:enable |
|
| 154 | 154 | if (is_object($this->control) && method_exists($this->control, 'assign_values')) { |
| 155 | 155 | $this->control->assign_values($action, $id, $ref); |
| 156 | 156 | } |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 179 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 180 | 180 | /** |
| 181 | 181 | * Display a canvas page. This will include the template for output. |
| 182 | 182 | * Variables used by templates may have been defined or loaded before into the assign_values function. |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | */ |
| 187 | 187 | public function display_canvas($action) |
| 188 | 188 | { |
| 189 | - // phpcs:enable |
|
| 189 | + // phpcs:enable |
|
| 190 | 190 | global $db, $conf, $langs, $user, $canvas; |
| 191 | 191 | global $form, $formfile; |
| 192 | 192 | |
@@ -847,7 +847,7 @@ discard block |
||
| 847 | 847 | return $this->LibStatut($this->status, $mode); |
| 848 | 848 | } |
| 849 | 849 | |
| 850 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 850 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 851 | 851 | /** |
| 852 | 852 | * Return the status |
| 853 | 853 | * |
@@ -857,7 +857,7 @@ discard block |
||
| 857 | 857 | */ |
| 858 | 858 | public function LibStatut($status, $mode = 0) |
| 859 | 859 | { |
| 860 | - // phpcs:enable |
|
| 860 | + // phpcs:enable |
|
| 861 | 861 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
| 862 | 862 | global $langs; |
| 863 | 863 | //$langs->load("timespent@timespent"); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 120 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 121 | 121 | /** |
| 122 | 122 | * Output edit area inside the HTML stream. |
| 123 | 123 | * Output depends on this->tool (fckeditor, ckeditor, textarea, ...) |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $titlecontent = '', $option = '', $moreparam = '', $morecss = '') |
| 135 | 135 | { |
| 136 | - // phpcs:enable |
|
| 136 | + // phpcs:enable |
|
| 137 | 137 | global $conf, $langs; |
| 138 | 138 | |
| 139 | 139 | $fullpage = false; |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | define('REQUIRE_CKEDITOR', '1'); |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa'); // default with ckeditor 4.6 : moono-lisa |
|
| 161 | + $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa'); // default with ckeditor 4.6 : moono-lisa |
|
| 162 | 162 | |
| 163 | 163 | $pluginstodisable = 'elementspath,save,flash,div,anchor'; |
| 164 | 164 | if (!getDolGlobalString('FCKEDITOR_ENABLE_SPECIALCHAR')) { |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | filebrowserImageWindowWidth : \'900\', |
| 260 | 260 | filebrowserImageWindowHeight : \'500\''; |
| 261 | 261 | } |
| 262 | - $out .= ' })' . $morejs; // end CKEditor.replace |
|
| 262 | + $out .= ' })' . $morejs; // end CKEditor.replace |
|
| 263 | 263 | // Show the CKEditor javascript object once loaded is ready 'For debug) |
| 264 | 264 | //$out .= '; CKEDITOR.on(\'instanceReady\', function(ck) { ck.editor.removeMenuItem(\'maximize\'); ck.editor.removeMenuItem(\'Undo\'); ck.editor.removeMenuItem(\'undo\'); console.log(ck.editor); console.log(ck.editor.toolbar[0]); }); '; |
| 265 | 265 | $out .= '});' . "\n"; // end document.ready |
@@ -1337,7 +1337,7 @@ discard block |
||
| 1337 | 1337 | return '=?' . $conf->file->character_set_client . '?B?' . base64_encode($stringtoencode) . '?='; |
| 1338 | 1338 | } |
| 1339 | 1339 | |
| 1340 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1340 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1341 | 1341 | /** |
| 1342 | 1342 | * Read a file on disk and return encoded content for emails (mode = 'mail') |
| 1343 | 1343 | * |
@@ -1346,7 +1346,7 @@ discard block |
||
| 1346 | 1346 | */ |
| 1347 | 1347 | private function _encode_file($sourcefile) |
| 1348 | 1348 | { |
| 1349 | - // phpcs:enable |
|
| 1349 | + // phpcs:enable |
|
| 1350 | 1350 | $newsourcefile = dol_osencode($sourcefile); |
| 1351 | 1351 | |
| 1352 | 1352 | if (is_readable($newsourcefile)) { |
@@ -1361,7 +1361,7 @@ discard block |
||
| 1361 | 1361 | } |
| 1362 | 1362 | |
| 1363 | 1363 | |
| 1364 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1364 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1365 | 1365 | /** |
| 1366 | 1366 | * Write content of a SMTP request into a dump file (mode = all) |
| 1367 | 1367 | * Used for debugging. |
@@ -1371,7 +1371,7 @@ discard block |
||
| 1371 | 1371 | */ |
| 1372 | 1372 | public function dump_mail() |
| 1373 | 1373 | { |
| 1374 | - // phpcs:enable |
|
| 1374 | + // phpcs:enable |
|
| 1375 | 1375 | global $dolibarr_main_data_root; |
| 1376 | 1376 | |
| 1377 | 1377 | if (@is_writable($dolibarr_main_data_root)) { // Avoid fatal error on fopen with open_basedir |
@@ -1402,7 +1402,7 @@ discard block |
||
| 1402 | 1402 | } |
| 1403 | 1403 | } |
| 1404 | 1404 | |
| 1405 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1405 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1406 | 1406 | /** |
| 1407 | 1407 | * Save content if mail is in error |
| 1408 | 1408 | * Used for debugging. |
@@ -1499,7 +1499,7 @@ discard block |
||
| 1499 | 1499 | } |
| 1500 | 1500 | |
| 1501 | 1501 | |
| 1502 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1502 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1503 | 1503 | /** |
| 1504 | 1504 | * Create SMTP headers (mode = 'mail') |
| 1505 | 1505 | * |
@@ -1507,7 +1507,7 @@ discard block |
||
| 1507 | 1507 | */ |
| 1508 | 1508 | public function write_smtpheaders() |
| 1509 | 1509 | { |
| 1510 | - // phpcs:enable |
|
| 1510 | + // phpcs:enable |
|
| 1511 | 1511 | $out = ""; |
| 1512 | 1512 | $host = dol_getprefix('email'); |
| 1513 | 1513 | |
@@ -1571,7 +1571,7 @@ discard block |
||
| 1571 | 1571 | } |
| 1572 | 1572 | |
| 1573 | 1573 | |
| 1574 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1574 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1575 | 1575 | /** |
| 1576 | 1576 | * Create header MIME (mode = 'mail') |
| 1577 | 1577 | * |
@@ -1581,7 +1581,7 @@ discard block |
||
| 1581 | 1581 | */ |
| 1582 | 1582 | public function write_mimeheaders($filename_list, $mimefilename_list) |
| 1583 | 1583 | { |
| 1584 | - // phpcs:enable |
|
| 1584 | + // phpcs:enable |
|
| 1585 | 1585 | $mimedone = 0; |
| 1586 | 1586 | $out = ""; |
| 1587 | 1587 | |
@@ -1601,7 +1601,7 @@ discard block |
||
| 1601 | 1601 | return $out; |
| 1602 | 1602 | } |
| 1603 | 1603 | |
| 1604 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1604 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1605 | 1605 | /** |
| 1606 | 1606 | * Return email content (mode = 'mail') |
| 1607 | 1607 | * |
@@ -1610,7 +1610,7 @@ discard block |
||
| 1610 | 1610 | */ |
| 1611 | 1611 | public function write_body($msgtext) |
| 1612 | 1612 | { |
| 1613 | - // phpcs:enable |
|
| 1613 | + // phpcs:enable |
|
| 1614 | 1614 | global $conf; |
| 1615 | 1615 | |
| 1616 | 1616 | $out = ''; |
@@ -1694,7 +1694,7 @@ discard block |
||
| 1694 | 1694 | return $out; |
| 1695 | 1695 | } |
| 1696 | 1696 | |
| 1697 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1697 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1698 | 1698 | /** |
| 1699 | 1699 | * Attach file to email (mode = 'mail') |
| 1700 | 1700 | * |
@@ -1706,7 +1706,7 @@ discard block |
||
| 1706 | 1706 | */ |
| 1707 | 1707 | private function write_files($filename_list, $mimetype_list, $mimefilename_list, $cidlist) |
| 1708 | 1708 | { |
| 1709 | - // phpcs:enable |
|
| 1709 | + // phpcs:enable |
|
| 1710 | 1710 | $out = ''; |
| 1711 | 1711 | |
| 1712 | 1712 | $filename_list_size = count($filename_list); |
@@ -1745,7 +1745,7 @@ discard block |
||
| 1745 | 1745 | } |
| 1746 | 1746 | |
| 1747 | 1747 | |
| 1748 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1748 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1749 | 1749 | /** |
| 1750 | 1750 | * Attach an image to email (mode = 'mail') |
| 1751 | 1751 | * |
@@ -1754,7 +1754,7 @@ discard block |
||
| 1754 | 1754 | */ |
| 1755 | 1755 | public function write_images($images_list) |
| 1756 | 1756 | { |
| 1757 | - // phpcs:enable |
|
| 1757 | + // phpcs:enable |
|
| 1758 | 1758 | $out = ''; |
| 1759 | 1759 | |
| 1760 | 1760 | if (is_array($images_list)) { |
@@ -1776,7 +1776,7 @@ discard block |
||
| 1776 | 1776 | } |
| 1777 | 1777 | |
| 1778 | 1778 | |
| 1779 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1779 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1780 | 1780 | /** |
| 1781 | 1781 | * Try to create a socket connection |
| 1782 | 1782 | * |
@@ -1786,7 +1786,7 @@ discard block |
||
| 1786 | 1786 | */ |
| 1787 | 1787 | public function check_server_port($host, $port) |
| 1788 | 1788 | { |
| 1789 | - // phpcs:enable |
|
| 1789 | + // phpcs:enable |
|
| 1790 | 1790 | global $conf; |
| 1791 | 1791 | |
| 1792 | 1792 | $_retVal = 0; |
@@ -1857,7 +1857,7 @@ discard block |
||
| 1857 | 1857 | return $_retVal; |
| 1858 | 1858 | } |
| 1859 | 1859 | |
| 1860 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1860 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1861 | 1861 | /** |
| 1862 | 1862 | * This function has been modified as provided by SirSir to allow multiline responses when |
| 1863 | 1863 | * using SMTP Extensions. |
@@ -1868,7 +1868,7 @@ discard block |
||
| 1868 | 1868 | */ |
| 1869 | 1869 | public function server_parse($socket, $response) |
| 1870 | 1870 | { |
| 1871 | - // phpcs:enable |
|
| 1871 | + // phpcs:enable |
|
| 1872 | 1872 | $_retVal = true; // Indicates if Object was created or not |
| 1873 | 1873 | $server_response = ''; |
| 1874 | 1874 | |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | } |
| 351 | 351 | } |
| 352 | 352 | if ($emailtoadd && preg_match('/' . preg_quote($emailtoadd, '/') . '/i', $to)) { |
| 353 | - $emailtoadd = ''; // Email already in the "To" |
|
| 353 | + $emailtoadd = ''; // Email already in the "To" |
|
| 354 | 354 | } |
| 355 | 355 | if ($emailtoadd) { |
| 356 | 356 | $listofemailstoadd[$key] = $emailtoadd; |
@@ -1107,8 +1107,8 @@ discard block |
||
| 1107 | 1107 | } |
| 1108 | 1108 | |
| 1109 | 1109 | $smtperrorcode = 0; |
| 1110 | - if (! $result) { |
|
| 1111 | - $smtperrorcode = $this->smtps->lastretval; // SMTP error code |
|
| 1110 | + if (!$result) { |
|
| 1111 | + $smtperrorcode = $this->smtps->lastretval; // SMTP error code |
|
| 1112 | 1112 | dol_syslog("CMailFile::sendfile: mail SMTP error code " . $smtperrorcode, LOG_WARNING); |
| 1113 | 1113 | |
| 1114 | 1114 | if ($smtperrorcode == '421') { // Try later |
@@ -1126,10 +1126,10 @@ discard block |
||
| 1126 | 1126 | } |
| 1127 | 1127 | } |
| 1128 | 1128 | |
| 1129 | - $result = $this->smtps->getErrors(); // applicative error code (not SMTP error code) |
|
| 1129 | + $result = $this->smtps->getErrors(); // applicative error code (not SMTP error code) |
|
| 1130 | 1130 | if (empty($this->error) && empty($result)) { |
| 1131 | 1131 | dol_syslog("CMailFile::sendfile: mail end success", LOG_DEBUG); |
| 1132 | - $res = true; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 1132 | + $res = true; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 1133 | 1133 | } else { |
| 1134 | 1134 | if (empty($this->error)) { |
| 1135 | 1135 | $this->error = $result; |
@@ -1376,7 +1376,7 @@ discard block |
||
| 1376 | 1376 | |
| 1377 | 1377 | if (@is_writable($dolibarr_main_data_root)) { // Avoid fatal error on fopen with open_basedir |
| 1378 | 1378 | $outputfile = $dolibarr_main_data_root . "/dolibarr_mail.log"; |
| 1379 | - $fp = fopen($outputfile, "w"); // overwrite |
|
| 1379 | + $fp = fopen($outputfile, "w"); // overwrite |
|
| 1380 | 1380 | |
| 1381 | 1381 | if ($this->sendmode == 'mail') { |
| 1382 | 1382 | fwrite($fp, $this->headers); |
@@ -1634,7 +1634,7 @@ discard block |
||
| 1634 | 1634 | // Similar code to forge a text from html is also in smtps.class.php |
| 1635 | 1635 | $strContentAltText = preg_replace("/<br\s*[^>]*>/", " ", $strContent); |
| 1636 | 1636 | // TODO We could replace <img ...> with [Filename.ext] like Gmail do. |
| 1637 | - $strContentAltText = html_entity_decode(strip_tags($strContentAltText)); // Remove any HTML tags |
|
| 1637 | + $strContentAltText = html_entity_decode(strip_tags($strContentAltText)); // Remove any HTML tags |
|
| 1638 | 1638 | $strContentAltText = trim(wordwrap($strContentAltText, 75, !getDolGlobalString('MAIN_FIX_FOR_BUGGED_MTA') ? "\r\n" : "\n")); |
| 1639 | 1639 | |
| 1640 | 1640 | // Check if html header already in message, if not complete the message |
@@ -2019,7 +2019,7 @@ discard block |
||
| 2019 | 2019 | // We save the image to send in disk |
| 2020 | 2020 | $filecontent = $matches[2][$key]; |
| 2021 | 2021 | |
| 2022 | - $cid = 'cid000' . dol_hash($filecontent, 'md5'); // The id must not change if image is same |
|
| 2022 | + $cid = 'cid000' . dol_hash($filecontent, 'md5'); // The id must not change if image is same |
|
| 2023 | 2023 | |
| 2024 | 2024 | $destfiletmp = $images_dir . '/' . $cid . '.' . $ext; |
| 2025 | 2025 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | |
| 115 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 115 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 116 | 116 | /** |
| 117 | 117 | * Function to build pdf onto disk |
| 118 | 118 | * |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | */ |
| 127 | 127 | public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
| 128 | 128 | { |
| 129 | - // phpcs:enable |
|
| 129 | + // phpcs:enable |
|
| 130 | 130 | global $user, $langs, $conf, $mysoc, $hookmanager; |
| 131 | 131 | |
| 132 | 132 | if (!is_object($outputlangs)) { |
@@ -594,8 +594,8 @@ discard block |
||
| 594 | 594 | return 0; |
| 595 | 595 | } |
| 596 | 596 | |
| 597 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 598 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 597 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 598 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 599 | 599 | /** |
| 600 | 600 | * Show miscellaneous information (payment mode, payment term, ...) |
| 601 | 601 | * |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | */ |
| 608 | 608 | protected function _tableau_info(&$pdf, $object, $posy, $outputlangs) |
| 609 | 609 | { |
| 610 | - // phpcs:enable |
|
| 610 | + // phpcs:enable |
|
| 611 | 611 | global $conf, $mysoc; |
| 612 | 612 | $default_font_size = pdf_getPDFFontSize($outputlangs); |
| 613 | 613 | |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | |
| 628 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 628 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 629 | 629 | /** |
| 630 | 630 | * Show table for lines |
| 631 | 631 | * |
@@ -675,7 +675,7 @@ discard block |
||
| 675 | 675 | } |
| 676 | 676 | } |
| 677 | 677 | |
| 678 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 678 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 679 | 679 | /** |
| 680 | 680 | * Show top header of page. |
| 681 | 681 | * |
@@ -853,7 +853,7 @@ discard block |
||
| 853 | 853 | return 0; |
| 854 | 854 | } |
| 855 | 855 | |
| 856 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 856 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 857 | 857 | /** |
| 858 | 858 | * Show footer of page. Need this->emetteur object |
| 859 | 859 | * |
@@ -822,7 +822,7 @@ |
||
| 822 | 822 | if ($this->page_largeur < 210) { |
| 823 | 823 | $widthrecbox = 84; // To work with US executive format |
| 824 | 824 | } |
| 825 | - $posy = 42; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 825 | + $posy = 42; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 826 | 826 | $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; |
| 827 | 827 | if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) { |
| 828 | 828 | $posx = $this->marge_gauche; |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | |
| 136 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 136 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 137 | 137 | /** |
| 138 | 138 | * Function to build pdf onto disk |
| 139 | 139 | * |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | */ |
| 148 | 148 | public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
| 149 | 149 | { |
| 150 | - // phpcs:enable |
|
| 150 | + // phpcs:enable |
|
| 151 | 151 | global $user, $langs, $conf, $mysoc, $hookmanager; |
| 152 | 152 | |
| 153 | 153 | if (!is_object($outputlangs)) { |
@@ -587,8 +587,8 @@ discard block |
||
| 587 | 587 | return 0; |
| 588 | 588 | } |
| 589 | 589 | |
| 590 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 591 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 590 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 591 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 592 | 592 | /** |
| 593 | 593 | * Show miscellaneous information (payment mode, payment term, ...) |
| 594 | 594 | * |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | */ |
| 601 | 601 | protected function _tableau_info(&$pdf, $object, $posy, $outputlangs) |
| 602 | 602 | { |
| 603 | - // phpcs:enable |
|
| 603 | + // phpcs:enable |
|
| 604 | 604 | global $conf, $mysoc; |
| 605 | 605 | $default_font_size = pdf_getPDFFontSize($outputlangs); |
| 606 | 606 | |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | $pdf->MultiCell($larg_sign, 2, $outputlangs->trans("ForCustomer") . ':', '', 'L'); |
| 618 | 618 | } |
| 619 | 619 | |
| 620 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 620 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 621 | 621 | /** |
| 622 | 622 | * Show table for lines |
| 623 | 623 | * |
@@ -683,7 +683,7 @@ discard block |
||
| 683 | 683 | } |
| 684 | 684 | } |
| 685 | 685 | |
| 686 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 686 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 687 | 687 | /** |
| 688 | 688 | * Show top header of page. |
| 689 | 689 | * |
@@ -861,7 +861,7 @@ discard block |
||
| 861 | 861 | return 0; |
| 862 | 862 | } |
| 863 | 863 | |
| 864 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 864 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 865 | 865 | /** |
| 866 | 866 | * Show footer of page. Need this->emetteur object |
| 867 | 867 | * |
@@ -71,8 +71,8 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public $version = 'dolibarr'; |
| 73 | 73 | |
| 74 | - public $posxcomm; // For customer comment column |
|
| 75 | - public $posxweightvol; // For weight or volume |
|
| 74 | + public $posxcomm; // For customer comment column |
|
| 75 | + public $posxweightvol; // For weight or volume |
|
| 76 | 76 | public $posxremainingqty; |
| 77 | 77 | |
| 78 | 78 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | // Define position of columns |
| 117 | 117 | $this->posxdesc = $this->marge_gauche + 1; |
| 118 | - $this->posxcomm = 112; // customer comment |
|
| 118 | + $this->posxcomm = 112; // customer comment |
|
| 119 | 119 | //$this->posxtva=112; |
| 120 | 120 | //$this->posxup=126; |
| 121 | 121 | $this->posxqty = 165; |
@@ -830,7 +830,7 @@ discard block |
||
| 830 | 830 | if ($this->page_largeur < 210) { |
| 831 | 831 | $widthrecbox = 84; // To work with US executive format |
| 832 | 832 | } |
| 833 | - $posy = 42; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 833 | + $posy = 42; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 834 | 834 | $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; |
| 835 | 835 | if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) { |
| 836 | 836 | $posx = $this->marge_gauche; |