@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | public function __construct($db) |
45 | 45 | { |
46 | - global $langs, $conf; // $langs may be used by the tpl files. |
|
46 | + global $langs, $conf; // $langs may be used by the tpl files. |
|
47 | 47 | |
48 | 48 | $this->db = $db; |
49 | 49 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | public $version = 'dolibarr'; |
54 | 54 | |
55 | 55 | |
56 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
56 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
57 | 57 | /** |
58 | 58 | * Return list of active generation modules |
59 | 59 | * |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public static function liste_modeles($db, $maxfilenamelength = 0) |
65 | 65 | { |
66 | - // phpcs:enable |
|
66 | + // phpcs:enable |
|
67 | 67 | $type = 'movement'; |
68 | 68 | $list = array(); |
69 | 69 |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | } |
124 | 124 | |
125 | 125 | |
126 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
126 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
127 | 127 | /** |
128 | 128 | * Function to build a document on disk using the generic odt module. |
129 | 129 | * |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
139 | 139 | { |
140 | - // phpcs:enable |
|
140 | + // phpcs:enable |
|
141 | 141 | global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; |
142 | 142 | |
143 | 143 | dol_syslog("write_file outputlangs->defaultlang=" . (is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); |
@@ -775,7 +775,7 @@ discard block |
||
775 | 775 | } |
776 | 776 | } |
777 | 777 | |
778 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
778 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
779 | 779 | /** |
780 | 780 | * Show table for lines |
781 | 781 | * |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | $pdf->SetLineStyle(array('dash' => 0)); |
900 | 900 | } |
901 | 901 | |
902 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
902 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
903 | 903 | /** |
904 | 904 | * Show top header of page. |
905 | 905 | * |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | return $top_shift; |
1123 | 1123 | } |
1124 | 1124 | |
1125 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1125 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1126 | 1126 | /** |
1127 | 1127 | * Show footer of page. Need this->emetteur object |
1128 | 1128 | * |
@@ -143,11 +143,11 @@ discard block |
||
143 | 143 | |
144 | 144 | // Add here list of permission defined by an id, a label, a boolean and two constant strings. |
145 | 145 | // Example: |
146 | - $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) |
|
146 | + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) |
|
147 | 147 | $this->rights[$r][1] = 'Generate/modify users API key'; // Permission label |
148 | - $this->rights[$r][3] = 0; // Permission by default for new user (0/1) |
|
149 | - $this->rights[$r][4] = 'apikey'; // In php code, permission will be checked by test if ($user->hasRight('permkey','level1','level2')) |
|
150 | - $this->rights[$r][5] = 'generate'; // In php code, permission will be checked by test if ($user->hasRight('permkey','level1','level2')) |
|
148 | + $this->rights[$r][3] = 0; // Permission by default for new user (0/1) |
|
149 | + $this->rights[$r][4] = 'apikey'; // In php code, permission will be checked by test if ($user->hasRight('permkey','level1','level2')) |
|
150 | + $this->rights[$r][5] = 'generate'; // In php code, permission will be checked by test if ($user->hasRight('permkey','level1','level2')) |
|
151 | 151 | $r++; |
152 | 152 | |
153 | 153 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | { |
231 | 231 | // Remove old constants with entity fields different of 0 |
232 | 232 | $sql = array( |
233 | - "DELETE FROM " . MAIN_DB_PREFIX . "const WHERE name = " . $this->db->encrypt('MAIN_MODULE_API'), // API can't be enabled per environment. Why ? |
|
233 | + "DELETE FROM " . MAIN_DB_PREFIX . "const WHERE name = " . $this->db->encrypt('MAIN_MODULE_API'), // API can't be enabled per environment. Why ? |
|
234 | 234 | "DELETE FROM " . MAIN_DB_PREFIX . "const WHERE name = " . $this->db->encrypt('API_PRODUCTION_MODE') // Not in production mode by default at activation |
235 | 235 | ); |
236 | 236 |
@@ -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); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | 'p.duration' => "Duration", |
209 | 209 | 'p.finished' => 'Nature', |
210 | 210 | 'p.price_base_type' => "PriceBase", 'p.price' => "UnitPriceHT", 'p.price_ttc' => "UnitPriceTTC", |
211 | - 'p.price_min' => "MinPriceHT",'p.price_min_ttc' => "MinPriceTTC", |
|
211 | + 'p.price_min' => "MinPriceHT", 'p.price_min_ttc' => "MinPriceTTC", |
|
212 | 212 | 'p.tva_tx' => 'VATRate', |
213 | 213 | 'p.datec' => 'DateCreation', 'p.tms' => 'DateModification' |
214 | 214 | ); |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | $this->export_dependencies_array[$r] = array('category' => 'p.rowid'); |
307 | 307 | } |
308 | 308 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
309 | - $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'product as p'; |
|
309 | + $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'product as p'; |
|
310 | 310 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
311 | 311 | $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
312 | 312 | } |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p2.rowid' => "Id", 'p2.ref' => "Ref", 'p2.label' => "Label", 'p2.description' => "Description")); |
462 | 462 | $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p2.rowid' => "subproduct", 'p2.ref' => "subproduct", 'p2.label' => "subproduct", 'p2.description' => "subproduct")); |
463 | 463 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
464 | - $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'product as p'; |
|
464 | + $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'product as p'; |
|
465 | 465 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
466 | 466 | $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
467 | 467 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | abstract class ModelePDFProductBatch extends CommonDocGenerator |
43 | 43 | { |
44 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
44 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
45 | 45 | /** |
46 | 46 | * Return list of active generation modules |
47 | 47 | * |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public static function liste_modeles($db, $maxfilenamelength = 0) |
53 | 53 | { |
54 | - // phpcs:enable |
|
54 | + // phpcs:enable |
|
55 | 55 | $type = 'product_batch'; |
56 | 56 | $list = array(); |
57 | 57 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | abstract class ModelePDFTicket extends CommonDocGenerator |
37 | 37 | { |
38 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
38 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
39 | 39 | /** |
40 | 40 | * Return list of active generation modules |
41 | 41 | * |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public static function liste_modeles($db, $maxfilenamelength = 0) |
47 | 47 | { |
48 | - // phpcs:enable |
|
48 | + // phpcs:enable |
|
49 | 49 | $type = 'ticket'; |
50 | 50 | $list = array(); |
51 | 51 |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | return $texte; |
182 | 182 | } |
183 | 183 | |
184 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
184 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
185 | 185 | /** |
186 | 186 | * Function to build a document on disk using the generic odt module. |
187 | 187 | * |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | */ |
196 | 196 | public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
197 | 197 | { |
198 | - // phpcs:enable |
|
198 | + // phpcs:enable |
|
199 | 199 | global $user, $langs, $conf, $mysoc, $hookmanager; |
200 | 200 | |
201 | 201 | if (empty($srctemplatepath)) { |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | return -1; |
408 | 408 | } |
409 | 409 | |
410 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
410 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
411 | 411 | /** |
412 | 412 | * get substitution array for object |
413 | 413 | * |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | */ |
419 | 419 | public function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') |
420 | 420 | { |
421 | - // phpcs:enable |
|
421 | + // phpcs:enable |
|
422 | 422 | if (!$object instanceof User) { |
423 | 423 | dol_syslog("Expected Ticket object, got " . gettype($object), LOG_ERR); |
424 | 424 | return array(); |
@@ -164,7 +164,7 @@ |
||
164 | 164 | $maxfilesizearray = getMaxFileSizeArray(); |
165 | 165 | $maxmin = $maxfilesizearray['maxmin']; |
166 | 166 | if ($maxmin > 0) { |
167 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
167 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
168 | 168 | } |
169 | 169 | $texte .= ' <input type="file" name="uploadfile">'; |
170 | 170 | $texte .= '<input type="hidden" value="TICKET_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |