';
print '| '.$langs->trans("ReStockOnValidateOrder").' | ';
print '';
-if (! empty($conf->fournisseur->enabled))
+if (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled) || ! empty($conf->supplier_invoice->enabled))
{
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER');
diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php
index bcb3b5769ee..39a757bbf9c 100644
--- a/htdocs/admin/supplierinvoicedet_extrafields.php
+++ b/htdocs/admin/supplierinvoicedet_extrafields.php
@@ -86,9 +86,9 @@ dol_fiche_end();
// Buttons
if ($action != 'create' && $action != 'edit')
{
- print '";
+ print '";
}
@@ -101,9 +101,9 @@ if ($action != 'create' && $action != 'edit')
if ($action == 'create')
{
print ' ';
- print load_fiche_titre($langs->trans('NewAttribute'));
+ print load_fiche_titre($langs->trans('NewAttribute'));
- require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
+ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
/* ************************************************************************** */
@@ -113,10 +113,10 @@ if ($action == 'create')
/* ************************************************************************** */
if ($action == 'edit' && ! empty($attrname))
{
- print " ";
- print load_fiche_titre($langs->trans("FieldEdition", $attrname));
+ print " ";
+ print load_fiche_titre($langs->trans("FieldEdition", $attrname));
- require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
+ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
}
// End of page
diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php
index 78c31291414..8924741df52 100644
--- a/htdocs/admin/supplierorder_extrafields.php
+++ b/htdocs/admin/supplierorder_extrafields.php
@@ -84,9 +84,9 @@ dol_fiche_end();
// Buttons
if ($action != 'create' && $action != 'edit')
{
- print '";
+ print '";
}
@@ -99,9 +99,9 @@ if ($action != 'create' && $action != 'edit')
if ($action == 'create')
{
print ' ';
- print load_fiche_titre($langs->trans('NewAttribute'));
+ print load_fiche_titre($langs->trans('NewAttribute'));
- require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
+ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
/* ************************************************************************** */
@@ -111,10 +111,10 @@ if ($action == 'create')
/* ************************************************************************** */
if ($action == 'edit' && ! empty($attrname))
{
- print " ";
- print load_fiche_titre($langs->trans("FieldEdition", $attrname));
+ print " ";
+ print load_fiche_titre($langs->trans("FieldEdition", $attrname));
- require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
+ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
}
// End of page
diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php
index 64f8fba72ad..3cfc18accc9 100644
--- a/htdocs/admin/system/about.php
+++ b/htdocs/admin/system/about.php
@@ -86,31 +86,31 @@ print '';
if (preg_match('/^fr_/i', $langs->getDefaultLang()))
{
print '';
- print ''.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("France")).'';
+ print ''.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("France")).'';
print '';
}
if (preg_match('/^el_/i', $langs->getDefaultLang()))
{
print '';
- print ''.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Greece")).'';
+ print ''.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Greece")).'';
print '';
}
if (preg_match('/^es_/i', $langs->getDefaultLang()))
{
print '';
- print ''.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Spain")).'';
+ print ''.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Spain")).'';
print '';
}
if (preg_match('/^it_/i', $langs->getDefaultLang()))
{
print '';
- print ''.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Italy")).'';
+ print ''.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Italy")).'';
print '';
}
if (preg_match('/^de_/i', $langs->getDefaultLang()))
{
print '';
- print ''.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Germany")).'';
+ print ''.$langs->trans("OfficialWebSiteLocal", $langs->transnoentitiesnoconv("Germany")).'';
print '';
}
print '';
diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php
index 194c871958d..0835138227b 100644
--- a/htdocs/admin/system/constall.php
+++ b/htdocs/admin/system/constall.php
@@ -70,27 +70,27 @@ $configfileparameters=array(
'?dolibarr_main_auth_ldap_admin_login',
'?dolibarr_main_auth_ldap_admin_pass',
'?dolibarr_main_auth_ldap_debug',
- 'separator',
- '?dolibarr_lib_ADODB_PATH',
+ 'separator',
+ '?dolibarr_lib_ADODB_PATH',
'?dolibarr_lib_FPDF_PATH',
- '?dolibarr_lib_TCPDF_PATH',
+ '?dolibarr_lib_TCPDF_PATH',
'?dolibarr_lib_FPDI_PATH',
- '?dolibarr_lib_TCPDI_PATH',
+ '?dolibarr_lib_TCPDI_PATH',
'?dolibarr_lib_NUSOAP_PATH',
- '?dolibarr_lib_PHPEXCEL_PATH',
- '?dolibarr_lib_GEOIP_PATH',
+ '?dolibarr_lib_PHPEXCEL_PATH',
+ '?dolibarr_lib_GEOIP_PATH',
'?dolibarr_lib_ODTPHP_PATH',
- '?dolibarr_lib_ODTPHP_PATHTOPCLZIP',
- '?dolibarr_js_CKEDITOR',
- '?dolibarr_js_JQUERY',
- '?dolibarr_js_JQUERY_UI',
- '?dolibarr_js_JQUERY_FLOT',
+ '?dolibarr_lib_ODTPHP_PATHTOPCLZIP',
+ '?dolibarr_js_CKEDITOR',
+ '?dolibarr_js_JQUERY',
+ '?dolibarr_js_JQUERY_UI',
+ '?dolibarr_js_JQUERY_FLOT',
'?dolibarr_font_DOL_DEFAULT_TTF',
- '?dolibarr_font_DOL_DEFAULT_TTF_BOLD',
+ '?dolibarr_font_DOL_DEFAULT_TTF_BOLD',
'separator',
'?dolibarr_mailing_limit_sendbyweb',
'?dolibarr_mailing_limit_sendbycli',
- '?dolibarr_strict_mode'
+ '?dolibarr_strict_mode'
);
$configfilelib=array(
// 'separator',
@@ -121,20 +121,20 @@ $configfilelib=array(
'dolibarr_main_auth_ldap_admin_pass',
'dolibarr_main_auth_ldap_debug',
'separator',
- 'dolibarr_lib_ADODB_PATH',
- 'dolibarr_lib_TCPDF_PATH',
- 'dolibarr_lib_FPDI_PATH',
+ 'dolibarr_lib_ADODB_PATH',
+ 'dolibarr_lib_TCPDF_PATH',
+ 'dolibarr_lib_FPDI_PATH',
'dolibarr_lib_NUSOAP_PATH',
- 'dolibarr_lib_PHPEXCEL_PATH',
- 'dolibarr_lib_GEOIP_PATH',
+ 'dolibarr_lib_PHPEXCEL_PATH',
+ 'dolibarr_lib_GEOIP_PATH',
'dolibarr_lib_ODTPHP_PATH',
- 'dolibarr_lib_ODTPHP_PATHTOPCLZIP',
- 'dolibarr_js_CKEDITOR',
- 'dolibarr_js_JQUERY',
- 'dolibarr_js_JQUERY_UI',
- 'dolibarr_js_JQUERY_FLOT',
+ 'dolibarr_lib_ODTPHP_PATHTOPCLZIP',
+ 'dolibarr_js_CKEDITOR',
+ 'dolibarr_js_JQUERY',
+ 'dolibarr_js_JQUERY_UI',
+ 'dolibarr_js_JQUERY_FLOT',
'dolibarr_font_DOL_DEFAULT_TTF',
- 'dolibarr_font_DOL_DEFAULT_TTF_BOLD',
+ 'dolibarr_font_DOL_DEFAULT_TTF_BOLD',
'separator',
'Limit nb of email sent by page',
'Strict mode is on/off'
@@ -155,19 +155,19 @@ foreach($configfileparameters as $key)
if (empty($ignore))
{
- $newkey = preg_replace('/^\?/', '', $key);
+ $newkey = preg_replace('/^\?/', '', $key);
- if (preg_match('/^\?/', $key) && empty(${$newkey}))
- {
- $i++;
- continue; // We discard parametes starting with ?
- }
+ if (preg_match('/^\?/', $key) && empty(${$newkey}))
+ {
+ $i++;
+ continue; // We discard parametes starting with ?
+ }
- if ($newkey == 'separator' && $lastkeyshown == 'separator')
- {
- $i++;
- continue;
- }
+ if ($newkey == 'separator' && $lastkeyshown == 'separator')
+ {
+ $i++;
+ continue;
+ }
print '';
if ($newkey == 'separator')
@@ -233,17 +233,17 @@ if ($resql)
$i = 0;
while ($i < $num)
- {
- $obj = $db->fetch_object($resql);
+ {
+ $obj = $db->fetch_object($resql);
- print ' ';
- print '| '.$obj->name.' | '."\n";
- print ''.$obj->value.' | '."\n";
- if (empty($conf->multicompany->enabled) || !$user->entity) print ''.$obj->entity.' | '."\n"; // If superadmin or multicompany disabled
- print " \n";
+ print '';
+ print '| '.$obj->name.' | '."\n";
+ print ''.$obj->value.' | '."\n";
+ if (empty($conf->multicompany->enabled) || !$user->entity) print ''.$obj->entity.' | '."\n"; // If superadmin or multicompany disabled
+ print " \n";
- $i++;
- }
+ $i++;
+ }
}
print '';
diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php
index 7a53b95fcf2..dce23de6270 100644
--- a/htdocs/admin/system/modules.php
+++ b/htdocs/admin/system/modules.php
@@ -54,17 +54,17 @@ $i=0;
foreach($modulesdir as $dir)
{
$handle=@opendir(dol_osencode($dir));
- if (is_resource($handle))
- {
- while (($file = readdir($handle))!==false)
- {
- if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php')
- {
- $modName = substr($file, 0, dol_strlen($file) - 10);
+ if (is_resource($handle))
+ {
+ while (($file = readdir($handle))!==false)
+ {
+ if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php')
+ {
+ $modName = substr($file, 0, dol_strlen($file) - 10);
- if ($modName)
- {
- //print 'xx'.$dir.$file.' ';
+ if ($modName)
+ {
+ //print 'xx'.$dir.$file.' ';
if (in_array($file, $modules_files))
{
// File duplicate
@@ -77,13 +77,13 @@ foreach($modulesdir as $dir)
if (class_exists($modName))
{
try {
- $objMod = new $modName($db);
+ $objMod = new $modName($db);
- $modules[$objMod->numero]=$objMod;
- $modules_names[$objMod->numero]=$objMod->name;
- $modules_files[$objMod->numero]=$file;
- $modules_fullpath[$file]=$dir.$file;
- $picto[$objMod->numero]=(isset($objMod->picto) && $objMod->picto)?$objMod->picto:'generic';
+ $modules[$objMod->numero]=$objMod;
+ $modules_names[$objMod->numero]=$objMod->name;
+ $modules_files[$objMod->numero]=$file;
+ $modules_fullpath[$file]=$dir.$file;
+ $picto[$objMod->numero]=(isset($objMod->picto) && $objMod->picto)?$objMod->picto:'generic';
}
catch(Exception $e)
{
@@ -95,11 +95,11 @@ foreach($modulesdir as $dir)
print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file) ";
}
}
- }
- }
- }
- closedir($handle);
- }
+ }
+ }
+ }
+ closedir($handle);
+ }
}
print '';
@@ -120,15 +120,15 @@ foreach($sortorder as $numero=>$name)
// Module
print ' | ';
$alt=$name.' - '.$modules_files[$numero];
- if (! empty($picto[$numero]))
- {
- if (preg_match('/^\//', $picto[$numero])) print img_picto($alt, $picto[$numero], 'width="14px"', 1);
- else print img_object($alt, $picto[$numero], 'width="14px"');
- }
- else
- {
- print img_object($alt, $picto[$numero], 'width="14px"');
- }
+ if (! empty($picto[$numero]))
+ {
+ if (preg_match('/^\//', $picto[$numero])) print img_picto($alt, $picto[$numero], 'width="14px"', 1);
+ else print img_object($alt, $picto[$numero], 'width="14px"');
+ }
+ else
+ {
+ print img_object($alt, $picto[$numero], 'width="14px"');
+ }
print ' '.$modules[$numero]->getName();
print " | ";
// Version
diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php
index 3dae3c91f9d..42c66281450 100644
--- a/htdocs/admin/system/perf.php
+++ b/htdocs/admin/system/perf.php
@@ -53,10 +53,10 @@ print $langs->trans("YouMayFindPerfAdviceHere", 'https://wiki.dolibarr.org/index
// Recupere la version de PHP
$phpversion=version_php();
-print " PHP - ".$langs->trans("Version").": ".$phpversion." \n";
+print " PHP - ".$langs->trans("Version").": ".$phpversion." \n";
// Recupere la version du serveur web
-print " Web server - ".$langs->trans("Version").": ".$_SERVER["SERVER_SOFTWARE"]." \n";
+print " Web server - ".$langs->trans("Version").": ".$_SERVER["SERVER_SOFTWARE"]." \n";
// XDebug
print ' ';
@@ -65,8 +65,8 @@ $test=!function_exists('xdebug_is_enabled');
if ($test) print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled");
else
{
- print img_picto('', 'warning').' '.$langs->trans("XDebugInstalled");
- print ' '.$langs->trans("MoreInformation").' XDebug admin page';
+ print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("XDebug"));
+ print ' - '.$langs->trans("MoreInformation").' XDebug admin page';
}
print ' ';
diff --git a/htdocs/admin/system/xdebug.php b/htdocs/admin/system/xdebug.php
index 56b452706f5..9ea68431b1a 100644
--- a/htdocs/admin/system/xdebug.php
+++ b/htdocs/admin/system/xdebug.php
@@ -41,54 +41,54 @@ print " \n";
if (!function_exists('xdebug_is_enabled'))
{
- print 'XDebug seems to be not installed. Function xdebug_is_enabled not found.';
- llxFooter();
- exit;
+ print 'XDebug seems to be not installed. Function xdebug_is_enabled not found.';
+ llxFooter();
+ exit;
}
if (function_exists('socket_create'))
{
- $address = ini_get('xdebug.remote_host')?ini_get('xdebug.remote_host'):'127.0.0.1';
- $port = ini_get('xdebug.remote_port')?ini_get('xdebug.remote_port'):9000;
+ $address = ini_get('xdebug.remote_host')?ini_get('xdebug.remote_host'):'127.0.0.1';
+ $port = ini_get('xdebug.remote_port')?ini_get('xdebug.remote_port'):9000;
- print "Current xdebug setup: \n";
- print "* Remote debug setup: \n";
- print 'xdebug.remote_enable = '.ini_get('xdebug.remote_enable')." \n";
- print 'xdebug.remote_host = '.$address." \n";
- print 'xdebug.remote_port = '.$port." \n";
- print "* Profiler setup ";
- if (function_exists('xdebug_get_profiler_filename')) print xdebug_get_profiler_filename()?"(currently on into file ".xdebug_get_profiler_filename().")":"(currently off)";
- else print "(currenlty not available)";
- print ": \n";
- print 'xdebug.profiler_enable = '.ini_get('xdebug.profiler_enable')." \n";
- print 'xdebug.profiler_enable_trigger = '.ini_get('xdebug.profiler_enable_trigger')." \n";
- print 'xdebug.profiler_output_dir = '.ini_get('xdebug.profiler_output_dir')." \n";
- print 'xdebug.profiler_output_name = '.ini_get('xdebug.profiler_output_name')." \n";
- print 'xdebug.profiler_append = '.ini_get('xdebug.profiler_append')." \n";
- print " \n";
+ print "Current xdebug setup: \n";
+ print "* Remote debug setup: \n";
+ print 'xdebug.remote_enable = '.ini_get('xdebug.remote_enable')." \n";
+ print 'xdebug.remote_host = '.$address." \n";
+ print 'xdebug.remote_port = '.$port." \n";
+ print "* Profiler setup ";
+ if (function_exists('xdebug_get_profiler_filename')) print xdebug_get_profiler_filename()?"(currently on into file ".xdebug_get_profiler_filename().")":"(currently off)";
+ else print "(currenlty not available)";
+ print ": \n";
+ print 'xdebug.profiler_enable = '.ini_get('xdebug.profiler_enable')." \n";
+ print 'xdebug.profiler_enable_trigger = '.ini_get('xdebug.profiler_enable_trigger')." \n";
+ print 'xdebug.profiler_output_dir = '.ini_get('xdebug.profiler_output_dir')." \n";
+ print 'xdebug.profiler_output_name = '.ini_get('xdebug.profiler_output_name')." \n";
+ print 'xdebug.profiler_append = '.ini_get('xdebug.profiler_append')." \n";
+ print " \n";
- echo "To run a debug session, add parameter ";
- echo "* XDEBUG_SESSION_START=aname on your URL. To stop, remove cookie XDEBUG_SESSION_START. \n";
- echo "To run a profiler session (when xdebug.profiler_enable_trigger=1), add parameter \n";
- echo "* XDEBUG_PROFILE=aname on each URL. ";
- print " ";
+ echo "To run a debug session, add parameter ";
+ echo "* XDEBUG_SESSION_START=aname on your URL. To stop, remove cookie XDEBUG_SESSION_START. \n";
+ echo "To run a profiler session (when xdebug.profiler_enable_trigger=1), add parameter \n";
+ echo "* XDEBUG_PROFILE=aname on each URL. ";
+ print " ";
- print "Test debugger server (Eclipse for example): \n";
- $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
- if (empty($socket)) die('Unable to prepare a socket');
- //socket_bind($sock, $address, $port) or die('Unable to bind on address='.$address.' port='.$port);
- //socket_listen($sock);
- //$client = socket_accept($sock);
- $client=socket_connect($socket, $address, $port);
- if ($client)
- {
- echo "Connection established: ".$client." - address=".$address." port=".$port." \n";
- echo "There is a Remote debug server at this address. \n";
- echo " \n";
- echo "To be sure this debugger accepts input from your PHP server and xdebug, be sure to have\n";
- echo "your php.ini file with this : \n";
- echo ' |