diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 2c94dcf65ca..939a6890596 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -888,6 +888,7 @@ function activateModule($value,$withdeps=1) } $result=$objMod->init(); // Enable module + if ($result <= 0) { $ret['errors'][]=$objMod->error; diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 160499d3a45..38883ce2826 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -1049,7 +1049,7 @@ class DolibarrModules // Can not be abstract, because we need to insta { if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data') { - $result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?0:1, '', 1); + $result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?1:0, '', 1); if ($result <= 0) $error++; } } @@ -1067,7 +1067,7 @@ class DolibarrModules // Can not be abstract, because we need to insta { if (preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data') { - $result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?0:1, '', 1); + $result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?1:0, '', 1); if ($result <= 0) $error++; } } @@ -1085,7 +1085,7 @@ class DolibarrModules // Can not be abstract, because we need to insta { if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'data') { - $result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?0:1, '', 1); + $result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?1:0, '', 1); if ($result <= 0) $error++; } } @@ -1103,7 +1103,7 @@ class DolibarrModules // Can not be abstract, because we need to insta { if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,6) == 'update') { - $result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?0:1, '', 1); + $result=run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG)?1:0, '', 1); if ($result <= 0) $error++; } }