@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | return $pass; |
176 | 176 | } |
177 | 177 | |
178 | - return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible |
|
178 | + return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | /** |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | { |
190 | 190 | global $langs; |
191 | 191 | |
192 | - $this->initAll(); // For the case this method is called alone |
|
192 | + $this->initAll(); // For the case this method is called alone |
|
193 | 193 | |
194 | 194 | $password_a = preg_split('//u', $password, 0, PREG_SPLIT_NO_EMPTY); |
195 | 195 | $maj = preg_split('//u', $this->Maj, 0, PREG_SPLIT_NO_EMPTY); |
@@ -1682,7 +1682,7 @@ |
||
1682 | 1682 | |
1683 | 1683 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
1684 | 1684 | |
1685 | - $mode = 'target'; |
|
1685 | + $mode = 'target'; |
|
1686 | 1686 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); |
1687 | 1687 | |
1688 | 1688 | // Show recipient |
@@ -210,7 +210,7 @@ |
||
210 | 210 | $maxfilesizearray = getMaxFileSizeArray(); |
211 | 211 | $maxmin = $maxfilesizearray['maxmin']; |
212 | 212 | if ($maxmin > 0) { |
213 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
213 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
214 | 214 | } |
215 | 215 | $texte .= ' <input type="file" name="uploadfile">'; |
216 | 216 | $texte .= '<input type="hidden" value="PROPALE_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | // Boxes |
96 | 96 | $this->boxes = array(); // List of boxes |
97 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
97 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
98 | 98 | |
99 | 99 | // Add here list of php file(s) stored in core/boxes that contains class to show a box. |
100 | 100 | // Example: |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | // Permissions |
108 | 108 | $this->rights = array(); // Permission array used by this module |
109 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
109 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
110 | 110 | |
111 | 111 | // Add here list of permission defined by an id, a label, a boolean and two constant strings. |
112 | 112 | // Example: |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | // Main menu entries |
122 | 122 | $this->menu = array(); // List of menus to add |
123 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
123 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
124 | 124 | |
125 | 125 | // Add here entries to declare new menus |
126 | 126 | // Example to declare the Top Menu entry: |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function getExample() |
83 | 83 | { |
84 | - return $this->prefix . '0-0501-0001'; // TC0-0501-0001 |
|
84 | + return $this->prefix . '0-0501-0001'; // TC0-0501-0001 |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -98,10 +98,10 @@ discard block |
||
98 | 98 | $pryymm = ''; |
99 | 99 | $max = ''; |
100 | 100 | |
101 | - $pos_source = 0; // POS source = Terminal ID |
|
101 | + $pos_source = 0; // POS source = Terminal ID |
|
102 | 102 | |
103 | 103 | // First, we get the max value |
104 | - $posindice = strlen($this->prefix . $pos_source . '-____-') + 1; // So posindice is position after TCX-YYMM- |
|
104 | + $posindice = strlen($this->prefix . $pos_source . '-____-') + 1; // So posindice is position after TCX-YYMM- |
|
105 | 105 | |
106 | 106 | $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM " . $posindice . ") AS SIGNED)) as max"; |
107 | 107 | $sql .= " FROM " . MAIN_DB_PREFIX . "facture"; |
@@ -141,10 +141,10 @@ discard block |
||
141 | 141 | { |
142 | 142 | global $db; |
143 | 143 | |
144 | - $pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID |
|
144 | + $pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID |
|
145 | 145 | |
146 | 146 | // First, we get the max value |
147 | - $posindice = strlen($this->prefix . $pos_source . '-____-') + 1; // So posindice is position after TCX-YYMM- |
|
147 | + $posindice = strlen($this->prefix . $pos_source . '-____-') + 1; // So posindice is position after TCX-YYMM- |
|
148 | 148 | $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM " . $posindice . ") AS SIGNED)) as max"; // This is standard SQL |
149 | 149 | $sql .= " FROM " . MAIN_DB_PREFIX . "facture"; |
150 | 150 | $sql .= " WHERE ref LIKE '" . $db->escape($this->prefix . $pos_source . "-____-%") . "'"; |
@@ -199,7 +199,7 @@ |
||
199 | 199 | $maxfilesizearray = getMaxFileSizeArray(); |
200 | 200 | $maxmin = $maxfilesizearray['maxmin']; |
201 | 201 | if ($maxmin > 0) { |
202 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
202 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
203 | 203 | } |
204 | 204 | $texte .= ' <input type="file" name="uploadfile">'; |
205 | 205 | $texte .= '<input type="hidden" value="USERGROUP_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -120,7 +120,7 @@ |
||
120 | 120 | $code = trim($code); |
121 | 121 | |
122 | 122 | if (empty($code) && $this->code_null && !getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED')) { |
123 | - $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
123 | + $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
124 | 124 | } elseif (empty($code) && (!$this->code_null || getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED'))) { |
125 | 125 | $result = -2; |
126 | 126 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $code = strtoupper(trim($code)); |
166 | 166 | |
167 | 167 | if (empty($code) && $this->code_null && !getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED')) { |
168 | - $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
168 | + $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
169 | 169 | } elseif (empty($code) && (!$this->code_null || getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED'))) { |
170 | 170 | $result = -2; |
171 | 171 | } else { |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | if ($is_dispo != 0) { |
175 | 175 | $result = -3; |
176 | 176 | } else { |
177 | - $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
177 | + $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
178 | 178 | } |
179 | 179 | } else { |
180 | 180 | if (dol_strlen($code) == 0) { |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | if (dol_strlen($code) < 11) { |
244 | 244 | $res = -1; |
245 | 245 | } else { |
246 | - $res = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
246 | + $res = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
247 | 247 | } |
248 | 248 | return $res; |
249 | 249 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $maxfilesizearray = getMaxFileSizeArray(); |
169 | 169 | $maxmin = $maxfilesizearray['maxmin']; |
170 | 170 | if ($maxmin > 0) { |
171 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
171 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
172 | 172 | } |
173 | 173 | $texte .= ' <input type="file" name="uploadfile">'; |
174 | 174 | $texte .= '<input type="hidden" value="COMPANY_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
248 | 248 | if (getDolGlobalString('MAIN_DOC_USE_OBJECT_THIRDPARTY_NAME')) { |
249 | 249 | $newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)) . '-' . $newfiletmp; |
250 | - $newfiletmp = preg_replace('/__+/', '_', $newfiletmp); // Replace repeated _ into one _ (to avoid string with substitution syntax) |
|
250 | + $newfiletmp = preg_replace('/__+/', '_', $newfiletmp); // Replace repeated _ into one _ (to avoid string with substitution syntax) |
|
251 | 251 | } |
252 | 252 | if (getDolGlobalString('MAIN_DOC_USE_TIMING')) { |
253 | 253 | $format = getDolGlobalString('MAIN_DOC_USE_TIMING'); |