diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 03d40dbb085..2ce81f966f1 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -416,24 +416,27 @@ if ($mode != 'marketplace')
print "\n";
// Activate/Disable and Setup (2 columns)
- if (! empty($conf->global->$const_name))
+ if (! empty($conf->global->$const_name)) // If module is activated
{
$disableSetup = 0;
print '
';
-
- if (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1)))
+ if (! empty($objMod->disabled))
+ {
+ print $langs->trans("Disabled");
+ }
+ else if (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1)))
{
print $langs->trans("Required");
if (! empty($conf->multicompany->enabled) && $user->entity) $disableSetup++;
- print ' | '."\n";
}
else
{
print '';
print img_picto($langs->trans("Activated"),'switch_on');
- print ''."\n";
+ print '';
}
+ print ''."\n";
if (! empty($objMod->config_page_url) && !$disableSetup)
{
@@ -478,19 +481,25 @@ if ($mode != 'marketplace')
}
}
- else
+ else // Module not activated
{
print '';
-
- if (! empty($objMod->always_enabled))
+ if (! empty($objMod->always_enabled))
{
// Ne devrait pas arriver.
}
-
- // Module non actif
- print '';
- print img_picto($langs->trans("Disabled"),'switch_off');
- print " | \n | \n";
+ else if (! empty($objMod->disabled))
+ {
+ print $langs->trans("Disabled");
+ }
+ else
+ {
+ // Module non actif
+ print '';
+ print img_picto($langs->trans("Disabled"),'switch_off');
+ print "\n";
+ }
+ print "\n | ";
}
print "\n";
diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php
index 35f701d3860..3e158035cfa 100644
--- a/htdocs/core/modules/export/export_excel.modules.php
+++ b/htdocs/core/modules/export/export_excel.modules.php
@@ -68,6 +68,8 @@ class ExportExcel extends ModeleExports
$this->label_lib='PhpExcel';
$this->version_lib='1.7.2';
+ $this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages)
+
$this->row=0;
}
@@ -181,14 +183,14 @@ class ExportExcel extends ModeleExports
if ($this->id == 'excel2007')
{
- if (! class_exists('ZipArchive')) // For Excel2007, PHPExcel need ZipArchive
+ if (! class_exists('ZipArchive')) // For Excel2007, PHPExcel need ZipArchive
{
$langs->load("errors");
$this->error=$langs->trans('ErrorPHPNeedModule','zip');
- return -1;
+ return -1;
}
- }
-
+ }
+
$this->workbook = new PHPExcel();
$this->workbook->getProperties()->setCreator($user->getFullName($outputlangs).' - Dolibarr '.DOL_VERSION);
//$this->workbook->getProperties()->setLastModifiedBy('Dolibarr '.DOL_VERSION);
diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php
index aed29b28c28..5dcf72cf60e 100644
--- a/htdocs/core/modules/export/export_excel2007.modules.php
+++ b/htdocs/core/modules/export/export_excel2007.modules.php
@@ -47,7 +47,6 @@ class ExportExcel2007 extends ExportExcel
var $col;
var $file; // To save filename
-
/**
* Constructor
*
@@ -69,6 +68,8 @@ class ExportExcel2007 extends ExportExcel
$this->label_lib='PhpExcel';
$this->version_lib='1.7.2';
+ $this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages)
+
$this->row=0;
}
diff --git a/htdocs/core/modules/export/modules_export.php b/htdocs/core/modules/export/modules_export.php
index b42f2a2dfa7..47ba1609f5d 100644
--- a/htdocs/core/modules/export/modules_export.php
+++ b/htdocs/core/modules/export/modules_export.php
@@ -44,7 +44,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
*
* @param DoliDB $db Database handler
* @param string $maxfilenamelength Max length of value to show
- * @return array List of templates
+ * @return array List of templates (same content than array this->driverlabel)
*/
function liste_modeles($db,$maxfilenamelength=0)
{
@@ -74,7 +74,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
// Picto
$this->picto[$module->id]=$module->picto;
// Driver properties
- $this->driverlabel[$module->id]=$module->getDriverLabel();
+ $this->driverlabel[$module->id]=$module->getDriverLabel().(empty($module->disabled)?'':' __(Disabled)__'); // '__(Disabled)__' is a key
$this->driverdesc[$module->id]=$module->getDriverDesc();
$this->driverversion[$module->id]=$module->getDriverVersion();
// If use an external lib
diff --git a/htdocs/core/modules/modFckeditor.class.php b/htdocs/core/modules/modFckeditor.class.php
index 0d2e57be2d3..023b4ba6153 100644
--- a/htdocs/core/modules/modFckeditor.class.php
+++ b/htdocs/core/modules/modFckeditor.class.php
@@ -62,8 +62,7 @@ class modFckeditor extends DolibarrModules
$this->config_page_url = array("fckeditor.php");
// Dependances
- global $dolibarr_js_CKEDITOR;
- $this->hidden = ($dolibarr_js_CKEDITOR == 'disabled'?1:0); // A condition to disable module (used for native debian packages)
+ $this->disabled = (in_array(constant('JS_CKEDITOR'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages)
$this->depends = array();
$this->requiredby = array();
diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php
index d9d3aa91544..50d7fe60b6b 100644
--- a/htdocs/exports/export.php
+++ b/htdocs/exports/export.php
@@ -1029,7 +1029,7 @@ if ($step == 5 && $datatoexport)
if ($action == 'remove_file')
{
print $form->formconfirm($_SERVER["PHP_SELF"].'?step=5&datatoexport='.$datatoexport.'&file='.urlencode(GETPOST("file")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
-
+
}
print '';
@@ -1093,13 +1093,21 @@ if ($step == 5 && $datatoexport)
print ''."\n";
$liste=$objmodelexport->liste_modeles($db);
- foreach($liste as $key => $val)
+ $listeall=$liste;
+ foreach($listeall as $key => $val)
{
+ if (preg_match('/__\(Disabled\)__/',$listeall[$key]))
+ {
+ $listeall[$key]=preg_replace('/__\(Disabled\)__/','('.$langs->transnoentitiesnoconv("Disabled").')',$listeall[$key]);
+ unset($liste[$key]);
+ }
+
$var=!$var;
print '';
print '| '.img_picto_common($key,$objmodelexport->getPictoForKey($key)).' | ';
$text=$objmodelexport->getDriverDescForKey($key);
- print ''.$form->textwithpicto($objmodelexport->getDriverLabelForKey($key),$text).' | ';
+ $label=$listeall[$key];
+ print ''.$form->textwithpicto($label,$text).' | ';
print ''.$objmodelexport->getLibLabelForKey($key).' | '.$objmodelexport->getLibVersionForKey($key).' |
'."\n";
}
print '
';
diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php
index c68d793185d..0184ed8ed68 100644
--- a/htdocs/exports/index.php
+++ b/htdocs/exports/index.php
@@ -129,11 +129,17 @@ $liste=$model->liste_modeles($db); // This is not a static method for exports
$var=true;
foreach($liste as $key => $val)
{
+ if (preg_match('/__\(Disabled\)__/',$liste[$key]))
+ {
+ $liste[$key]=preg_replace('/__\(Disabled\)__/','('.$langs->transnoentitiesnoconv("Disabled").')',$liste[$key]);
+ }
+
$var=!$var;
print '';
print '| '.img_picto_common($model->getDriverLabelForKey($key),$model->getPictoForKey($key)).' | ';
$text=$model->getDriverDescForKey($key);
- print ''.$form->textwithpicto($model->getDriverLabelForKey($key),$text).' | ';
+ $label=$liste[$key];
+ print ''.$form->textwithpicto($label,$text).' | ';
print ''.$model->getLibLabelForKey($key).' | ';
print ''.$model->getLibVersionForKey($key).' | ';
print '
';
diff --git a/test/soapui/Dolibarr-soapui-project.xml b/test/soapui/Dolibarr-soapui-project.xml
index e880ef1f5ad..9d9e7890443 100755
--- a/test/soapui/Dolibarr-soapui-project.xml
+++ b/test/soapui/Dolibarr-soapui-project.xml
@@ -1,5 +1,5 @@
-http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl
+http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl
@@ -757,7 +757,7 @@
all
-]]>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl
+]]>http://localhost/dolibarr_new/webservices/server_productorservice.php?wsdl
@@ -845,6 +845,7 @@
+
@@ -866,6 +867,14 @@
+
+
+
+
+
+
+
+
@@ -877,6 +886,7 @@
+
@@ -898,6 +908,11 @@
+
+ WS to delete a product or service
+
+
+
WS to get list of all products or services id and ref
@@ -938,6 +953,15 @@
+
+
+
+
+
+
+
@@ -959,48 +983,67 @@
-
+
-]]>http://schemas.xmlsoap.org/wsdl/http://localhost/dolibarr/htdocs/webservices/server_productorservice.phphttp://localhostdolibarr/dolibarrnew/webservices/server_productorservice.phphttp://localhost/dolibarr/htdocs/webservices/server_productorservice.phpUTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php
-
-
-
+]]>http://schemas.xmlsoap.org/wsdl/http://localhost/dolibarr_new/webservices/server_productorservice.phphttp://localhostdolibarr/dolibarrnew/webservices/server_productorservice.phphttp://localhost/dolibarr/htdocs/webservices/server_productorservice.phphttp://localhost/dolibarr_new/webservices/server_productorservice.phpUTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
dolibarrkey
- PRESTASHOP
+ DEMO
admin
admin
-
-
- [aaa]
- aaa
- 0
-
- les couteurs isolation sonore ergonomiques et l gers offrent la reproduction audio la plus fid le en provenance de sources audio st r o portables ou de salon.
- 2013-03-06 09:24:51
- 2013-03-06 09:24:51
- imported from Prestashop
- 0
- 1
-
- upc
-
-
-
-
- 149
-
-
- 0
-
-
-
+
+
+ ?
+ [NewProductFromWS]
+ ?
+ 1
+
+ This is a new product created from WS PHPUnit test case
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+ ?
+
+
+
+ ?
+ ?
+ ?
+ ?
+
+
-
-
-]]>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php
+
+
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
@@ -1058,7 +1101,122 @@
-]]>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
+ dolibarrkey
+ DEMO
+ admin
+ admin
+
+
+
+
+ ?
+ [?]
+ ?
+ ?
+
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+ ?
+
+
+
+ ?
+ ?
+ ?
+ ?
+
+
+
+
+
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+
+
+ ?
+ [?]
+ ?
+ ?
+
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+ ?
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+
+
+
+
+
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
@@ -1068,14 +1226,15 @@
?
admin
admin
-
+
1
-
-
+
+
+ ?
-]]>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
@@ -1090,9 +1249,46 @@
?
[?]
?
+ ?
-]]>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+ [?]
+ ?
+ ?
+
+
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+ [?]
+ ?
+ ?
+
+
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
@@ -1112,7 +1308,47 @@
-]]>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+
+
+ ?
+ ?
+ ?
+
+
+
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+
+
+ ?
+ ?
+ ?
+
+
+
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
@@ -1122,12 +1358,45 @@
?
admin
admin
-
+
5
+ ?
-]]>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+ ?
+
+
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+ ?
+
+
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
@@ -1137,48 +1406,186 @@
aaa
admin
admin
-
+
1
-
+
111
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+
-]]>http://localhostdolibarr/webservices/server_user.php?wsdl
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+
+
+ ?
+ [?]
+ ?
+ ?
+
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+ ?
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+
+
+
+
+
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+ ?
+
+
+
+ ?
+ [?]
+ ?
+ ?
+
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+ ?
+
+ ?
+ ?
+
+
+
+
+ ?
+ ?
+ ?
+ ?
+
+
+
+
+
+]]>UTF-8http://localhost/dolibarr_new/webservices/server_productorservice.php
+
+
+
+
+
+ dolibarrkey
+ ?
+ admin
+ admin
+
+
+ 14,13
+
+
+]]>http://localhostdolibarr/webservices/server_user.php?wsdl