From 111b54d82c689f96944e80adddd6f88ab5f095cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 19 Apr 2015 03:02:49 +0200 Subject: [PATCH 1/2] Fix phpcs --- dev/translation/sanity_check_en_langfiles.php | 3 +-- htdocs/core/modules/modFournisseur.class.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index b1ccca39dee..fdc0f738431 100644 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -218,5 +218,4 @@ if ($_REQUEST['unused'] == 'true') { print_r($unused); } echo ""; -echo ""; -?> \ No newline at end of file +echo ""; \ No newline at end of file diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index dc537426179..13ef54c1770 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -258,7 +258,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][4] = 'commande'; $this->rights[$r][5] = 'export'; - if ($conf->global->SUPPLIER_ORDER_DOUBLE_APPROVAL) + if (! empty($conf->global->SUPPLIER_ORDER_DOUBLE_APPROVAL)) { $r++; $this->rights[$r][0] = 1190; From 6db76830fd2b5b965d6923c0c4f75b1b891870a9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 19 Apr 2015 03:36:27 +0200 Subject: [PATCH 2/2] Fix load module by test --- test/phpunit/BuildDocTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index c21c482ab5e..a83a71f206b 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -56,6 +56,9 @@ require_once dirname(__FILE__).'/../../htdocs/core/modules/project/modules_proje require_once dirname(__FILE__).'/../../htdocs/core/modules/fichinter/modules_fichinter.php'; require_once dirname(__FILE__).'/../../htdocs/core/modules/expedition/modules_expedition.php'; +require_once dirname(__FILE__).'/../../htdocs/core/modules/modExpenseReport.class.php'; + + if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); @@ -103,6 +106,9 @@ class BuildDocTest extends PHPUnit_Framework_TestCase { global $conf,$user,$langs,$db; + $moduledescriptor=new modExpenseReport($db); + $moduledescriptor->init(); + if (! $conf->facture->enabled) { print __METHOD__." invoice module not enabled\n"; die(); } if (! $conf->commande->enabled) { print __METHOD__." order module not enabled\n"; die(); } if (! $conf->propal->enabled) { print __METHOD__." propal module not enabled\n"; die(); }