diff --git a/dev/tools/test/namespacemig/aaa.class.php b/dev/tools/test/namespacemig/aaa.class.php index d7578b78e40..84d936479f2 100644 --- a/dev/tools/test/namespacemig/aaa.class.php +++ b/dev/tools/test/namespacemig/aaa.class.php @@ -15,6 +15,9 @@ function faaa() return 'faaa'; } +/** + * Class Aaa + */ class Aaa { const AAA='aaa'; diff --git a/dev/tools/test/namespacemig/bbb.class.php b/dev/tools/test/namespacemig/bbb.class.php index f68b3b2f36c..ea3c1b18d61 100644 --- a/dev/tools/test/namespacemig/bbb.class.php +++ b/dev/tools/test/namespacemig/bbb.class.php @@ -12,6 +12,9 @@ function fbbb() return 'fbbb'; } +/** + * Class Bbb + */ class Bbb { const BBB='bbb'; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 9b333d7b4f1..d2cf26a0c9a 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -161,7 +161,6 @@ if (!count($listofmethods)) { } if ($action == 'edit') { - print '
'; print ''; print ''; diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 713f3132eaf..cfe42adc79f 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -44,21 +44,45 @@ dolibarr_install_syslog("- fileconf: entering fileconf.php page"); // install.forced.php into directory htdocs/install (This is the case with some wizard // installer like DoliWamp, DoliMamp or DoliBuntu). // We first init "forced values" to nothing. -if (!isset($force_install_noedit)) $force_install_noedit = ''; // 1=To block vars specific to distrib, 2 to block all technical parameters -if (!isset($force_install_type)) $force_install_type = ''; -if (!isset($force_install_dbserver)) $force_install_dbserver = ''; -if (!isset($force_install_port)) $force_install_port = ''; -if (!isset($force_install_database)) $force_install_database = ''; -if (!isset($force_install_prefix)) $force_install_prefix = ''; -if (!isset($force_install_createdatabase)) $force_install_createdatabase = ''; -if (!isset($force_install_databaselogin)) $force_install_databaselogin = ''; -if (!isset($force_install_databasepass)) $force_install_databasepass = ''; -if (!isset($force_install_databaserootlogin)) $force_install_databaserootlogin = ''; -if (!isset($force_install_databaserootpass)) $force_install_databaserootpass = ''; +if (!isset($force_install_noedit)) { + $force_install_noedit = ''; // 1=To block vars specific to distrib, 2 to block all technical parameters +} +if (!isset($force_install_type)) { + $force_install_type = ''; +} +if (!isset($force_install_dbserver)) { + $force_install_dbserver = ''; +} +if (!isset($force_install_port)) { + $force_install_port = ''; +} +if (!isset($force_install_database)) { + $force_install_database = ''; +} +if (!isset($force_install_prefix)) { + $force_install_prefix = ''; +} +if (!isset($force_install_createdatabase)) { + $force_install_createdatabase = ''; +} +if (!isset($force_install_databaselogin)) { + $force_install_databaselogin = ''; +} +if (!isset($force_install_databasepass)) { + $force_install_databasepass = ''; +} +if (!isset($force_install_databaserootlogin)) { + $force_install_databaserootlogin = ''; +} +if (!isset($force_install_databaserootpass)) { + $force_install_databaserootpass = ''; +} // Now we load forced values from install.forced.php file. $useforcedwizard = false; $forcedfile = "./install.forced.php"; -if ($conffile == "/etc/dolibarr/conf.php") $forcedfile = "/etc/dolibarr/install.forced.php"; // Must be after inc.php +if ($conffile == "/etc/dolibarr/conf.php") { + $forcedfile = "/etc/dolibarr/install.forced.php"; // Must be after inc.php +} if (@file_exists($forcedfile)) { $useforcedwizard = true; include_once $forcedfile; @@ -75,8 +99,7 @@ session_start(); // To be able to keep info into session (used for not losing pa pHeader($langs->trans("ConfigurationFile"), "step1", "set", "", (empty($force_dolibarr_js_JQUERY) ? '' : $force_dolibarr_js_JQUERY.'/'), 'main-inside-bis'); // Test if we can run a first install process -if (!is_writable($conffile)) -{ +if (!is_writable($conffile)) { print $langs->trans("ConfFileIsNotWritable", $conffiletoshow); dolibarr_install_syslog("fileconf: config file is not writable", LOG_WARNING); dolibarr_install_syslog("- fileconf: end"); @@ -84,29 +107,30 @@ if (!is_writable($conffile)) exit; } -if (!empty($force_install_message)) -{ +if (!empty($force_install_message)) { print '

'.$langs->trans($force_install_message).'
'; /*print ''; + print ''; - print '
'.$langs->trans("ShowEditTechnicalParameters").'
'; - */ + print '
'.$langs->trans("ShowEditTechnicalParameters").'
'; + */ } ?>
- +
- + - - - + - + @@ -252,8 +282,7 @@ if (!empty($force_install_noedit)) { @@ -273,55 +302,86 @@ if (!empty($force_install_noedit)) { // Scan les drivers $dir = DOL_DOCUMENT_ROOT.'/core/db'; $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (is_readable($dir."/".$file) && preg_match('/^(.*)\.class\.php$/i', $file, $reg)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (is_readable($dir."/".$file) && preg_match('/^(.*)\.class\.php$/i', $file, $reg)) { $type = $reg[1]; - if ($type === 'DoliDB') continue; // Skip abstract class + if ($type === 'DoliDB') { + continue; // Skip abstract class + } $class = 'DoliDB'.ucfirst($type); include_once $dir."/".$file; - if ($type == 'sqlite') continue; // We hide sqlite because support can't be complete until sqlite does not manage foreign key creation after table creation (ALTER TABLE child ADD CONSTRAINT not supported) - if ($type == 'sqlite3') continue; // We hide sqlite3 because support can't be complete until sqlite does not manage foreign key creation after table creation (ALTER TABLE child ADD CONSTRAINT not supported) + if ($type == 'sqlite') { + continue; // We hide sqlite because support can't be complete until sqlite does not manage foreign key creation after table creation (ALTER TABLE child ADD CONSTRAINT not supported) + } + if ($type == 'sqlite3') { + continue; // We hide sqlite3 because support can't be complete until sqlite does not manage foreign key creation after table creation (ALTER TABLE child ADD CONSTRAINT not supported) + } // Version min of database $versionbasemin = explode('.', $class::VERSIONMIN); $note = '('.$class::LABEL.' >= '.$class::VERSIONMIN.')'; // Switch to mysql if mysqli is not present - if ($defaultype == 'mysqli' && !function_exists('mysqli_connect')) $defaultype = 'mysql'; + if ($defaultype == 'mysqli' && !function_exists('mysqli_connect')) { + $defaultype = 'mysql'; + } // Show line into list - if ($type == 'mysql') { $testfunction = 'mysql_connect'; $testclass = ''; } - if ($type == 'mysqli') { $testfunction = 'mysqli_connect'; $testclass = ''; } - if ($type == 'pgsql') { $testfunction = 'pg_connect'; $testclass = ''; } - if ($type == 'mssql') { $testfunction = 'mssql_connect'; $testclass = ''; } - if ($type == 'sqlite') { $testfunction = ''; $testclass = 'PDO'; } - if ($type == 'sqlite3') { $testfunction = ''; $testclass = 'SQLite3'; } + if ($type == 'mysql') { + $testfunction = 'mysql_connect'; $testclass = ''; + } + if ($type == 'mysqli') { + $testfunction = 'mysqli_connect'; $testclass = ''; + } + if ($type == 'pgsql') { + $testfunction = 'pg_connect'; $testclass = ''; + } + if ($type == 'mssql') { + $testfunction = 'mssql_connect'; $testclass = ''; + } + if ($type == 'sqlite') { + $testfunction = ''; $testclass = 'PDO'; + } + if ($type == 'sqlite3') { + $testfunction = ''; $testclass = 'SQLite3'; + } $option .= ''; } } } ?> @@ -335,10 +395,12 @@ if (!empty($force_install_noedit)) { - + - + - + @@ -405,17 +477,19 @@ if (!empty($force_install_noedit)) { @@ -425,10 +499,14 @@ if (!empty($force_install_noedit)) {
@@ -116,7 +140,7 @@ if (!empty($force_install_message))
@@ -185,14 +209,14 @@ if (!empty($force_install_noedit)) { } ?>
+
- - + + + > trans("CheckToForceHttps"); ?> @@ -238,13 +266,15 @@ if (!empty($force_install_noedit)) {
+ id="db_name" + name="db_name" + value="" + > trans("DatabaseName"); ?> + id="db_host" + name="db_host" + value="" + > trans("ServerAddressDescription"); ?> @@ -347,13 +409,15 @@ if (!empty($force_install_noedit)) {
+ name="db_port" + id="db_port" + value="" + > trans("ServerPortDescription"); ?> @@ -362,26 +426,32 @@ if (!empty($force_install_noedit)) {
+ id="db_prefix" + name="db_prefix" + value="" + > trans("DatabasePrefixDescription"); ?>
- + id="db_create_database" + name="db_create_database" + + > trans("CheckToCreateDatabase"); ?> @@ -392,10 +462,12 @@ if (!empty($force_install_noedit)) { + id="db_user" + name="db_user" + value="" + > trans("AdminLogin"); ?> + id="db_pass" autocomplete="off" + name="db_pass" + value="" + > trans("AdminPassword"); ?> - + id="db_create_user" + name="db_create_user" + + > trans("CheckToCreateUser"); ?> @@ -451,11 +529,13 @@ if (!empty($force_install_noedit)) { 0 && !empty($force_install_databaserootlogin)) { print ' disabled'; } ?> + id="db_user_root" + name="db_user_root" + class="needroot" + value="" + 0 && !empty($force_install_databaserootlogin)) { + print ' disabled'; + } ?> > trans("DatabaseRootLoginDescription"); ?> @@ -473,25 +553,29 @@ if (!empty($force_install_noedit)) { " - 0 && !empty($force_install_databaserootpass)) { print ' disabled'; /* May be removed by javascript*/ } ?> + 0 && !empty($force_install_databaserootpass)) { + print ' disabled'; /* May be removed by javascript*/ + } ?> > trans("KeepEmptyIfNoPassword"); ?> @@ -535,7 +619,7 @@ jQuery(document).ready(function() { jQuery(".hideroot").show(); - jQuery(".needroot").removeAttr('disabled'); + jQuery(".needroot").removeAttr('disabled'); } else