Browse Source

Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

Laurent Destailleur 6 years ago
parent
commit
9fc5d39d07
100 changed files with 202 additions and 201 deletions
  1. 6 7
      .travis.yml
  2. 2 2
      build/generate_filelist_xml.php
  3. 2 2
      dev/examples/code/create_invoice.php
  4. 2 2
      dev/examples/code/create_order.php
  5. 2 2
      dev/examples/code/create_product.php
  6. 2 2
      dev/examples/code/create_user.php
  7. 2 2
      dev/examples/code/get_contracts.php
  8. 3 3
      dev/initdata/generate-invoice.php
  9. 2 2
      dev/initdata/generate-order.php
  10. 1 1
      dev/initdata/generate-product.php
  11. 6 6
      dev/initdata/generate-proposal.php
  12. 1 1
      dev/initdata/generate-thirdparty.php
  13. 1 1
      dev/initdata/import-products.php
  14. 1 1
      dev/initdata/import-thirdparties.php
  15. 1 1
      dev/initdata/import-users.php
  16. 1 1
      dev/initdata/purge-data.php
  17. 8 8
      dev/initdemo/sftpget_and_loaddump.php
  18. 8 8
      dev/initdemo/updatedemo.php
  19. 48 46
      dev/setup/codesniffer/ruleset.xml
  20. 2 2
      dev/tools/test/testtcpdf.php
  21. 2 2
      dev/tools/test/testutf.php
  22. 3 3
      dev/translation/autotranslator.php
  23. 1 0
      htdocs/accountancy/admin/account.php
  24. 1 1
      htdocs/accountancy/admin/accountmodel.php
  25. 1 1
      htdocs/accountancy/admin/card.php
  26. 1 1
      htdocs/accountancy/admin/categories.php
  27. 1 1
      htdocs/accountancy/admin/categories_list.php
  28. 1 0
      htdocs/accountancy/admin/defaultaccounts.php
  29. 1 0
      htdocs/accountancy/admin/export.php
  30. 1 1
      htdocs/accountancy/admin/fiscalyear.php
  31. 1 0
      htdocs/accountancy/admin/fiscalyear_card.php
  32. 1 0
      htdocs/accountancy/admin/fiscalyear_info.php
  33. 1 0
      htdocs/accountancy/admin/importaccounts.php
  34. 1 0
      htdocs/accountancy/admin/index.php
  35. 1 1
      htdocs/accountancy/admin/journals_list.php
  36. 1 0
      htdocs/accountancy/admin/productaccount.php
  37. 2 1
      htdocs/accountancy/bookkeeping/balance.php
  38. 1 0
      htdocs/accountancy/bookkeeping/balancebymonth.php
  39. 1 0
      htdocs/accountancy/bookkeeping/card.php
  40. 1 1
      htdocs/accountancy/bookkeeping/list.php
  41. 1 0
      htdocs/accountancy/bookkeeping/listbyaccount.php
  42. 1 0
      htdocs/accountancy/customer/card.php
  43. 1 1
      htdocs/accountancy/customer/index.php
  44. 1 1
      htdocs/accountancy/customer/lines.php
  45. 4 2
      htdocs/accountancy/customer/list.php
  46. 1 0
      htdocs/accountancy/expensereport/card.php
  47. 1 0
      htdocs/accountancy/expensereport/index.php
  48. 1 1
      htdocs/accountancy/expensereport/lines.php
  49. 4 2
      htdocs/accountancy/expensereport/list.php
  50. 1 0
      htdocs/accountancy/index.php
  51. 1 0
      htdocs/accountancy/supplier/card.php
  52. 1 1
      htdocs/accountancy/supplier/index.php
  53. 1 2
      htdocs/accountancy/supplier/lines.php
  54. 4 2
      htdocs/accountancy/supplier/list.php
  55. 1 2
      htdocs/adherents/admin/adherent.php
  56. 1 2
      htdocs/adherents/admin/adherent_emails.php
  57. 1 1
      htdocs/adherents/admin/adherent_extrafields.php
  58. 1 1
      htdocs/adherents/admin/adherent_type_extrafields.php
  59. 1 2
      htdocs/adherents/admin/website.php
  60. 1 3
      htdocs/adherents/agenda.php
  61. 1 1
      htdocs/adherents/card.php
  62. 1 1
      htdocs/adherents/cartes/carte.php
  63. 2 2
      htdocs/adherents/document.php
  64. 1 2
      htdocs/adherents/htpasswd.php
  65. 1 1
      htdocs/adherents/index.php
  66. 1 0
      htdocs/adherents/ldap.php
  67. 1 1
      htdocs/adherents/list.php
  68. 1 1
      htdocs/adherents/note.php
  69. 1 2
      htdocs/adherents/stats/byproperties.php
  70. 1 3
      htdocs/adherents/stats/geo.php
  71. 1 2
      htdocs/adherents/stats/index.php
  72. 1 2
      htdocs/adherents/subscription.php
  73. 1 2
      htdocs/adherents/subscription/card.php
  74. 1 0
      htdocs/adherents/subscription/info.php
  75. 1 1
      htdocs/adherents/subscription/list.php
  76. 1 2
      htdocs/adherents/type.php
  77. 1 0
      htdocs/adherents/type_ldap.php
  78. 1 1
      htdocs/admin/agenda.php
  79. 1 1
      htdocs/admin/agenda_extrafields.php
  80. 1 2
      htdocs/admin/agenda_extsites.php
  81. 1 1
      htdocs/admin/agenda_other.php
  82. 1 1
      htdocs/admin/agenda_reminder.php
  83. 1 1
      htdocs/admin/agenda_xcal.php
  84. 1 1
      htdocs/admin/bank.php
  85. 1 1
      htdocs/admin/bank_extrafields.php
  86. 1 0
      htdocs/admin/barcode.php
  87. 1 2
      htdocs/admin/boxes.php
  88. 1 1
      htdocs/admin/chequereceipts.php
  89. 1 1
      htdocs/admin/clicktodial.php
  90. 1 2
      htdocs/admin/commande.php
  91. 1 2
      htdocs/admin/company.php
  92. 1 0
      htdocs/admin/compta.php
  93. 1 0
      htdocs/admin/confexped.php
  94. 1 2
      htdocs/admin/const.php
  95. 1 2
      htdocs/admin/contract.php
  96. 1 1
      htdocs/admin/dav.php
  97. 1 2
      htdocs/admin/defaultvalues.php
  98. 1 0
      htdocs/admin/delais.php
  99. 1 1
      htdocs/admin/dict.php
  100. 8 17
      htdocs/admin/dolistore/ajax/image.php

+ 6 - 7
.travis.yml

@@ -2,7 +2,7 @@
 # from Dolibarr GitHub repository.
 # For syntax, see http://about.travis-ci.org/docs/user/languages/php/
 
-# We use dist: precise to have php 5.3 available 
+# We use dist: precise to have php 5.3 available
 dist: trusty
 sudo: required
 
@@ -20,7 +20,7 @@ addons:
     # To use the last version of pgloader, we add repo of postgresql
     - postgresql
     - sourceline: 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main'
-    - key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'  
+    - key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
     packages:
     # We need a webserver to test the webservices
     # Let's install Apache with.
@@ -101,7 +101,7 @@ before_install:
     pgloader --version
     echo
   fi
- 
+
 install:
 - |
   echo "Updating Composer"
@@ -133,7 +133,7 @@ install:
 
 - |
   echo "Installing PHP CodeSniffer"
-  composer -n require squizlabs/php_codesniffer ^2
+  composer -n require squizlabs/php_codesniffer ^3
   echo
 
 - |
@@ -195,7 +195,7 @@ before_script:
     mysql --version | head -
     mysql -e "SELECT VERSION();"  | head -
     echo
-  
+
   - |
     echo "Setting up database"
     if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
@@ -203,7 +203,7 @@ before_script:
       mysql -e 'DROP DATABASE IF EXISTS travis;'
       mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
       mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
-      mysql -e 'FLUSH PRIVILEGES;'    
+      mysql -e 'FLUSH PRIVILEGES;'
       mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
     fi
     if [ "$DB" = 'postgresql' ]; then
@@ -384,4 +384,3 @@ after_failure:
     # TODO: PostgreSQL log file
     echo
   fi
-

+ 2 - 2
build/generate_filelist_xml.php

@@ -34,8 +34,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
     exit;
 }
 
-require_once($path."../htdocs/master.inc.php");
-require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
+require_once $path."../htdocs/master.inc.php";
+require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
 
 
 /*

+ 2 - 2
dev/examples/code/create_invoice.php

@@ -40,7 +40,7 @@ $error=0;
 
 // -------------------- START OF YOUR CODE HERE --------------------
 // Include Dolibarr environment
-require_once($path."../../htdocs/master.inc.php");
+require_once $path."../../htdocs/master.inc.php";
 // After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
 
 //$langs->setDefaultLang('en_US'); 	// To change default language of $langs
@@ -58,7 +58,7 @@ print "***** ".$script_file." (".$version.") *****\n";
 // Start of transaction
 $db->begin();
 
-require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
+require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
 
 // Create invoice object
 $obj = new Facture($db);

+ 2 - 2
dev/examples/code/create_order.php

@@ -40,7 +40,7 @@ $error=0;
 
 // -------------------- START OF YOUR CODE HERE --------------------
 // Include Dolibarr environment
-require_once($path."../../htdocs/master.inc.php");
+require_once $path."../../htdocs/master.inc.php";
 // After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
 
 //$langs->setDefaultLang('en_US'); 	// To change default language of $langs
@@ -59,7 +59,7 @@ print "***** ".$script_file." (".$version.") *****\n";
 // Start of transaction
 $db->begin();
 
-require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
+require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
 
 // Create order object
 $com = new Commande($db);

+ 2 - 2
dev/examples/code/create_product.php

@@ -40,7 +40,7 @@ $error=0;
 
 // -------------------- START OF YOUR CODE HERE --------------------
 // Include Dolibarr environment
-require_once($path."../../htdocs/master.inc.php");
+require_once $path."../../htdocs/master.inc.php";
 // After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
 
 //$langs->setDefaultLang('en_US'); 	// To change default language of $langs
@@ -59,7 +59,7 @@ print "***** ".$script_file." (".$version.") *****\n";
 // Start of transaction
 $db->begin();
 
-require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
+require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php";
 
 // Create instance of object
 $myproduct=new Product($db);

+ 2 - 2
dev/examples/code/create_user.php

@@ -40,7 +40,7 @@ $error=0;
 
 // -------------------- START OF YOUR CODE HERE --------------------
 // Include Dolibarr environment
-require_once($path."../../htdocs/master.inc.php");
+require_once $path."../../htdocs/master.inc.php";
 // After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
 
 //$langs->setDefaultLang('en_US'); 	// To change default language of $langs
@@ -58,7 +58,7 @@ print "***** ".$script_file." (".$version.") *****\n";
 // Start of transaction
 $db->begin();
 
-require_once(DOL_DOCUMENT_ROOT."/user/class/user.class.php");
+require_once DOL_DOCUMENT_ROOT."/user/class/user.class.php";
 
 // Create user object
 $obj = new User($db);

+ 2 - 2
dev/examples/code/get_contracts.php

@@ -40,7 +40,7 @@ $error=0;
 
 // -------------------- START OF YOUR CODE HERE --------------------
 // Include Dolibarr environment
-require_once($path."../../htdocs/master.inc.php");
+require_once $path."../../htdocs/master.inc.php";
 // After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
 
 //$langs->setDefaultLang('en_US'); 	// To change default language of $langs
@@ -65,7 +65,7 @@ print 'Argument id_thirdparty='.$argv[1]."\n";
 // Start of transaction
 $db->begin();
 
-require_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
+require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php";
 
 // Create contract object
 $obj = new Contrat($db);

+ 3 - 3
dev/initdata/generate-invoice.php

@@ -32,9 +32,9 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
 
 // Recupere root dolibarr
 //$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
-require (__DIR__. '/../../htdocs/master.inc.php');
-require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
-require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
+require __DIR__. '/../../htdocs/master.inc.php';
+require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
+require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
 
 
 /*

+ 2 - 2
dev/initdata/generate-order.php

@@ -33,14 +33,14 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
 
 // Recupere root dolibarr
 //$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
-require (__DIR__. '/../../htdocs/master.inc.php');
+require __DIR__. '/../../htdocs/master.inc.php';
 include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
 include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
 include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
 include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
 include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
 include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
-require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
+require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
 
 
 /*

+ 1 - 1
dev/initdata/generate-product.php

@@ -33,7 +33,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
 
 // Recupere root dolibarr
 //$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
-require (__DIR__. '/../../htdocs/master.inc.php');
+require __DIR__. '/../../htdocs/master.inc.php';
 include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
 include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
 include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';

+ 6 - 6
dev/initdata/generate-proposal.php

@@ -33,11 +33,11 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
 
 // Recupere root dolibarr
 //$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
-require (__DIR__. '/../../htdocs/master.inc.php');
-require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
-require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
-require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
-require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
+require __DIR__. '/../../htdocs/master.inc.php';
+require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
+require_once DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php";
+require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
+require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
 
 /*
  * Parameters
@@ -157,7 +157,7 @@ $user->rights->propal->propal_advance->validate=1;
 
 if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"))
 {
-	require_once(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php");
+	require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php";
 }
 
 $i=0;

+ 1 - 1
dev/initdata/generate-thirdparty.php

@@ -33,7 +33,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
 
 // Recupere root dolibarr
 //$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
-require (__DIR__. '/../../htdocs/master.inc.php');
+require __DIR__. '/../../htdocs/master.inc.php';
 include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
 include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
 include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';

+ 1 - 1
dev/initdata/import-products.php

@@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
 
 // Recupere root dolibarr
 $path=preg_replace('/import-products.php/i','',$_SERVER["PHP_SELF"]);
-require ($path."../../htdocs/master.inc.php");
+require $path."../../htdocs/master.inc.php";
 include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
 include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
 

+ 1 - 1
dev/initdata/import-thirdparties.php

@@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
 
 // Recupere root dolibarr
 $path=preg_replace('/import-thirdparties.php/i','',$_SERVER["PHP_SELF"]);
-require ($path."../../htdocs/master.inc.php");
+require $path."../../htdocs/master.inc.php";
 include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
 include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
 

+ 1 - 1
dev/initdata/import-users.php

@@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
 
 // Recupere root dolibarr
 $path=preg_replace('/import-users.php/i','',$_SERVER["PHP_SELF"]);
-require ($path."../../htdocs/master.inc.php");
+require $path."../../htdocs/master.inc.php";
 include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
 include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
 

+ 1 - 1
dev/initdata/purge-data.php

@@ -36,7 +36,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
 
 // Recupere root dolibarr
 $path=preg_replace('/purge-data.php/i','',$_SERVER["PHP_SELF"]);
-require ($path."../../htdocs/master.inc.php");
+require $path."../../htdocs/master.inc.php";
 include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
 include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
 include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';

+ 8 - 8
dev/initdemo/sftpget_and_loaddump.php

@@ -41,15 +41,15 @@ $passwordbase=isset($argv[6])?$argv[6]:'';
 
 // Include Dolibarr environment
 $res=0;
-if (! $res && file_exists($path."../../master.inc.php")) $res=@include($path."../../master.inc.php");
-if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include($path."../../htdocs/master.inc.php");
-if (! $res && file_exists("../master.inc.php")) $res=@include("../master.inc.php");
-if (! $res && file_exists("../../master.inc.php")) $res=@include("../../master.inc.php");
-if (! $res && file_exists("../../../master.inc.php")) $res=@include("../../../master.inc.php");
-if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include($path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
-if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include("../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
+if (! $res && file_exists($path."../../master.inc.php")) $res=@include $path."../../master.inc.php";
+if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include $path."../../htdocs/master.inc.php";
+if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php";
+if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php";
+if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
+if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
+if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
 if (! $res) die ("Failed to include master.inc.php file\n");
-include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
+include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 
 
 /*

+ 8 - 8
dev/initdemo/updatedemo.php

@@ -36,15 +36,15 @@ $confirm=isset($argv[1])?$argv[1]:'';
 
 // Include Dolibarr environment
 $res=0;
-if (! $res && file_exists($path."../../master.inc.php")) $res=@include($path."../../master.inc.php");
-if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include($path."../../htdocs/master.inc.php");
-if (! $res && file_exists("../master.inc.php")) $res=@include("../master.inc.php");
-if (! $res && file_exists("../../master.inc.php")) $res=@include("../../master.inc.php");
-if (! $res && file_exists("../../../master.inc.php")) $res=@include("../../../master.inc.php");
-if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include($path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
-if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include("../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
+if (! $res && file_exists($path."../../master.inc.php")) $res=@include $path."../../master.inc.php";
+if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include $path."../../htdocs/master.inc.php";
+if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php";
+if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php";
+if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
+if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
+if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
 if (! $res) die ("Failed to include master.inc.php file\n");
-include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
+include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 
 
 /*

+ 48 - 46
dev/setup/codesniffer/ruleset.xml

@@ -4,6 +4,7 @@
 	<description>Dolibarr coding standard.</description>
 
 	<exclude-pattern type="relative">build/html</exclude-pattern>
+	<exclude-pattern type="relative">build/aps</exclude-pattern>
 	<exclude-pattern type="relative">documents</exclude-pattern>
 	<exclude-pattern type="relative">htdocs/custom</exclude-pattern>
 	<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
@@ -14,40 +15,25 @@
 
 		<!-- List of all tests -->
 
-	
+
 	<!-- Rules from Internal Standard -->
-	
+
 	<rule ref="Internal.NoCodeFound">
 		<severity>0</severity>
 	</rule>
 
-	
+
 	<!-- Rules from Generic Standard -->
-		
-	<rule ref="Generic.CodeAnalysis.EmptyStatement" />
 
-	<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH">
-		<severity>0</severity>
-	</rule>
-	<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedFOREACH">
-		<severity>0</severity>
-	</rule>
-	<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedIF">
-		<severity>0</severity>
-	</rule>
-	<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSE">
-		<severity>0</severity>
-	</rule>
-	<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSEIF">
-		<severity>0</severity>
-	</rule>
-	
-	<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowed">
-		<severity>0</severity>
-	</rule>
-	<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning">
-		<severity>0</severity>
-	</rule>
+	<rule ref="Generic.CodeAnalysis.EmptyStatement">
+        <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf"/>
+        <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElse"/>
+        <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElseif"/>
+        <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
+        <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedForeach"/>
+        <exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowed"/>
+        <exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning"/>
+    </rule>
 
     <!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
 
@@ -147,7 +133,7 @@
     <rule ref="Generic.PHP.DeprecatedFunctions.Deprecated">
         <severity>0</severity>
     </rule>
-	
+
 	<rule ref="Generic.PHP.DisallowShortOpenTag" />
 
     <rule ref="Generic.PHP.ForbiddenFunctions" />
@@ -163,7 +149,7 @@
 	<rule ref="Generic.Strings.UnnecessaryStringConcat.Found">
         <severity>0</severity>
 	</rule>
-    
+
 	<!-- Disallow usage of tab -->
 	<!--  <rule ref="Generic.WhiteSpace.DisallowTabIndent" /> -->
 
@@ -186,7 +172,7 @@
     <rule ref="PEAR.Commenting.ClassComment.Missing">
         <severity>0</severity>
     </rule>
-    
+
     <rule ref="PEAR.Commenting.ClassComment.MissingTag">
 		<severity>0</severity>
     </rule>
@@ -206,14 +192,14 @@
     <rule ref="PEAR.Commenting.ClassComment.MissingLinkTag">
         <severity>0</severity>
     </rule>
-        
+
     <rule ref="PEAR.Commenting.ClassComment.MissingPackageTag">
         <severity>0</severity>
     </rule>
-        
 
-   
-    <!-- 
+
+
+    <!--
     <rule ref="PEAR.Commenting.FileComment" />
     <rule ref="PEAR.Commenting.FileComment.WrongStyle">
         <severity>0</severity>
@@ -225,20 +211,20 @@
         <severity>0</severity>
     </rule>
     -->
-    
+
     <rule ref="PEAR.Commenting.FunctionComment" />
 
     <rule ref="PEAR.Commenting.FunctionComment.Empty">
         <severity>5</severity>
     </rule>
-    
+
 	<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
         <severity>0</severity>
     </rule>
     <rule ref="PEAR.Commenting.FunctionComment.Missing">
         <severity>0</severity>
     </rule>
-    
+
     <rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" />
 
     <rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
@@ -254,11 +240,11 @@
     <rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
         <severity>0</severity>
     </rule>
-    
+
     <rule ref="PEAR.Commenting.FunctionComment.WrongStyle">
         <severity>0</severity>
     </rule>
-    
+
     <rule ref="PEAR.Commenting.FunctionComment.SpacingBeforeParamType">
         <severity>0</severity>
     </rule>
@@ -285,7 +271,20 @@
 	<!-- <rule ref="PEAR.ControlStructures.MultiLineCondition" /> -->
 
 	<!-- Test if () are removed for includes -->
-	<!-- <rule ref="PEAR.Files.IncludingFile"/> -->
+	<rule ref="PEAR.Files.IncludingFile" />
+    <!-- Disable some error messages that we do not want. -->
+    <rule ref="PEAR.Files.IncludingFile.UseInclude">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Files.IncludingFile.UseIncludeOnce">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Files.IncludingFile.UseRequire">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Files.IncludingFile.UseRequireOnce">
+        <severity>0</severity>
+    </rule>
 
 	<rule ref="PEAR.Formatting.MultiLineAssignment" />
 
@@ -315,14 +314,14 @@
     <rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
         <severity>0</severity>
     </rule>
-	
+
 	<rule ref="PEAR.Functions.ValidDefaultValue" />
 
 	<rule ref="PEAR.NamingConventions.ValidClassName" />
 	<rule ref="PEAR.NamingConventions.ValidClassName.Invalid">
         <severity>0</severity>
 	</rule>
-	
+
 	<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCapital">
         <severity>0</severity>
 	</rule>
@@ -330,7 +329,7 @@
 	<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCaptial">
         <severity>0</severity>
 	</rule>
-	
+
 	<rule ref="PEAR.NamingConventions.ValidFunctionName" />
 
 	<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore">
@@ -350,6 +349,9 @@
 	<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
         <severity>0</severity>
 	</rule>
+	<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
+        <severity>0</severity>
+	</rule>
 	<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
         <severity>0</severity>
 	</rule>
@@ -359,19 +361,19 @@
 	<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
         <severity>0</severity>
     </rule>
-	
+
 	<rule ref="PEAR.WhiteSpace.ObjectOperatorIndent" />
 
 	<!-- Need to be commented to be disabled
 	<rule ref="PEAR.WhiteSpace.ScopeClosingBrace">
         <severity>0</severity>
     </rule>
-	
+
     <rule ref="PEAR.WhiteSpace.ScopeClosingBrace.Line">
         <severity>0</severity>
     </rule>
 	-->
-    
+
     <!-- Already found as a Generic rule -->
 	<!-- <rule ref="PEAR.WhiteSpace.ScopeIndent" /> -->
 

+ 2 - 2
dev/tools/test/testtcpdf.php

@@ -27,8 +27,8 @@
  * @since 2008-03-04
  */
 
-require_once('../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php');
-require_once('../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php');
+require_once '../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php';
+require_once '../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php';
 
 // create new PDF document
 $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);

+ 2 - 2
dev/tools/test/testutf.php

@@ -47,8 +47,8 @@ print 'Files has been created. Check its name from your explorer'."\n";
  * @since 2008-09-15
  */
 
-require_once('../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php');
-require_once('../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php');
+require_once '../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php';
+require_once '../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php';
 
 // create new PDF document
 $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);

+ 3 - 3
dev/translation/autotranslator.php

@@ -37,8 +37,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
 }
 
 // Include Dolibarr environment
-require_once($path.'../../htdocs/master.inc.php');
-require_once($path.'../../htdocs/core/lib/files.lib.php');
+require_once $path.'../../htdocs/master.inc.php';
+require_once $path.'../../htdocs/core/lib/files.lib.php';
 // After this $db is an opened handler to database. We close it at end of file.
 
 // Load main language strings
@@ -88,7 +88,7 @@ if ($argv[2] != 'all')
 	}
 }
 
-require_once(DOL_DOCUMENT_ROOT."/../dev/translation/autotranslator.class.php");
+require_once DOL_DOCUMENT_ROOT."/../dev/translation/autotranslator.class.php";
 
 $langParser = new autoTranslator($argv[2],$argv[1],$dir,$file,$argv[3]);
 

+ 1 - 0
htdocs/accountancy/admin/account.php

@@ -406,5 +406,6 @@ if ($resql)
 	dol_print_error($db);
 }
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/accountancy/admin/accountmodel.php

@@ -1004,7 +1004,7 @@ if ($id)
 
 print '<br>';
 
-
+// End of page
 llxFooter();
 $db->close();
 

+ 1 - 1
htdocs/accountancy/admin/card.php

@@ -397,6 +397,6 @@ else if ($id > 0 || $ref) {
 	}
 }
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/accountancy/admin/categories.php

@@ -184,6 +184,6 @@ if ($action == 'display' || $action == 'delete') {
 	print "</table>";
 }
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/accountancy/admin/categories_list.php

@@ -800,7 +800,7 @@ if ($id)
 
 print '<br>';
 
-
+// End of page
 llxFooter();
 $db->close();
 

+ 1 - 0
htdocs/accountancy/admin/defaultaccounts.php

@@ -190,5 +190,6 @@ print '<div class="center"><input type="submit" class="button" value="' . $langs
 
 print '</form>';
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/admin/export.php

@@ -278,5 +278,6 @@ print '<div class="center"><input type="submit" class="button" value="' . dol_es
 
 print '</form>';
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/accountancy/admin/fiscalyear.php

@@ -156,6 +156,6 @@ if ($result)
 	dol_print_error($db);
 }
 
-
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/admin/fiscalyear_card.php

@@ -318,5 +318,6 @@ if ($action == 'create')
 	}
 }
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/admin/fiscalyear_info.php

@@ -58,5 +58,6 @@ if ($id) {
 	print '</div>';
 }
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/admin/importaccounts.php

@@ -181,5 +181,6 @@ if ($result) {
 	print $db->error();
 }
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/admin/index.php

@@ -295,5 +295,6 @@ print '<br>';
 print '<br>';
 print '</form>';
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/accountancy/admin/journals_list.php

@@ -683,7 +683,7 @@ if ($id)
 
 print '<br>';
 
-
+// End of page
 llxFooter();
 $db->close();
 

+ 1 - 0
htdocs/accountancy/admin/productaccount.php

@@ -495,5 +495,6 @@ if ($result)
 	dol_print_error($db);
 }
 
+// End of page
 llxFooter();
 $db->close();

+ 2 - 1
htdocs/accountancy/bookkeeping/balance.php

@@ -298,7 +298,8 @@ else {
 	print "</table>";
 	print '</form>';
 
-	llxFooter();
 }
 
+// End of page
+llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/bookkeeping/balancebymonth.php

@@ -140,5 +140,6 @@ if ($resql) {
 }
 print "</table>\n";
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/bookkeeping/card.php

@@ -714,5 +714,6 @@ if ($action == 'create')
 
 dol_fiche_end();
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/accountancy/bookkeeping/list.php

@@ -748,6 +748,6 @@ print '</div>';
 
 print '</form>';
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 0
htdocs/accountancy/bookkeeping/listbyaccount.php

@@ -421,5 +421,6 @@ print '</tr>';
 print "</table>";
 print '</form>';
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/customer/card.php

@@ -159,5 +159,6 @@ if (! empty($id)) {
 	print "Error ID incorrect";
 }
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/accountancy/customer/index.php

@@ -415,6 +415,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
 	}
 }
 
-
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/accountancy/customer/lines.php

@@ -400,6 +400,6 @@ if ($result) {
 	print $db->lasterror();
 }
 
-
+// End of page
 llxFooter();
 $db->close();

+ 4 - 2
htdocs/accountancy/customer/list.php

@@ -201,8 +201,9 @@ llxHeader('', $langs->trans("Ventilation"));
 if (empty($chartaccountcode))
 {
 	print $langs->trans("ErrorChartOfAccountSystemNotSelected");
-	llxFooter();
-	$db->close();
+	// End of page
+    llxFooter();
+    $db->close();
 	exit;
 }
 
@@ -524,5 +525,6 @@ jQuery(document).ready(function() {
 });
 </script>';
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/expensereport/card.php

@@ -167,5 +167,6 @@ if (! empty($id)) {
 	print "Error ID incorrect";
 }
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/expensereport/index.php

@@ -345,5 +345,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
     print '</div>';
 }
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/accountancy/expensereport/lines.php

@@ -349,6 +349,6 @@ if ($result) {
 	print $db->lasterror();
 }
 
-
+// End of page
 llxFooter();
 $db->close();

+ 4 - 2
htdocs/accountancy/expensereport/list.php

@@ -180,8 +180,9 @@ llxHeader('', $langs->trans("ExpenseReportsVentilation"));
 if (empty($chartaccountcode))
 {
 	print $langs->trans("ErrorChartOfAccountSystemNotSelected");
-	llxFooter();
-	$db->close();
+	// End of page
+    llxFooter();
+    $db->close();
 	exit;
 }
 
@@ -422,5 +423,6 @@ jQuery(document).ready(function() {
 });
 </script>';
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/index.php

@@ -163,5 +163,6 @@ else
 	print $langs->trans("Module10Desc")."<br>\n";
 }
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/accountancy/supplier/card.php

@@ -162,5 +162,6 @@ if (! empty($id)) {
 	print "Error ID incorrect";
 }
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/accountancy/supplier/index.php

@@ -342,6 +342,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
     print '</div>';
 }
 
-
+// End of page
 llxFooter();
 $db->close();

+ 1 - 2
htdocs/accountancy/supplier/lines.php

@@ -406,7 +406,6 @@ if ($result) {
 	print $db->lasterror();
 }
 
-
-
+// End of page
 llxFooter();
 $db->close();

+ 4 - 2
htdocs/accountancy/supplier/list.php

@@ -202,8 +202,9 @@ llxHeader('', $langs->trans("SuppliersVentilation"));
 if (empty($chartaccountcode))
 {
 	print $langs->trans("ErrorChartOfAccountSystemNotSelected");
-	llxFooter();
-	$db->close();
+	// End of page
+    llxFooter();
+    $db->close();
 	exit;
 }
 
@@ -532,5 +533,6 @@ jQuery(document).ready(function() {
 });
 </script>';
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 2
htdocs/adherents/admin/adherent.php

@@ -265,7 +265,6 @@ form_constantes($constantes, 0, $helptext);
 
 dol_fiche_end();
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 2
htdocs/adherents/admin/adherent_emails.php

@@ -160,7 +160,6 @@ form_constantes($constantes, 0, $helptext);
 
 dol_fiche_end();
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/adherents/admin/adherent_extrafields.php

@@ -113,6 +113,6 @@ if ($action == 'edit' && ! empty($attrname))
     require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
 }
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/adherents/admin/adherent_type_extrafields.php

@@ -116,6 +116,6 @@ if ($action == 'edit' && ! empty($attrname))
     require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
 }
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 2
htdocs/adherents/admin/website.php

@@ -250,7 +250,6 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC))
 	print '<a target="_blank" href="'.$urlwithroot.'/public/members/new.php'.$entity_qr.'">'.$urlwithroot.'/public/members/new.php'.$entity_qr.'</a>';
 }
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 3
htdocs/adherents/agenda.php

@@ -175,8 +175,6 @@ if ($object->id > 0)
     }
 }
 
-
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/adherents/card.php

@@ -1896,6 +1896,6 @@ else
 	}
 }
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/adherents/cartes/carte.php

@@ -310,6 +310,6 @@ print '<br><input class="button" type="submit" value="'.$langs->trans("BuildDoc"
 print '</form>';
 print '<br>';
 
+// End of page
 llxFooter();
-
 $db->close();

+ 2 - 2
htdocs/adherents/document.php

@@ -91,7 +91,7 @@ if ($id > 0)
 	if ($result > 0)
 	{
 
-		// Construit liste des fichiers
+		// Build file list
 		$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
 		$totalsize=0;
 		foreach($filearray as $key => $file)
@@ -170,6 +170,6 @@ else
 	print $langs->trans("ErrorRecordNotFound");
 }
 
-
+// End of page
 llxFooter();
 $db->close();

+ 1 - 2
htdocs/adherents/htpasswd.php

@@ -86,7 +86,6 @@ else
 	dol_print_error($db);
 }
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/adherents/index.php

@@ -435,6 +435,6 @@ print "</div>";
 
 print '</div></div></div>';
 
-
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/adherents/ldap.php

@@ -221,5 +221,6 @@ else
 
 print '</table>';
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/adherents/list.php

@@ -827,6 +827,6 @@ print '</form>';
 
 if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit, 1);
 
-
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/adherents/note.php

@@ -120,6 +120,6 @@ if ($id)
 
 }
 
-
+// End of page
 llxFooter();
 $db->close();

+ 1 - 2
htdocs/adherents/stats/byproperties.php

@@ -143,7 +143,6 @@ print '</table>';
 
 dol_fiche_end();
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 3
htdocs/adherents/stats/geo.php

@@ -309,8 +309,6 @@ if ($mode)
 
 dol_fiche_end();
 
-
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 2
htdocs/adherents/stats/index.php

@@ -229,7 +229,6 @@ print '<div style="clear:both"></div>';
 
 dol_fiche_end();
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 2
htdocs/adherents/subscription.php

@@ -1108,7 +1108,6 @@ else
     print $langs->trans("ErrorRecordNotFound");
 }
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 2
htdocs/adherents/subscription/card.php

@@ -417,7 +417,6 @@ if ($rowid && $action != 'edit')
     print '</div></div></div>';
 }
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 0
htdocs/adherents/subscription/info.php

@@ -76,5 +76,6 @@ print '</div>';
 
 dol_fiche_end();
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/adherents/subscription/list.php

@@ -381,6 +381,6 @@ else
     dol_print_error($db);
 }
 
-
+// End of page
 llxFooter();
 $db->close();

+ 1 - 2
htdocs/adherents/type.php

@@ -787,7 +787,6 @@ if ($rowid > 0)
 	}
 }
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 0
htdocs/adherents/type_ldap.php

@@ -187,5 +187,6 @@ else
 
 print '</table>';
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/admin/agenda.php

@@ -202,6 +202,6 @@ print "</form>\n";
 
 print "<br>";
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/admin/agenda_extrafields.php

@@ -117,6 +117,6 @@ if ($action == 'edit' && ! empty($attrname))
     require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
 }
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 2
htdocs/admin/agenda_extsites.php

@@ -238,7 +238,6 @@ print '</div>';
 
 print "</form>\n";
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/admin/agenda_other.php

@@ -399,6 +399,6 @@ print '</form>';
 
 print "<br>";
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/admin/agenda_reminder.php

@@ -247,6 +247,6 @@ print '</form>';
 
 print "<br>";
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/admin/agenda_xcal.php

@@ -198,6 +198,6 @@ if (! empty($conf->use_javascript_ajax))
 	print '</script>';
 }
 
-
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/admin/bank.php

@@ -432,6 +432,6 @@ print "</tr>\n";
 print '</table>';
 dol_fiche_end();
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/admin/bank_extrafields.php

@@ -114,6 +114,6 @@ if ($action == 'edit' && ! empty($attrname))
     require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
 }
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 0
htdocs/admin/barcode.php

@@ -405,5 +405,6 @@ if ($conf->produit->enabled)
 
 print "<br>";
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 2
htdocs/admin/boxes.php

@@ -488,7 +488,6 @@ print '<div class="center"><input type="submit" class="button" value="'.$langs->
 print '</form>';
 print "\n".'<!-- End Other Const -->'."\n";
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/admin/chequereceipts.php

@@ -280,6 +280,6 @@ dol_fiche_end();
 
 print '</form>';
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/admin/clicktodial.php

@@ -140,6 +140,6 @@ if (! empty($conf->global->CLICKTODIAL_URL))
 	}
 }
 
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 2
htdocs/admin/commande.php

@@ -679,7 +679,6 @@ print "</td></tr>\n";
 
 print '</table>';
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 2
htdocs/admin/company.php

@@ -1153,7 +1153,6 @@ else
 	print '</div>';
 }
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 0
htdocs/admin/compta.php

@@ -164,5 +164,6 @@ print "</table>\n";
 print '<br><br><div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
 print '</form>';
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 0
htdocs/admin/confexped.php

@@ -147,5 +147,6 @@ print '</table>';
 
 print '</div>';
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 2
htdocs/admin/const.php

@@ -314,7 +314,6 @@ if ($conf->use_javascript_ajax)
 
 print "</form>\n";
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 2
htdocs/admin/contract.php

@@ -509,7 +509,6 @@ print '</form>';
 
 dol_fiche_end();
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 1
htdocs/admin/dav.php

@@ -143,6 +143,6 @@ $message.=img_picto('','object_globe.png').' '.$langs->trans("WebDavServer",'Web
 $message.='<br>';
 print $message;
 
-
+// End of page
 llxFooter();
 $db->close();

+ 1 - 2
htdocs/admin/defaultvalues.php

@@ -412,7 +412,6 @@ dol_fiche_end();
 
 print "</form>\n";
 
-
+// End of page
 llxFooter();
-
 $db->close();

+ 1 - 0
htdocs/admin/delais.php

@@ -415,5 +415,6 @@ if($action == 'edit') {
 
 }
 
+// End of page
 llxFooter();
 $db->close();

+ 1 - 1
htdocs/admin/dict.php

@@ -1735,7 +1735,7 @@ else
 
 print '<br>';
 
-
+// End of page
 llxFooter();
 $db->close();
 

+ 8 - 17
htdocs/admin/dolistore/ajax/image.php

@@ -20,22 +20,11 @@ if (!defined('REQUIRE_JQUERY_BLOCKUI')) define('REQUIRE_JQUERY_BLOCKUI', 1);
 
 
 /**
- *      \file       htdocs/commande/info.php
- *      \ingroup    commande
- * 		\brief      Page des informations d'une commande
+ *      \file       htdocs/admin/dolistore/ajax.php
+ *      \ingroup    admin
+ * 		\brief      Page des informations dolistore
  */
-$res = 0;
-if (!$res && file_exists("../main.inc.php")) $res = @include("../main.inc.php");
-if (!$res && file_exists("../../main.inc.php")) $res = @include("../../main.inc.php");
-if (!$res && file_exists("../../../main.inc.php")) $res = @include("../../../main.inc.php");
-if (!$res && file_exists("../../../../main.inc.php")) $res = @include("../../../../main.inc.php");
-if (!$res && file_exists("../../../dolibarr/htdocs/main.inc.php"))
-        $res = @include("../../../dolibarr/htdocs/main.inc.php");     // Used on dev env only
-if (!$res && file_exists("../../../../dolibarr/htdocs/main.inc.php"))
-        $res = @include("../../../../dolibarr/htdocs/main.inc.php");   // Used on dev env only
-if (!$res && file_exists("../../../../../dolibarr/htdocs/main.inc.php"))
-        $res = @include("../../../../../dolibarr/htdocs/main.inc.php");   // Used on dev env only
-if (!$res) die("Include of main fails");
+require "../../../main.inc.php";
 
 // CORE
 
@@ -52,8 +41,10 @@ $quality    = GETPOST('quality', 'alpha');
 
 try {
     $url = $conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'/api/images/products/'.$id_product.'/'.$id_image.'/'.$quality;
-    $api        = new PrestaShopWebservice($conf->global->MAIN_MODULE_DOLISTORE_API_SRV,
-        $conf->global->MAIN_MODULE_DOLISTORE_API_KEY, $dolistore->debug_api);
+    $api = new PrestaShopWebservice(
+        $conf->global->MAIN_MODULE_DOLISTORE_API_SRV,
+        $conf->global->MAIN_MODULE_DOLISTORE_API_KEY, $dolistore->debug_api
+    );
     //echo $url;
     $request = $api->executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'GET'));
     header('Content-type:image');

Some files were not shown because too many files changed in this diff