From 65e42522d352145e23821dd8d2208da2336f74f9 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 7 Jul 2018 23:50:41 +0200 Subject: [PATCH] minor html and css corrections (as shown by browser validation and phpstorm inspections) --- htdocs/install/check.php | 70 +++++++++++---------- htdocs/install/default.css | 11 ++-- htdocs/install/fileconf.php | 121 ++++++++++++++++++------------------ htdocs/install/inc.php | 2 +- htdocs/install/index.php | 2 +- htdocs/install/repair.php | 8 +-- htdocs/install/step1.php | 44 ++++++------- htdocs/install/step2.php | 23 ++++--- htdocs/install/step4.php | 19 +++--- htdocs/install/step5.php | 22 +++---- htdocs/install/upgrade.php | 2 +- 11 files changed, 159 insertions(+), 165 deletions(-) diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 09f38fdf452..a5913f9304f 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -40,7 +40,7 @@ $langs->setDefaultLang($setuplang); $langs->load("install"); -// Now we load forced value from install.forced.php file. +// Now we load forced/pre-set values from install.forced.php file. $useforcedwizard=false; $forcedfile="./install.forced.php"; if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php"; @@ -49,14 +49,14 @@ if (@file_exists($forcedfile)) { include_once $forcedfile; } -dolibarr_install_syslog("--- check: Dolibarr install/upgrade process started"); +dolibarr_install_syslog("- check: Dolibarr install/upgrade process started"); /* * View */ -pHeader('',''); // No next step for navigation buttons. Next step is defined by clik on links. +pHeader('',''); // No next step for navigation buttons. Next step is defined by click on links. //print "
\n"; @@ -233,13 +233,13 @@ else else dolibarr_install_syslog("check: failed to create a new file " . $conffile . " into current dir " . getcwd() . ". Please check permissions.", LOG_ERR); } - // First install, we can't upgrade + // First install: no upgrade necessary/required $allowupgrade=false; } -// File is missng and can't be created +// File is missing and cannot be created if (! file_exists($conffile)) { print 'Error '.$langs->trans("ConfFileDoesNotExistsAndCouldNotBeCreated",$conffiletoshow); @@ -258,7 +258,7 @@ else $allowinstall=0; } - // File exists but can't be modified + // File exists but cannot be modified elseif (!is_writable($conffile)) { if ($confexists) @@ -294,7 +294,7 @@ else } print "
\n"; - // Requirements ok, we display the next step button + // Requirements met/all ok: display the next step button if ($checksok) { $ok=0; @@ -307,7 +307,7 @@ else { if (! file_exists($dolibarr_main_document_root."/core/lib/admin.lib.php")) { - print 'A '.$conffiletoshow.' file exists with a dolibarr_main_document_root to '.$dolibarr_main_document_root.' that seems wrong. Try to fix or remove the '.$conffiletoshow.' file.
'."\n"; + print 'A '.$conffiletoshow.' file exists with a dolibarr_main_document_root to '.$dolibarr_main_document_root.' that seems wrong. Try to fix or remove the '.$conffiletoshow.' file.
'."\n"; dol_syslog("A '" . $conffiletoshow . "' file exists with a dolibarr_main_document_root to " . $dolibarr_main_document_root . " that seems wrong. Try to fix or remove the '" . $conffiletoshow . "' file.", LOG_WARNING); } else @@ -326,7 +326,7 @@ else else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } - // $conf is already instancied inside inc.php + // $conf already created in inc.php $conf->db->type = $dolibarr_main_db_type; $conf->db->host = $dolibarr_main_db_host; $conf->db->port = $dolibarr_main_db_port; @@ -342,7 +342,7 @@ else } } - // If a database access is available, we set more variable + // If database access is available, we set more variables if ($ok) { if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption=0; @@ -364,8 +364,8 @@ else // Show title if (! empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ! empty($conf->global->MAIN_VERSION_LAST_INSTALL)) { - print $langs->trans("VersionLastUpgrade").': '.(empty($conf->global->MAIN_VERSION_LAST_UPGRADE)?$conf->global->MAIN_VERSION_LAST_INSTALL:$conf->global->MAIN_VERSION_LAST_UPGRADE).'
'; - print $langs->trans("VersionProgram").': '.DOL_VERSION.''; + print $langs->trans("VersionLastUpgrade").': '.(empty($conf->global->MAIN_VERSION_LAST_UPGRADE)?$conf->global->MAIN_VERSION_LAST_INSTALL:$conf->global->MAIN_VERSION_LAST_UPGRADE).'
'; + print $langs->trans("VersionProgram").': '.DOL_VERSION.''; //print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired")); print '
'; print '
'; @@ -375,7 +375,7 @@ else print $langs->trans("InstallEasy")." "; print $langs->trans("ChooseYourSetupMode"); - print '

'; + print '
'; $foundrecommandedchoice=0; @@ -383,9 +383,9 @@ else $notavailable_choices = array(); // Show first install line - $choice = ''.$langs->trans("FreshInstall").''; + $choice = "\n".''.$langs->trans("FreshInstall").''; $choice .= ''; - $choice .= ''; + $choice .= ''; $choice .= $langs->trans("FreshInstallDesc"); if (empty($dolibarr_main_db_host)) // This means install process was not run { @@ -397,7 +397,7 @@ else } $choice .= ''; - $choice .= ''; + $choice .= ''; if ($allowinstall) { $choice .= ''.$langs->trans("Start").''; @@ -465,7 +465,7 @@ else if ($ok) { - if (count($dolibarrlastupgradeversionarray) >= 2) // If a database access is available and last upgrade version is known + if (count($dolibarrlastupgradeversionarray) >= 2) // If database access is available and last upgrade version is known { // Now we check if this is the first qualified choice if ($allowupgrade && empty($foundrecommandedchoice) && @@ -477,22 +477,23 @@ else } } else { - // We can not recommand a choice. + // We cannot recommend a choice. // A version of install may be known, but we need last upgrade. } } - $choice .= ''; - $choice .= ''.$langs->trans("Upgrade").'
'.$newversionfrom.$newversionfrombis.' -> '.$newversionto.'
'; - $choice .= ''; + $choice .= "\n".''; + $choice .= ''.$langs->trans("Upgrade").'
'.$newversionfrom.$newversionfrombis.' -> '.$newversionto.'
'; + $choice .= ''; $choice .= $langs->trans("UpgradeDesc"); if ($recommended_choice) { $choice .= '
'; //print $langs->trans("InstallChoiceRecommanded",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE); - $choice .= '
'.$langs->trans("InstallChoiceSuggested").'
'; - if ($count < count($migarray)) // There is other choices after + $choice .= '
'; + $choice .= '
'.$langs->trans("InstallChoiceSuggested").'
'; + if ($count < count($migarray)) // There are other choices after { print $langs->trans("MigrateIsDoneStepByStep",DOL_VERSION); } @@ -500,7 +501,7 @@ else } $choice .= ''; - $choice .= ''; + $choice .= ''; if ($allowupgrade) { $disabled=false; @@ -512,8 +513,14 @@ else { $foundrecommandedchoice = 2; } - if ($disabled) $choice .= ''.$langs->trans("NotAvailable").''; - else $choice .= ''.$langs->trans("Start").''; + if ($disabled) + { + $choice .= ''.$langs->trans("NotAvailable").''; + } + else + { + $choice .= ''.$langs->trans("Start").''; + } } else { @@ -537,28 +544,28 @@ else } // Array of install choices + print"\n"; print ''; foreach ($available_choices as $choice) { print $choice; } - print '
'; + print ''."\n"; if (count($notavailable_choices)) { - print '
'; print ''; print ''; } @@ -590,6 +597,5 @@ $(".runupgrade").click(function() { '; -dolibarr_install_syslog("--- check: end"); +dolibarr_install_syslog("- check: end"); pFooter(1); // Never display next button - diff --git a/htdocs/install/default.css b/htdocs/install/default.css index e23a36ddd21..6ea6d451e92 100644 --- a/htdocs/install/default.css +++ b/htdocs/install/default.css @@ -199,7 +199,7 @@ input:-webkit-autofill { -webkit-box-shadow: 0 0 0 50px #FBFFEA inset; } -table.listofchoices, tr.listofchoices, td.listofchoices { +table.listofchoices, table.listofchoices tr, table.listofchoices td { border-collapse: collapse; padding: 4px; color: #000000; @@ -207,9 +207,6 @@ table.listofchoices, tr.listofchoices, td.listofchoices { line-height: 18px; } -tr.listofchoices { - height: 42px; -} .listofchoicesdesc { color: #999 !important; } @@ -230,7 +227,7 @@ tr.listofchoices { div.ok { color: #114466; } -font.ok { +span.ok { color: #114466; } @@ -238,7 +235,7 @@ font.ok { div.warning { color: #777711; } -font.warning { +span.warning { color: #777711; } @@ -249,7 +246,7 @@ div.error { padding: 0.2em 0.2em 0.2em 0; margin: 0.5em 0 0.5em 0; } -font.error { +span.error { color: #550000; font-weight: bold; } diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index b0affb2218a..cee5d181d45 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -24,7 +24,7 @@ /** * \file htdocs/install/fileconf.php * \ingroup install - * \brief Ask all informations required to build Dolibarr htdocs/conf/conf.php file (will be wrote on disk on next page step1) + * \brief Ask all information required to build Dolibarr htdocs/conf/conf.php file (will be written to disk on next page step1) */ include_once 'inc.php'; @@ -39,7 +39,7 @@ $langs->setDefaultLang($setuplang); $langs->load("install"); $langs->load("errors"); -dolibarr_install_syslog("--- fileconf: entering fileconf.php page"); +dolibarr_install_syslog("- fileconf: entering fileconf.php page"); // You can force preselected values of the config step of Dolibarr by adding a file // install.forced.php into directory htdocs/install (This is the case with some wizard @@ -56,7 +56,7 @@ 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 value from install.forced.php file. +// 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 @@ -71,7 +71,7 @@ if (@file_exists($forcedfile)) { * View */ -session_start(); // To be able to keep info into session (used for not loosing pass during navigation. pass must not transit throug parmaeters) +session_start(); // To be able to keep info into session (used for not losing pass during navigation. pass must not transit through parmaeters) pHeader($langs->trans("ConfigurationFile"), "step1", "set", "", (empty($force_dolibarr_js_JQUERY)?'':$force_dolibarr_js_JQUERY.'/'), 'main-inside-bis'); @@ -80,7 +80,7 @@ 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"); + dolibarr_install_syslog("- fileconf: end"); pFooter(1,$setuplang,'jscheckparam'); exit; } @@ -117,20 +117,18 @@ if (! empty($force_install_message)) - '; - print $langs->trans("WebPagesDirectory"); - print ""; - + + - + @@ -149,19 +147,19 @@ if (! empty($force_install_message)) - trans("DocumentsDirectory"); ?> - + - + @@ -186,12 +184,13 @@ if (! empty($force_install_message)) } ?> - trans("URLRoot"); ?> + - + - trans("ForceHttps"); ?> - - + + @@ -239,11 +239,11 @@ if (! empty($force_install_message)) - trans("DatabaseName"); ?> - - - + + - trans("DriverType"); ?> - + - trans("DatabaseServer"); ?> - - + + - trans("Port"); ?> - + + - trans("DatabasePrefix"); ?> - - - + + - trans("CreateDatabase"); ?> - - + + - trans("Login"); ?> - - - + + - trans("Password"); ?> - - - + + - trans("CreateUser"); ?> - - + + @@ -473,8 +471,8 @@ if (! empty($force_install_message)) - trans("Login"); ?> - + + - trans("Password"); ?> - - + + close(); Not database connexion yet -dolibarr_install_syslog("--- fileconf: end"); +dolibarr_install_syslog("- fileconf: end"); pFooter($err,$setuplang,'jscheckparam'); diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 0a2a6866f26..88dbc76f9a6 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -149,7 +149,7 @@ if ($suburi == '/') $suburi = ''; // If $suburi is /, it is now '' define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...) -if (empty($conf->file->character_set_client)) $conf->file->character_set_client="UTF-8"; +if (empty($conf->file->character_set_client)) $conf->file->character_set_client="utf-8"; if (empty($conf->db->character_set)) $conf->db->character_set='utf8'; if (empty($conf->db->dolibarr_main_db_collation)) $conf->db->dolibarr_main_db_collation='utf8_unicode_ci'; if (empty($conf->db->dolibarr_main_db_encryption)) $conf->db->dolibarr_main_db_encryption=0; diff --git a/htdocs/install/index.php b/htdocs/install/index.php index 82dcd87b030..46e60be52ec 100644 --- a/htdocs/install/index.php +++ b/htdocs/install/index.php @@ -55,7 +55,7 @@ print '

'; print ''; print ''; -print ''; print ''; diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 97f9a71bb87..0c3edfaebd3 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -549,11 +549,11 @@ if ($ok && GETPOST('clean_menus','alpha')) dol_print_error($db); } else - print ' - Cleaned'; + print ' - Cleaned'; } else { - print ' - Canceled (test mode)'; + print ' - Canceled (test mode)'; } } else @@ -982,11 +982,11 @@ if ($ok && GETPOST('force_disable_of_modules_not_found','alpha')) dol_print_error($db); } else - print ' - Cleaned'; + print ' - Cleaned'; } else { - print ' - Canceled (test mode)'; + print ' - Canceled (test mode)'; } } else diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 6f1143d6f10..f6f1571b4ec 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -46,7 +46,7 @@ $main_dir = GETPOST('main_dir')?GETPOST('main_dir'):(empty($argv[3])?'':$argv[3] $main_data_dir = GETPOST('main_data_dir') ? GETPOST('main_data_dir') : (empty($argv[4])? ($main_dir . '/documents') :$argv[4]); // Dolibarr root URL $main_url = GETPOST('main_url')?GETPOST('main_url'):(empty($argv[5])?'':$argv[5]); -// Database login informations +// Database login information $userroot=GETPOST('db_user_root','alpha')?GETPOST('db_user_root','alpha'):(empty($argv[6])?'':$argv[6]); $passroot=GETPOST('db_pass_root','none')?GETPOST('db_pass_root','none'):(empty($argv[7])?'':$argv[7]); // Database server @@ -68,18 +68,18 @@ $main_alt_dir_name = ((GETPOST("main_alt_dir_name",'alpha') && GETPOST("main_alt session_start(); // To be able to keep info into session (used for not losing password during navigation. The password must not transit through parameters) -// Save a flag to tell to restore input value if we do back +// Save a flag to tell to restore input value if we go back $_SESSION['dol_save_pass']=$db_pass; //$_SESSION['dol_save_passroot']=$passroot; -// Now we load forced value from install.forced.php file. +// 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"; if (@file_exists($forcedfile)) { $useforcedwizard = true; include_once $forcedfile; - // If forced install is enabled, let's replace post values. These are empty because form fields are disabled. + // If forced install is enabled, replace the post values. These are empty because form fields are disabled. if ($force_install_noedit) { $main_dir = detect_dolibarr_main_document_root(); if (!empty($force_install_main_data_root)) { @@ -204,7 +204,7 @@ if (! $error) { $result=@include_once $main_dir."/core/db/".$db_type.'.class.php'; if ($result) { - // If we ask database or user creation we need to connect as root, so we need root login + // If we require database or user creation we need to connect as root, so we need root login credentials if (!empty($db_create_database) && !$userroot) { print '
'.$langs->trans("YouAskDatabaseCreationSoDolibarrNeedToConnect",$db_name).'
'; print '
'; @@ -397,7 +397,7 @@ if (! $error && $db->connected && $action == "set") print ""; print ''; $error++; @@ -420,7 +420,7 @@ if (! $error && $db->connected && $action == "set") } } - // Les documents sont en dehors de htdocs car ne doivent pas pouvoir etre telecharges en passant outre l'authentification + // Documents are stored above the web pages root to prevent being downloaded without authentification $dir=array(); $dir[] = $main_data_dir."/mycompany"; $dir[] = $main_data_dir."/medias"; @@ -431,7 +431,7 @@ if (! $error && $db->connected && $action == "set") $dir[] = $main_data_dir."/produit"; $dir[] = $main_data_dir."/doctemplates"; - // Boucle sur chaque repertoire de dir[] pour les creer s'ils nexistent pas + // Loop on each directory of dir [] to create them if they do not exist $num=count($dir); for ($i = 0; $i < $num; $i++) { @@ -469,7 +469,7 @@ if (! $error && $db->connected && $action == "set") print ""; print ''; } @@ -519,7 +519,7 @@ if (! $error && $db->connected && $action == "set") // Save old conf file on disk if (file_exists("$conffile")) { - // We must ignore errors as an existing old file may already exists and not be replacable or + // We must ignore errors as an existing old file may already exist and not be replaceable or // the installer (like for ubuntu) may not have permission to create another file than conf.php. // Also no other process must be able to read file or we expose the new file, so content with password. @dol_copy($conffile, $conffile.'.old', '0400'); @@ -539,7 +539,7 @@ if (! $error && $db->connected && $action == "set") print ''; print ''; - // Si creation utilisateur admin demandee, on le cree + // Create database user if requested if (isset($db_create_user) && ($db_create_user == "1" || $db_create_user == "on")) { dolibarr_install_syslog("step1: create database user: " . $dolibarr_main_db_user); @@ -558,7 +558,7 @@ if (! $error && $db->connected && $action == "set") $databasefortest='master'; } - // Creation handler de base, verification du support et connexion + // Check database connection $db=getDoliDBInstance($conf->db->type,$conf->db->host,$userroot,$passroot,$databasefortest,$conf->db->port); @@ -629,7 +629,7 @@ if (! $error && $db->connected && $action == "set") print ''; print ''; - // Affiche aide diagnostique + // warning message due to connection failure print ''; print ''; - // Affiche aide diagnostique + // warning message print '"; - // si acces serveur ok et acces base ok, tout est ok, on ne va pas plus loin, on a meme pas utilise le compte root. + // server access ok, basic access ok if ($db->database_selected) { dolibarr_install_syslog("step1: connection to database " . $conf->db->name . " by user " . $conf->db->user . " ok"); @@ -747,7 +747,7 @@ if (! $error && $db->connected && $action == "set") print 'Error'; print ""; - // Affiche aide diagnostique + // warning message print '"; - // Affiche aide diagnostique + // warning message print '\n"; + print '\n"; } } }
'.$langs->trans("DefaultLanguage").' : '; +print ''.$langs->trans("DefaultLanguage").' : '; print $formadmin->select_language('auto','selectlang',1,0,0,1); print '
".$langs->trans("ErrorDirDoesNotExists",$main_data_dir); print ' '.$langs->trans("YouMustCreateItAndAllowServerToWrite"); print ''; - print ''.$langs->trans("Error").''; + print ''.$langs->trans("Error").''; print "

'.$langs->trans("CorrectProblemAndReloadPage",$_SERVER['PHP_SELF'].'?testget=ok').'
".$langs->trans("ErrorDirDoesNotExists",$main_data_dir); print ' '.$langs->trans("YouMustCreateItAndAllowServerToWrite"); print ''; - print ''.$langs->trans("Error").''; + print ''.$langs->trans("Error").''; print "

'.$langs->trans("CorrectProblemAndReloadPage",$_SERVER['PHP_SELF'].'?testget=ok').'
Ok
Error

'; print $langs->trans("YouAskDatabaseCreationSoDolibarrNeedToConnect",$dolibarr_main_db_user,$dolibarr_main_db_host,$userroot); print '
'; @@ -640,10 +640,10 @@ if (! $error && $db->connected && $action == "set") $error++; } } - } // Fin si "creation utilisateur" + } // end of user account creation - // If database creation is asked, we create it + // If database creation was asked, we create it if (!$error && (isset($db_create_database) && ($db_create_database == "1" || $db_create_database == "on"))) { dolibarr_install_syslog("step1: create database: " . $dolibarr_main_db_name . " " . $dolibarr_main_db_character_set . " " . $dolibarr_main_db_collation . " " . $dolibarr_main_db_user); $newdb=getDoliDBInstance($conf->db->type,$conf->db->host,$userroot,$passroot,'',$conf->db->port); @@ -672,7 +672,7 @@ if (! $error && $db->connected && $action == "set") } else { - // Affiche aide diagnostique + // warning message print '

'; print $langs->trans("ErrorFailedToCreateDatabase",$dolibarr_main_db_name).'
'; print $newdb->lasterror().'
'; @@ -693,7 +693,7 @@ if (! $error && $db->connected && $action == "set") print '
Error

'; print $langs->trans("YouAskDatabaseCreationSoDolibarrNeedToConnect",$dolibarr_main_db_user,$dolibarr_main_db_host,$userroot); print '
'; @@ -703,7 +703,7 @@ if (! $error && $db->connected && $action == "set") $error++; } - } // Fin si "creation database" + } // end of create database // We test access with dolibarr database user (not admin) @@ -724,7 +724,7 @@ if (! $error && $db->connected && $action == "set") print 'Ok'; print "

'; print $langs->trans('CheckThatDatabasenameIsCorrect',$dolibarr_main_db_name).'
'; print $langs->trans('IfAlreadyExistsCheckOption').'
'; @@ -767,7 +767,7 @@ if (! $error && $db->connected && $action == "set") print 'Error'; print "

'; print $langs->trans("ErrorConnection",$conf->db->host,$conf->db->name,$conf->db->user); print $langs->trans('IfLoginDoesNotExistsCheckCreateUser').'
'; @@ -1023,7 +1023,7 @@ function write_conf_file($conffile) if (file_exists("$conffile")) { - include $conffile; // On force rechargement. Ne pas mettre include_once ! + include $conffile; // force config reload, do not put include_once conf($dolibarr_main_document_root); print "
"; diff --git a/htdocs/install/step2.php b/htdocs/install/step2.php index 30b3ff7d64f..b9adb5dac21 100644 --- a/htdocs/install/step2.php +++ b/htdocs/install/step2.php @@ -58,7 +58,7 @@ if ($dolibarr_main_db_type == "sqlite3") $choix=5; //if (empty($choix)) dol_print_error('','Database type '.$dolibarr_main_db_type.' not supported into step2.php page'); -// Now we load forced value from install.forced.php file. +// 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"; @@ -67,7 +67,7 @@ if (@file_exists($forcedfile)) { include_once $forcedfile; } -dolibarr_install_syslog("--- step2: entering step2.php page"); +dolibarr_install_syslog("- step2: entering step2.php page"); /* @@ -88,7 +88,7 @@ if ($action == "set") { print '

Database '.$langs->trans("Database").'

'; - print ''; + print '
'; $error=0; $db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port); @@ -237,7 +237,7 @@ if ($action == "set") print ""; - print ''; + print ''; $error++; } } @@ -246,7 +246,7 @@ if ($action == "set") { print ""; - print ''; + print ''; $error++; dolibarr_install_syslog("step2: failed to open file " . $dir . $file, LOG_ERR); } @@ -384,7 +384,7 @@ if ($action == "set") print ""; - print ''; + print ''; $error++; } } @@ -395,7 +395,7 @@ if ($action == "set") { print ""; - print '"; + print '"; $error++; dolibarr_install_syslog("step2: failed to open file " . $dir . $file, LOG_ERR); } @@ -417,7 +417,7 @@ if ($action == "set") ***************************************************************************************/ if ($ok && $createfunctions) { - // For this file, we use directory according to database type + // For this file, we use a directory according to database type if ($choix==1) $dir = "mysql/functions/"; elseif ($choix==2) $dir = "pgsql/functions/"; elseif ($choix==3) $dir = "mssql/functions/"; @@ -473,7 +473,7 @@ if ($action == "set") print ""; - print ''; + print ''; $error++; } } @@ -594,7 +594,7 @@ if ($action == "set") { $ok = 0; $okallfile = 0; - print ''.$langs->trans("ErrorSQL")." : ".$db->lasterrno()." - ".$db->lastqueryerror()." - ".$db->lasterror()."
"; + print ''.$langs->trans("ErrorSQL")." : ".$db->lasterrno()." - ".$db->lastqueryerror()." - ".$db->lasterror()."
"; } } } @@ -627,7 +627,7 @@ $ret=0; if (!$ok && isset($argv[1])) $ret=1; dolibarr_install_syslog("Exit ".$ret); -dolibarr_install_syslog("--- step2: end"); +dolibarr_install_syslog("- step2: end"); pFooter($ok?0:1,$setuplang); @@ -635,4 +635,3 @@ if (isset($db) && is_object($db)) $db->close(); // Return code if ran from command line if ($ret) exit($ret); - diff --git a/htdocs/install/step4.php b/htdocs/install/step4.php index 92bcb3dc1a7..64d6993cc94 100644 --- a/htdocs/install/step4.php +++ b/htdocs/install/step4.php @@ -47,7 +47,7 @@ if (@file_exists($forcedfile)) { include_once $forcedfile; } -dolibarr_install_syslog("--- step4: entering step4.php page"); +dolibarr_install_syslog("- step4: entering step4.php page"); $error=0; $ok = 0; @@ -74,18 +74,18 @@ print '


'; -print '

".$langs->trans("CreateTableAndPrimaryKey",$name); print "
\n".$langs->trans("Request").' '.$requestnb.' : '.$buffer.'
Executed query : '.$db->lastquery; print "\n
'.$langs->trans("ErrorSQL")." ".$db->errno()." ".$db->error().'
'.$langs->trans("ErrorSQL")." ".$db->errno()." ".$db->error().'
".$langs->trans("CreateTableAndPrimaryKey",$name); print "'.$langs->trans("Error").' Failed to open file '.$dir.$file.'
'.$langs->trans("Error").' Failed to open file '.$dir.$file.'
".$langs->trans("CreateOtherKeysForTable",$name); print "
\n".$langs->trans("Request").' '.$requestnb.' : '.$db->lastqueryerror(); print "\n
'.$langs->trans("ErrorSQL")." ".$db->errno()." ".$db->error().'
'.$langs->trans("ErrorSQL")." ".$db->errno()." ".$db->error().'
".$langs->trans("CreateOtherKeysForTable",$name); print "'.$langs->trans("Error")." Failed to open file ".$dir.$file."
'.$langs->trans("Error")." Failed to open file ".$dir.$file."
".$langs->trans("FunctionsCreation"); print "
\n".$langs->trans("Request").' '.$requestnb.' : '.$buffer; print "\n
'.$langs->trans("ErrorSQL")." ".$db->errno()." ".$db->error().'
'.$langs->trans("ErrorSQL")." ".$db->errno()." ".$db->error().'
'; +print '
'; $db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port); if ($db->ok) { - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print '
'.$langs->trans("Login").' :'; - print '
'.$langs->trans("Password").' :'; - print '
'.$langs->trans("PasswordAgain").' :'; - print '
'; + print '
'; + print '
'; + print '
'; if (isset($_GET["error"]) && $_GET["error"] == 1) @@ -113,12 +113,11 @@ if ($db->ok) } - $ret=0; if ($error && isset($argv[1])) $ret=1; dolibarr_install_syslog("Exit ".$ret); -dolibarr_install_syslog("--- step4: end"); +dolibarr_install_syslog("- step4: end"); pFooter($error,$setuplang); diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php index 79fead3c51d..845c3aa8a02 100644 --- a/htdocs/install/step5.php +++ b/htdocs/install/step5.php @@ -23,7 +23,7 @@ /** * \file htdocs/install/step5.php * \ingroup install - * \brief Last page of upgrade or install process + * \brief Last page of upgrade / install process */ include_once 'inc.php'; @@ -67,7 +67,7 @@ if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.fo if (@file_exists($forcedfile)) { $useforcedwizard = true; include_once $forcedfile; - // If forced install is enabled, let's replace post values. These are empty because form fields are disabled. + // If forced install is enabled, replace post values. These are empty because form fields are disabled. if ($force_install_noedit == 2) { if (!empty($force_install_dolibarrlogin)) { $login = $force_install_dolibarrlogin; @@ -75,16 +75,15 @@ if (@file_exists($forcedfile)) { } } -dolibarr_install_syslog("--- step5: entering step5.php page"); +dolibarr_install_syslog("- step5: entering step5.php page"); $error=0; - /* * Actions */ -// If install, check pass and pass_verif used to create admin account +// If install, check password and password_verification used to create admin account if ($action == "set") { if ($pass <> $pass_verif) { header("Location: step4.php?error=1&selectlang=$setuplang" . (isset($login) ? '&login=' . $login : '')); @@ -394,8 +393,8 @@ if ($action == "set" && $success) else { // If here MAIN_VERSION_LAST_UPGRADE is not empty - print $langs->trans("VersionLastUpgrade").': '.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
'; - print $langs->trans("VersionProgram").': '.DOL_VERSION.'
'; + print $langs->trans("VersionLastUpgrade").': '.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
'; + print $langs->trans("VersionProgram").': '.DOL_VERSION.'
'; print $langs->trans("MigrationNotFinished").'
'; print "
"; @@ -442,8 +441,8 @@ elseif (empty($action) || preg_match('/upgrade/i',$action)) else { // If here MAIN_VERSION_LAST_UPGRADE is not empty - print $langs->trans("VersionLastUpgrade").': '.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
'; - print $langs->trans("VersionProgram").': '.DOL_VERSION.''; + print $langs->trans("VersionLastUpgrade").': '.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
'; + print $langs->trans("VersionProgram").': '.DOL_VERSION.''; print "
"; @@ -457,17 +456,14 @@ else dol_print_error('','step5.php: unknown choice of action'); } - - // Clear cache files clearstatcache(); - $ret=0; if ($error && isset($argv[1])) $ret=1; dolibarr_install_syslog("Exit ".$ret); -dolibarr_install_syslog("--- step5: Dolibarr setup finished"); +dolibarr_install_syslog("- step5: Dolibarr setup finished"); pFooter(1,$setuplang); diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index c2ee6e93ad4..3136c813bea 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -297,7 +297,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 { if ($db->lasterrno() != 'DB_ERROR_NOSUCHTABLE') { - print '
'.$sql.' : '.$db->lasterror()."
'.$sql.' : '.$db->lasterror()."