Add var commented into conf file

Fix disabled of module for demo
This commit is contained in:
Laurent Destailleur 2016-03-05 01:38:14 +01:00
parent 74f9ed029c
commit 144c410b52
2 changed files with 8 additions and 0 deletions

View File

@ -859,6 +859,9 @@ function write_conf_file($conffile)
fputs($fp, '// Specific settings');
fputs($fp,"\n");
fputs($fp, '//$dolibarr_main_demo=\'autologin,autopass\';');
fputs($fp,"\n");
fputs($fp, '$dolibarr_main_prod=\'0\';');
fputs($fp,"\n");

View File

@ -325,6 +325,11 @@ if (! empty($_SESSION["disablemodules"]))
{
if (empty($conf->$module)) $conf->$module=new stdClass();
$conf->$module->enabled=false;
if ($module == 'fournisseur') // Special case
{
$conf->supplier_order->enabled=0;
$conf->supplier_invoice->enabled=0;
}
}
}
}