@@ -51,10 +51,10 @@ |
||
51 | 51 | $constantes = array( |
52 | 52 | 'MEMBER_REMINDER_EMAIL'=>array('type'=>'yesno', 'label'=>$langs->trans('MEMBER_REMINDER_EMAIL', $langs->transnoentities("Module2300Name"))), |
53 | 53 | 'ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION' =>'emailtemplate:member', |
54 | - 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_AUTOREGISTER_MAIL |
|
55 | - 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_VALID |
|
56 | - 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_COTIS |
|
57 | - 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_RESIL |
|
54 | + 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_AUTOREGISTER_MAIL |
|
55 | + 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_VALID |
|
56 | + 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_COTIS |
|
57 | + 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>'emailtemplate:member', // until Dolibarr 7 it was ADHERENT_MAIL_RESIL |
|
58 | 58 | 'ADHERENT_EMAIL_TEMPLATE_EXCLUSION' =>'emailtemplate:member', |
59 | 59 | 'ADHERENT_MAIL_FROM' =>'string', |
60 | 60 | 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT' =>'string', |
@@ -121,7 +121,7 @@ |
||
121 | 121 | $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd"; |
122 | 122 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product"; |
123 | 123 | if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { |
124 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
124 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
125 | 125 | } |
126 | 126 | $sql .= " JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; |
127 | 127 | $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; |
@@ -154,9 +154,9 @@ discard block |
||
154 | 154 | 'p.fk_product_type'=>'Type', 'p.tosell'=>"OnSell", 'p.tobuy'=>"OnBuy", |
155 | 155 | 'p.description'=>"Description", 'p.url'=>"PublicUrl", |
156 | 156 | 'p.customcode'=>'CustomCode', 'p.fk_country'=>'IDCountry', |
157 | - $alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
158 | - $alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
159 | - $alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
157 | + $alias_product_perentity.'.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity.'.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
158 | + $alias_product_perentity.'.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity.'.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
159 | + $alias_product_perentity.'.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity.'.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
160 | 160 | 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', |
161 | 161 | 'p.weight'=>"Weight", 'p.length'=>"Length", 'p.width'=>"Width", 'p.height'=>"Height", 'p.surface'=>"Surface", 'p.volume'=>"Volume", |
162 | 162 | 'p.duration'=>"Duration", |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | 'p.ref'=>"Text", 'p.label'=>"Text", |
198 | 198 | 'p.fk_product_type'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", |
199 | 199 | 'p.description'=>"Text", 'p.url'=>"Text", |
200 | - $alias_product_perentity . '.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text", |
|
201 | - $alias_product_perentity . '.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text", |
|
200 | + $alias_product_perentity.'.accountancy_code_sell'=>"Text", $alias_product_perentity.'.accountancy_code_sell_intra'=>"Text", $alias_product_perentity.'.accountancy_code_sell_export'=>"Text", |
|
201 | + $alias_product_perentity.'.accountancy_code_buy'=>"Text", $alias_product_perentity.'.accountancy_code_buy_intra'=>"Text", $alias_product_perentity.'.accountancy_code_buy_export'=>"Text", |
|
202 | 202 | 'p.note'=>"Text", 'p.note_public'=>"Text", |
203 | 203 | 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.width'=>"Numeric", 'p.height'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", |
204 | 204 | 'p.customcode'=>'Text', |
@@ -257,9 +257,9 @@ discard block |
||
257 | 257 | $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); |
258 | 258 | } |
259 | 259 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
260 | - $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
260 | + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
261 | 261 | if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { |
262 | - $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); |
|
262 | + $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); |
|
263 | 263 | } |
264 | 264 | if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { |
265 | 265 | $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; |
@@ -352,9 +352,9 @@ discard block |
||
352 | 352 | $this->export_permission[$r] = array(array("service", "export")); |
353 | 353 | $this->export_fields_array[$r] = array( |
354 | 354 | 'p.rowid'=>"Id", 'p.ref'=>"Ref", 'p.label'=>"Label", 'p.description'=>"Description", 'p.url'=>"PublicUrl", |
355 | - $alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
356 | - $alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
357 | - $alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
355 | + $alias_product_perentity.'.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity.'.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
356 | + $alias_product_perentity.'.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity.'.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
357 | + $alias_product_perentity.'.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity.'.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
358 | 358 | 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', |
359 | 359 | 'p.weight'=>"Weight", 'p.length'=>"Length", 'p.surface'=>"Surface", 'p.volume'=>"Volume", 'p.customcode'=>'CustomCode', |
360 | 360 | 'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", 'p.tva_tx'=>'VATRate', 'p.tosell'=>"OnSell", |
@@ -369,8 +369,8 @@ discard block |
||
369 | 369 | $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty', 'pa.incdec'=>'ComposedProductIncDecStock')); |
370 | 370 | $this->export_TypeFields_array[$r] = array( |
371 | 371 | 'p.ref'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.url'=>"Text", |
372 | - $alias_product_perentity . 'p.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text", |
|
373 | - $alias_product_perentity . 'p.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text", |
|
372 | + $alias_product_perentity.'p.accountancy_code_sell'=>"Text", $alias_product_perentity.'.accountancy_code_sell_intra'=>"Text", $alias_product_perentity.'.accountancy_code_sell_export'=>"Text", |
|
373 | + $alias_product_perentity.'p.accountancy_code_buy'=>"Text", $alias_product_perentity.'.accountancy_code_buy_intra'=>"Text", $alias_product_perentity.'.accountancy_code_buy_export'=>"Text", |
|
374 | 374 | 'p.note'=>"Text", 'p.note_public'=>"Text", |
375 | 375 | 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text', |
376 | 376 | 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", |
@@ -385,8 +385,8 @@ discard block |
||
385 | 385 | $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric')); |
386 | 386 | $this->export_entities_array[$r] = array( |
387 | 387 | 'p.rowid'=>"virtualproduct", 'p.ref'=>"virtualproduct", 'p.label'=>"virtualproduct", 'p.description'=>"virtualproduct", 'p.url'=>"virtualproduct", |
388 | - $alias_product_perentity . '.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_export'=>'virtualproduct', |
|
389 | - $alias_product_perentity . '.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_export'=>'virtualproduct', |
|
388 | + $alias_product_perentity.'.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_sell_export'=>'virtualproduct', |
|
389 | + $alias_product_perentity.'.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_buy_export'=>'virtualproduct', |
|
390 | 390 | 'p.note'=>"virtualproduct", 'p.length'=>"virtualproduct", |
391 | 391 | 'p.surface'=>"virtualproduct", 'p.volume'=>"virtualproduct", 'p.weight'=>"virtualproduct", 'p.customcode'=>'virtualproduct', |
392 | 392 | 'p.price_base_type'=>"virtualproduct", 'p.price'=>"virtualproduct", 'p.price_ttc'=>"virtualproduct", 'p.tva_tx'=>"virtualproduct", |
@@ -406,9 +406,9 @@ discard block |
||
406 | 406 | $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")); |
407 | 407 | $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")); |
408 | 408 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
409 | - $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
409 | + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
410 | 410 | if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { |
411 | - $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pac ON pac.fk_product = p.rowid AND pac.entity = " . ((int) $conf->entity); |
|
411 | + $this->export_sql_end[$r] .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as pac ON pac.fk_product = p.rowid AND pac.entity = ".((int) $conf->entity); |
|
412 | 412 | } |
413 | 413 | $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,'; |
414 | 414 | $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2'; |
@@ -187,16 +187,16 @@ discard block |
||
187 | 187 | 'p.fk_product_type'=>'Type', 'p.tosell'=>"OnSell", 'p.tobuy'=>"OnBuy", |
188 | 188 | 'p.description'=>"Description", 'p.url'=>"PublicUrl", |
189 | 189 | 'p.customcode'=>'CustomCode', 'p.fk_country'=>'IDCountry', |
190 | - $alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
191 | - $alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
192 | - $alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
190 | + $alias_product_perentity.'.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity.'.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
191 | + $alias_product_perentity.'.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity.'.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
192 | + $alias_product_perentity.'.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity.'.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
193 | 193 | 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', |
194 | 194 | 'p.weight'=>"Weight", 'p.weight_units'=>"WeightUnits", 'p.length'=>"Length", 'p.length_units'=>"LengthUnits", 'p.width'=>"Width", 'p.width_units'=>"WidthUnits", 'p.height'=>"Height", 'p.height_units'=>"HeightUnits", |
195 | 195 | 'p.surface'=>"Surface", 'p.surface_units'=>"SurfaceUnits", 'p.volume'=>"Volume", 'p.volume_units'=>"VolumeUnits", |
196 | 196 | 'p.duration'=>"Duration", |
197 | 197 | 'p.finished' => 'Nature', |
198 | 198 | 'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", |
199 | - 'p.price_min'=>"MinPriceHT",'p.price_min_ttc'=>"MinPriceTTC", |
|
199 | + 'p.price_min'=>"MinPriceHT", 'p.price_min_ttc'=>"MinPriceTTC", |
|
200 | 200 | 'p.tva_tx'=>'VATRate', |
201 | 201 | 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification' |
202 | 202 | ); |
@@ -232,8 +232,8 @@ discard block |
||
232 | 232 | 'p.ref'=>"Text", 'p.label'=>"Text", |
233 | 233 | 'p.fk_product_type'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", |
234 | 234 | 'p.description'=>"Text", 'p.url'=>"Text", |
235 | - $alias_product_perentity . '.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text", |
|
236 | - $alias_product_perentity . '.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text", |
|
235 | + $alias_product_perentity.'.accountancy_code_sell'=>"Text", $alias_product_perentity.'.accountancy_code_sell_intra'=>"Text", $alias_product_perentity.'.accountancy_code_sell_export'=>"Text", |
|
236 | + $alias_product_perentity.'.accountancy_code_buy'=>"Text", $alias_product_perentity.'.accountancy_code_buy_intra'=>"Text", $alias_product_perentity.'.accountancy_code_buy_export'=>"Text", |
|
237 | 237 | 'p.note'=>"Text", 'p.note_public'=>"Text", |
238 | 238 | 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.width'=>"Numeric", 'p.height'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", |
239 | 239 | 'p.customcode'=>'Text', |
@@ -294,9 +294,9 @@ discard block |
||
294 | 294 | $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); |
295 | 295 | } |
296 | 296 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
297 | - $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
297 | + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
298 | 298 | if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { |
299 | - $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); |
|
299 | + $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); |
|
300 | 300 | } |
301 | 301 | if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { |
302 | 302 | $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; |
@@ -391,9 +391,9 @@ discard block |
||
391 | 391 | $this->export_permission[$r] = array(array("produit", "export")); |
392 | 392 | $this->export_fields_array[$r] = array( |
393 | 393 | 'p.rowid'=>"Id", 'p.ref'=>"Ref", 'p.label'=>"Label", 'p.description'=>"Description", 'p.url'=>"PublicUrl", |
394 | - $alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
395 | - $alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
396 | - $alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
394 | + $alias_product_perentity.'.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity.'.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
395 | + $alias_product_perentity.'.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity.'.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
396 | + $alias_product_perentity.'.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity.'.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
397 | 397 | 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', |
398 | 398 | 'p.weight'=>"Weight", 'p.length'=>"Length", 'p.surface'=>"Surface", 'p.volume'=>"Volume", 'p.customcode'=>'CustomCode', |
399 | 399 | 'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", 'p.tva_tx'=>'VATRate', 'p.tosell'=>"OnSell", |
@@ -408,8 +408,8 @@ discard block |
||
408 | 408 | $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty', 'pa.incdec'=>'ComposedProductIncDecStock')); |
409 | 409 | $this->export_TypeFields_array[$r] = array( |
410 | 410 | 'p.ref'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.url'=>"Text", |
411 | - $alias_product_perentity . '.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text", |
|
412 | - $alias_product_perentity . '.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text", |
|
411 | + $alias_product_perentity.'.accountancy_code_sell'=>"Text", $alias_product_perentity.'.accountancy_code_sell_intra'=>"Text", $alias_product_perentity.'.accountancy_code_sell_export'=>"Text", |
|
412 | + $alias_product_perentity.'.accountancy_code_buy'=>"Text", $alias_product_perentity.'.accountancy_code_buy_intra'=>"Text", $alias_product_perentity.'.accountancy_code_buy_export'=>"Text", |
|
413 | 413 | 'p.note'=>"Text", 'p.note_public'=>"Text", |
414 | 414 | 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text', |
415 | 415 | 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", |
@@ -424,8 +424,8 @@ discard block |
||
424 | 424 | $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric')); |
425 | 425 | $this->export_entities_array[$r] = array( |
426 | 426 | 'p.rowid'=>"virtualproduct", 'p.ref'=>"virtualproduct", 'p.label'=>"virtualproduct", 'p.description'=>"virtualproduct", 'p.url'=>"virtualproduct", |
427 | - $alias_product_perentity . '.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_export'=>'virtualproduct', |
|
428 | - $alias_product_perentity . '.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_export'=>'virtualproduct', |
|
427 | + $alias_product_perentity.'.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_sell_export'=>'virtualproduct', |
|
428 | + $alias_product_perentity.'.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_buy_export'=>'virtualproduct', |
|
429 | 429 | 'p.note'=>"virtualproduct", 'p.length'=>"virtualproduct", |
430 | 430 | 'p.surface'=>"virtualproduct", 'p.volume'=>"virtualproduct", 'p.weight'=>"virtualproduct", 'p.customcode'=>'virtualproduct', |
431 | 431 | 'p.price_base_type'=>"virtualproduct", 'p.price'=>"virtualproduct", 'p.price_ttc'=>"virtualproduct", 'p.tva_tx'=>"virtualproduct", |
@@ -445,11 +445,11 @@ discard block |
||
445 | 445 | $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")); |
446 | 446 | $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")); |
447 | 447 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
448 | - $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
448 | + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
449 | 449 | if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { |
450 | - $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); |
|
450 | + $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); |
|
451 | 451 | } |
452 | - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,'; |
|
452 | + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,'; |
|
453 | 453 | $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2'; |
454 | 454 | $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile |
455 | 455 | $this->export_sql_end[$r] .= ' AND p.rowid = pa.fk_product_pere AND p2.rowid = pa.fk_product_fils'; |
@@ -111,7 +111,7 @@ |
||
111 | 111 | $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as l"; |
112 | 112 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product"; |
113 | 113 | if (!empty($conf->global->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_fourn as f ON f.rowid = l.fk_facture_fourn "; |
@@ -110,7 +110,7 @@ |
||
110 | 110 | $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l"; |
111 | 111 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product"; |
112 | 112 | if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { |
113 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
113 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
114 | 114 | } |
115 | 115 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON l.fk_code_ventilation = aa.rowid"; |
116 | 116 | $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = l.fk_facture"; |
@@ -820,7 +820,9 @@ |
||
820 | 820 | } |
821 | 821 | |
822 | 822 | $statusType = 'status'.$status; |
823 | - if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; |
|
823 | + if ($status == self::STATUS_VALIDATED) { |
|
824 | + $statusType = 'status4'; |
|
825 | + } |
|
824 | 826 | if ($status == self::STATUS_CANCELED) { |
825 | 827 | $statusType = 'status6'; |
826 | 828 | } |
@@ -99,7 +99,7 @@ |
||
99 | 99 | /** |
100 | 100 | * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. |
101 | 101 | */ |
102 | - public $fields=array( |
|
102 | + public $fields = array( |
|
103 | 103 | 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), |
104 | 104 | 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'visible'=>5, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", "csslist"=>"nowraponall", "showoncombobox"=>1), |
105 | 105 | 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>20, 'index'=>1), |
@@ -26,7 +26,9 @@ discard block |
||
26 | 26 | define('NOSTYLECHECK', 1); |
27 | 27 | define('USEDOLIBARREDITOR', 1); |
28 | 28 | define('FORCE_CKEDITOR', 1); // We need CKEditor, even if module is off. |
29 | -if (!defined('DISABLE_JS_GRAHP')) define('DISABLE_JS_GRAPH', 1); |
|
29 | +if (!defined('DISABLE_JS_GRAHP')) { |
|
30 | + define('DISABLE_JS_GRAPH', 1); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | //header('X-XSS-Protection:0'); // Disable XSS filtering protection of some browsers (note: use of Content-Security-Policy is more efficient). Disabled as deprecated. |
32 | 34 | |
@@ -592,7 +594,9 @@ discard block |
||
592 | 594 | $arrayotherlang = explode(',', GETPOST('WEBSITE_OTHERLANG', 'alphanohtml')); |
593 | 595 | foreach ($arrayotherlang as $key => $val) { |
594 | 596 | // It possible we have empty val here if postparam WEBSITE_OTHERLANG is empty or set like this : 'en,,sv' or 'en,sv,' |
595 | - if (empty(trim($val))) continue; |
|
597 | + if (empty(trim($val))) { |
|
598 | + continue; |
|
599 | + } |
|
596 | 600 | $arrayotherlang[$key] = substr(trim($val), 0, 2); // Kept short language code only |
597 | 601 | } |
598 | 602 | |
@@ -1336,7 +1340,9 @@ discard block |
||
1336 | 1340 | $arrayotherlang = explode(',', GETPOST('WEBSITE_OTHERLANG', 'alphanohtml')); |
1337 | 1341 | foreach ($arrayotherlang as $key => $val) { |
1338 | 1342 | // It possible we have empty val here if postparam WEBSITE_OTHERLANG is empty or set like this : 'en,,sv' or 'en,sv,' |
1339 | - if (empty(trim($val))) continue; |
|
1343 | + if (empty(trim($val))) { |
|
1344 | + continue; |
|
1345 | + } |
|
1340 | 1346 | $arrayotherlang[$key] = substr(trim($val), 0, 2); // Kept short language code only |
1341 | 1347 | } |
1342 | 1348 | |
@@ -1793,7 +1799,9 @@ discard block |
||
1793 | 1799 | // Under certain conditions $sublang can be an empty string |
1794 | 1800 | // ($object->otherlang with empty string or with string like this 'en,,sv') |
1795 | 1801 | // if is the case we try to re-delete the main alias file. Avoid it. |
1796 | - if (empty(trim($sublang))) continue; |
|
1802 | + if (empty(trim($sublang))) { |
|
1803 | + continue; |
|
1804 | + } |
|
1797 | 1805 | $fileoldaliassub = $dirname.'/'.$sublang.'/'.$filename; |
1798 | 1806 | dol_delete_file($fileoldaliassub); |
1799 | 1807 | } |
@@ -1816,7 +1824,9 @@ discard block |
||
1816 | 1824 | // Under certain conditions $ sublang can be an empty string |
1817 | 1825 | // ($object->otherlang with empty string or with string like this 'en,,sv') |
1818 | 1826 | // if is the case we try to re-delete the main alias file. Avoid it. |
1819 | - if (empty(trim($sublang))) continue; |
|
1827 | + if (empty(trim($sublang))) { |
|
1828 | + continue; |
|
1829 | + } |
|
1820 | 1830 | $fileoldaliassub = $dirname.'/'.$sublang.'/'.$filename; |
1821 | 1831 | dol_delete_file($fileoldaliassub); |
1822 | 1832 | } |
@@ -2903,7 +2913,9 @@ discard block |
||
2903 | 2913 | $onlylang[$website->lang] = $website->lang.' ('.$langs->trans("Default").')'; |
2904 | 2914 | } |
2905 | 2915 | foreach (explode(',', $website->otherlang) as $langkey) { |
2906 | - if (empty(trim($langkey))) continue; |
|
2916 | + if (empty(trim($langkey))) { |
|
2917 | + continue; |
|
2918 | + } |
|
2907 | 2919 | $onlylang[$langkey] = $langkey; |
2908 | 2920 | } |
2909 | 2921 | $textifempty = $langs->trans("Default"); |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | } |
345 | 345 | |
346 | 346 | $usercanedit = $user->rights->website->write; |
347 | -$permissiontoadd = $user->rights->website->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
347 | +$permissiontoadd = $user->rights->website->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
348 | 348 | $permissiontodelete = $user->rights->website->delete; |
349 | 349 | |
350 | 350 | |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | if ($sortorder) { |
411 | 411 | $backtopage .= '&sortorder='.urlencode($sortorder); |
412 | 412 | } |
413 | -include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
413 | +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
414 | 414 | |
415 | 415 | $backtopage = $savbacktopage; |
416 | 416 | //var_dump($backtopage); |
@@ -1479,7 +1479,7 @@ discard block |
||
1479 | 1479 | $error++; |
1480 | 1480 | setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors'); |
1481 | 1481 | } |
1482 | - if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
1482 | + if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
1483 | 1483 | $error++; |
1484 | 1484 | setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors'); |
1485 | 1485 | } |
@@ -1491,7 +1491,7 @@ discard block |
||
1491 | 1491 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
1492 | 1492 | $action = 'preview'; |
1493 | 1493 | if ($backtopage) { |
1494 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1494 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1495 | 1495 | header("Location: ".$backtopage); |
1496 | 1496 | exit; |
1497 | 1497 | } |
@@ -1524,7 +1524,7 @@ discard block |
||
1524 | 1524 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1525 | 1525 | |
1526 | 1526 | // Security analysis |
1527 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1527 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1528 | 1528 | |
1529 | 1529 | if (!$errorphpcheck) { |
1530 | 1530 | $htmlheadercontent = ''; |
@@ -1562,7 +1562,7 @@ discard block |
||
1562 | 1562 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1563 | 1563 | |
1564 | 1564 | // Security analysis |
1565 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1565 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1566 | 1566 | |
1567 | 1567 | if (!$errorphpcheck) { |
1568 | 1568 | $csscontent = ''; |
@@ -1605,7 +1605,7 @@ discard block |
||
1605 | 1605 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1606 | 1606 | |
1607 | 1607 | // Security analysis |
1608 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1608 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1609 | 1609 | |
1610 | 1610 | if (!$errorphpcheck) { |
1611 | 1611 | $jscontent = ''; |
@@ -1643,7 +1643,7 @@ discard block |
||
1643 | 1643 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1644 | 1644 | |
1645 | 1645 | // Security analysis |
1646 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1646 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1647 | 1647 | |
1648 | 1648 | if (!$errorphpcheck) { |
1649 | 1649 | $robotcontent = ''; |
@@ -1681,7 +1681,7 @@ discard block |
||
1681 | 1681 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1682 | 1682 | |
1683 | 1683 | // Security analysis |
1684 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1684 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1685 | 1685 | |
1686 | 1686 | if (!$errorphpcheck) { |
1687 | 1687 | $htaccesscontent = ''; |
@@ -1705,7 +1705,7 @@ discard block |
||
1705 | 1705 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1706 | 1706 | |
1707 | 1707 | // Security analysis |
1708 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1708 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1709 | 1709 | |
1710 | 1710 | if (!$errorphpcheck) { |
1711 | 1711 | $manifestjsoncontent = ''; |
@@ -1743,7 +1743,7 @@ discard block |
||
1743 | 1743 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1744 | 1744 | |
1745 | 1745 | // Security analysis |
1746 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1746 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1747 | 1747 | |
1748 | 1748 | if (!$errorphpcheck) { |
1749 | 1749 | $readmecontent = ''; |
@@ -1781,7 +1781,7 @@ discard block |
||
1781 | 1781 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1782 | 1782 | |
1783 | 1783 | // Security analysis |
1784 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1784 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1785 | 1785 | |
1786 | 1786 | if (!$errorphpcheck) { |
1787 | 1787 | $licensecontent = ''; |
@@ -1823,7 +1823,7 @@ discard block |
||
1823 | 1823 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
1824 | 1824 | $action = 'preview'; |
1825 | 1825 | if ($backtopage) { |
1826 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1826 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1827 | 1827 | header("Location: ".$backtopage); |
1828 | 1828 | exit; |
1829 | 1829 | } |
@@ -1842,7 +1842,7 @@ discard block |
||
1842 | 1842 | |
1843 | 1843 | $object->fk_default_home = $pageid; |
1844 | 1844 | $res = $object->update($user); |
1845 | - if (! ($res > 0)) { |
|
1845 | + if (!($res > 0)) { |
|
1846 | 1846 | $error++; |
1847 | 1847 | setEventMessages($object->error, $object->errors, 'errors'); |
1848 | 1848 | } |
@@ -2421,7 +2421,7 @@ discard block |
||
2421 | 2421 | $fileofzip = ''; |
2422 | 2422 | if (GETPOSTISSET('templateuserfile')) { |
2423 | 2423 | // Case we selected one template |
2424 | - $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
2424 | + $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
2425 | 2425 | } elseif (!empty($_FILES)) { |
2426 | 2426 | // Case we upload a new template |
2427 | 2427 | if (is_array($_FILES['userfile']['tmp_name'])) { |
@@ -2544,7 +2544,7 @@ discard block |
||
2544 | 2544 | if ($objp->virtualhost) { |
2545 | 2545 | $domainname = $objp->virtualhost; |
2546 | 2546 | } |
2547 | - if (! preg_match('/^http/i', $domainname)) { |
|
2547 | + if (!preg_match('/^http/i', $domainname)) { |
|
2548 | 2548 | $domainname = 'https://'.$domainname; |
2549 | 2549 | } |
2550 | 2550 | //$pathofpage = $dolibarr_main_url_root.'/'.$pageurl.'.php'; |
@@ -2552,7 +2552,7 @@ discard block |
||
2552 | 2552 | // URL of sitemaps must end with trailing slash if page is '' |
2553 | 2553 | $loc = $domtree->createElement('loc', $domainname.'/'.$pageurl); |
2554 | 2554 | $lastmod = $domtree->createElement('lastmod', dol_print_date($db->jdate($objp->tms), 'dayrfc', 'gmt')); |
2555 | - $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2555 | + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2556 | 2556 | $priority = $domtree->createElement('priority', '1'); |
2557 | 2557 | |
2558 | 2558 | $url->appendChild($loc); |
@@ -2727,7 +2727,7 @@ discard block |
||
2727 | 2727 | |
2728 | 2728 | print "\n"; |
2729 | 2729 | print '<!-- Open form for all page -->'."\n"; |
2730 | -print '<form action="'.$_SERVER["PHP_SELF"].($action == 'file_manager' ? '?uploadform=1': '').'" method="POST" enctype="multipart/form-data" class="websiteformtoolbar">'; |
|
2730 | +print '<form action="'.$_SERVER["PHP_SELF"].($action == 'file_manager' ? '?uploadform=1' : '').'" method="POST" enctype="multipart/form-data" class="websiteformtoolbar">'; |
|
2731 | 2731 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
2732 | 2732 | print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
2733 | 2733 | print '<input type="hidden" name="dol_openinpopup" value="'.$dol_openinpopup.'">'; |
@@ -3223,7 +3223,7 @@ discard block |
||
3223 | 3223 | $formquestion[] = array('type' => 'checkbox', 'tdclass'=>'maxwidth200', 'name' => 'is_a_translation', 'label' => $langs->trans("PageIsANewTranslation"), 'value' => 0, 'morecss'=>'margintoponly'); |
3224 | 3224 | } |
3225 | 3225 | |
3226 | - $value= $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1); |
|
3226 | + $value = $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1); |
|
3227 | 3227 | $formquestion[] = array('type' => 'other', 'name' => 'newlang', 'label' => $form->textwithpicto($langs->trans("Language"), $langs->trans("DefineListOfAltLanguagesInWebsiteProperties")), 'value' => $value); |
3228 | 3228 | |
3229 | 3229 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 300, 550); |
@@ -3245,7 +3245,7 @@ discard block |
||
3245 | 3245 | print '<!-- button EditInLine and ShowSubcontainers -->'."\n"; |
3246 | 3246 | print '<div class="websiteselectionsection inline-block">'; |
3247 | 3247 | |
3248 | - print '<div class="inline-block marginrightonly">'; // Button include dynamic contant |
|
3248 | + print '<div class="inline-block marginrightonly">'; // Button include dynamic contant |
|
3249 | 3249 | print $langs->trans("ShowSubcontainers"); |
3250 | 3250 | if (empty($conf->global->WEBSITE_SUBCONTAINERSINLINE)) { |
3251 | 3251 | print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=setshowsubcontainers&token='.newToken().'">'.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', false, 0, 0, '', 'nomarginleft').'</a>'; |
@@ -3254,7 +3254,7 @@ discard block |
||
3254 | 3254 | } |
3255 | 3255 | print '</div>'; |
3256 | 3256 | |
3257 | - print '<div class="inline-block marginrightonly">'; // Button edit inline |
|
3257 | + print '<div class="inline-block marginrightonly">'; // Button edit inline |
|
3258 | 3258 | |
3259 | 3259 | print '<span id="switchckeditorinline">'."\n"; |
3260 | 3260 | print '<!-- Code to enabled edit inline ckeditor -->'."\n"; |
@@ -3343,7 +3343,7 @@ discard block |
||
3343 | 3343 | } else { |
3344 | 3344 | $disabled = ''; |
3345 | 3345 | $title = ''; |
3346 | - $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
3346 | + $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
3347 | 3347 | } |
3348 | 3348 | print '<a href="'.$url.'" class="buttonDelete bordertransp'.($disabled ? ' disabled' : '').'"'.$disabled.' title="'.dol_escape_htmltag($title).'">'.img_picto('', 'delete', 'class=""').'<span class="hideonsmartphone paddingleft">'.$langs->trans("Delete").'</span></a>'; |
3349 | 3349 | } |
@@ -3547,7 +3547,7 @@ discard block |
||
3547 | 3547 | // Clean the php htaccesscontent file to remove php code and get only html part |
3548 | 3548 | $htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $htaccesscontent); |
3549 | 3549 | } else { |
3550 | - $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
3550 | + $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
3551 | 3551 | } |
3552 | 3552 | if (!trim($htaccesscontent)) { |
3553 | 3553 | $htaccesscontent .= "# Order allow,deny\n"; |
@@ -3649,7 +3649,7 @@ discard block |
||
3649 | 3649 | $maxfilesizearray = getMaxFileSizeArray(); |
3650 | 3650 | $maxmin = $maxfilesizearray['maxmin']; |
3651 | 3651 | if ($maxmin > 0) { |
3652 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
3652 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
3653 | 3653 | } |
3654 | 3654 | print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>'; |
3655 | 3655 | print '</tr></td>'; |
@@ -3898,7 +3898,7 @@ discard block |
||
3898 | 3898 | $maxfilesizearray = getMaxFileSizeArray(); |
3899 | 3899 | $maxmin = $maxfilesizearray['maxmin']; |
3900 | 3900 | if ($maxmin > 0) { |
3901 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
3901 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
3902 | 3902 | } |
3903 | 3903 | print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">'; |
3904 | 3904 | print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="'.dol_escape_htmltag($langs->trans("Upload")).'">'; |
@@ -4417,7 +4417,7 @@ discard block |
||
4417 | 4417 | |
4418 | 4418 | |
4419 | 4419 | $module = 'medias'; |
4420 | - $formalreadyopen = 2; // So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php |
|
4420 | + $formalreadyopen = 2; // So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php |
|
4421 | 4421 | if (empty($url)) { |
4422 | 4422 | $url = DOL_URL_ROOT.'/website/index.php'; // Must be an url without param |
4423 | 4423 | } |
@@ -4647,7 +4647,7 @@ discard block |
||
4647 | 4647 | print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF']); |
4648 | 4648 | print getTitleFieldOfList("Language", 0, $_SERVER['PHP_SELF'], 'lang', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; |
4649 | 4649 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
4650 | - print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif |
|
4650 | + print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif |
|
4651 | 4651 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
4652 | 4652 | print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; |
4653 | 4653 | print '</tr>'; |
@@ -173,13 +173,13 @@ discard block |
||
173 | 173 | if ($action == 'confirmconvertimgwebp') { |
174 | 174 | $langs->load("ecm"); |
175 | 175 | |
176 | - $section_dir=GETPOST('section_dir', 'alpha'); |
|
177 | - $section=GETPOST('section', 'alpha'); |
|
176 | + $section_dir = GETPOST('section_dir', 'alpha'); |
|
177 | + $section = GETPOST('section', 'alpha'); |
|
178 | 178 | $form = new Form($db); |
179 | - $formquestion['section_dir']=array('type'=>'hidden', 'value'=>$section_dir, 'name'=>'section_dir'); |
|
180 | - $formquestion['section']=array('type'=>'hidden', 'value'=>$section, 'name'=>'section'); |
|
179 | + $formquestion['section_dir'] = array('type'=>'hidden', 'value'=>$section_dir, 'name'=>'section_dir'); |
|
180 | + $formquestion['section'] = array('type'=>'hidden', 'value'=>$section, 'name'=>'section'); |
|
181 | 181 | if ($module == 'medias') { |
182 | - $formquestion['website']=array('type'=>'hidden', 'value'=>$website->ref, 'name'=>'website'); |
|
182 | + $formquestion['website'] = array('type'=>'hidden', 'value'=>$website->ref, 'name'=>'website'); |
|
183 | 183 | } |
184 | 184 | print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('ConfirmImgWebpCreation'), $langs->trans('ConfirmGenerateImgWebp', $object->ref), 'convertimgwebp', $formquestion, "yes", 1); |
185 | 185 | $action = 'file_manager'; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | if (image_format_supported($filepath) == 1) { |
208 | 208 | $filepathnoext = preg_replace("/\.[a-z0-9]+$/i", "", $filepath); |
209 | 209 | |
210 | - if (! dol_is_file($filepathnoext.'.webp')) { // If file does not exists yet |
|
210 | + if (!dol_is_file($filepathnoext.'.webp')) { // If file does not exists yet |
|
211 | 211 | $result = dol_imageResizeOrCrop($filepath, 0, 0, 0, 0, 0, $filepathnoext.'.webp', 90); |
212 | 212 | if (!dol_is_file($result)) { |
213 | 213 | $error++; |