diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 190d040c6c760b3e8bd03d28782a49bd1f6c1a5f..e32596ba6cb233143a482bba3c74bbd2fc7cf1c0 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -191,7 +191,8 @@ if ($_GET["action"] == 'removelogo') * Affichage page */ -llxHeader(); +$wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader($langs->trans("Setup"),'',$wikihelp); $form = new Form($db); $formcompany = new FormCompany($db); diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index a97e70d7bd430eaeb2649261b462f0f5a56bfc31..b4f263ca19126bcab45ade2b2cc28b068e0355bd 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -51,16 +51,18 @@ print_fiche_titre($langs->trans("SetupArea"),'','setup'); if ($mesg) print $mesg.'<br>'; -print $langs->trans("SetupDescription1").'<br>'; +print $langs->trans("SetupDescription1").' '; print $langs->trans("AreaForAdminOnly").'<br>'; print "<br>"; print $langs->trans("SetupDescription2")."<br>"; print "<br>"; print img_picto('','puce').' '.$langs->trans("SetupDescription3")."<br>"; -//print "<br>"; +print "<br>"; print img_picto('','puce').' '.$langs->trans("SetupDescription4")."<br>"; print "<br>"; +print img_picto('','puce').' '.$langs->trans("SetupDescription5")."<br>"; +print "<br>"; print '<br>'; print info_admin($langs->trans("OnceSetupFinishedCreateUsers")).'<br>'; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index e4d3c5ce545bb449ac20137f4014cd8276525442..2dd77d01c6652acb108fe21887243f3ac3870db4 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -185,7 +185,8 @@ function UnActivate($value,$requiredby=1) */ $_SESSION["mode"]=$mode; -llxHeader("",""); +$wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader($langs->trans("Setup"),'',$wikihelp); print_fiche_titre($langs->trans("ModulesSetup"),'','setup'); diff --git a/htdocs/install/background.png b/htdocs/install/background.png new file mode 100644 index 0000000000000000000000000000000000000000..b264649fcbc26d7774496d1d9c308841c69c769f Binary files /dev/null and b/htdocs/install/background.png differ diff --git a/htdocs/install/check.php b/htdocs/install/check.php index f8c4cae085a3402776fe7673b0af2ea956008666..34e10e472e79a9432f67539baa2171586f5ccf96 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -48,16 +48,15 @@ dolibarr_install_syslog("check: Dolibarr install/upgrade process started"); * View */ -pHeader($langs->trans("DolibarrWelcome"),""); // Etape suivante = license +pHeader('',""); // Etape suivante = license print '<center>'; print '<img src="../theme/dolibarr_logo.png" alt="Dolibarr logo"><br>'; print DOL_VERSION.'<br><br>'; print '</center>'; -print "<br>\n"; - -print $langs->trans("InstallEasy")."<br><br>\n"; +//print "<br>\n"; +//print $langs->trans("InstallEasy")."<br><br>\n"; print '<b>'.$langs->trans("MiscellanousChecks")."</b>:<br>\n"; @@ -293,14 +292,15 @@ else # Show title if (! empty($conf->global->MAIN_VERSION_LAST_UPGRADE)) { - print $langs->trans("VersionLastUpgrade").": ".$conf->global->MAIN_VERSION_LAST_UPGRADE.'<br>'; - print $langs->trans("VersionProgram").": ".DOL_VERSION; + print $langs->trans("VersionLastUpgrade").': <b><font class="ok">'.$conf->global->MAIN_VERSION_LAST_UPGRADE.'</font></b><br>'; + print $langs->trans("VersionProgram").': <b><font class="ok">'.DOL_VERSION.'</font></b>'; //print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired")); print '<br>'; print '<br>'; } else print "<br />\n"; + print $langs->trans("InstallEasy")." "; print $langs->trans("ChooseYourSetupMode"); print '<table width="100%" cellspacing="1" cellpadding="4" border="1">'; @@ -325,6 +325,7 @@ else # Show upgrade lines $allowupgrade=true; + if (defined("MAIN_NOT_INSTALLED")) $allowupgrade=false; $migrationscript=array( //array('from'=>'2.0.0', 'to'=>'2.1.0'), //array('from'=>'2.1.0', 'to'=>'2.2.0'), array('from'=>'2.2.0', 'to'=>'2.4.0'), @@ -352,11 +353,11 @@ else // If last upgrade was an alpha or beta, we increase target version to 1 to select this one. if (isset($conf->global->MAIN_VERSION_LAST_UPGRADE) && eregi('beta|alpha',$conf->global->MAIN_VERSION_LAST_UPGRADE)) $dolibarrversiontoarray[2]=(isset($dolibarrversiontoarray[2]) ? ($dolibarrversiontoarray[2]+1) : 1); // Now we check if this is the first qualified choice - if (empty($foundrecommandedchoice) && versioncompare($dolibarrversiontoarray,$dolibarrlastupgradeversionarray) > 0) + if ($allowupgrade && empty($foundrecommandedchoice) && versioncompare($dolibarrversiontoarray,$dolibarrlastupgradeversionarray) > 0) { print '<br>'; //print $langs->trans("InstallChoiceRecommanded",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE); - print '<center><div class="warning">'.$langs->trans("InstallChoiceSuggested").'</div></center>'; + print '<center><div class="ok">'.$langs->trans("InstallChoiceSuggested").'</div></center>'; // <img src="../theme/eldy/img/tick.png" alt="Ok"> '; $foundrecommandedchoice=1; // To show only once } diff --git a/htdocs/install/default.css b/htdocs/install/default.css index 85865238376b25e34d68d789c0b07aff4b149c39..b853528389813a31cd31ec26a52b5586738a49ab 100644 --- a/htdocs/install/default.css +++ b/htdocs/install/default.css @@ -1,4 +1,5 @@ /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,98 +19,102 @@ */ body { - font-size:13px; - font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif; - background-color: #F4F4F4; - margin-left: 20px; - margin-right: 20px; - margin-top: 20px; - margin-bottom: 20px; +font-size:13px; +font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif; +background: #f9f9f9 url(headbg.jpg) 0 0 no-repeat; +/* background-color: #F4F4F4; */ +margin-left: 20px; +margin-right: 20px; +margin-top: 20px; +margin-bottom: 10px; } -span.titre { - font-size:1.1em; - font-weight: bold; - background: #dcdcd3; - color: #4965B3; - border: 1px solid #8CACBB; - padding: 5px 5px 5px 5px; - margin: 0em 0em 0em 0em; +div.titre { +padding: 5px 5px 5px 5px; +margin: 0em 0em 0em 0em; } -div.titre { - padding: 5px 5px 5px 5px; - margin: 0em 0em 0em 0em; +span.titre { +font-size: 1.1em; +font-weight: bold; +background: #FFFFFF; +color: #4965B3; +border: 1px solid #8CACBB; +padding: 5px 5px 5px 5px; +margin: 0em 0em 0em 0em; } div.soustitre { - font-size: 15px; - font-weight: bold; - color: #4965B3; - padding: 0em 1.2em 0.5em 2em; - margin: 1.2em 1.2em 1.2em 1.2em; - border-bottom: 1px solid #8CACBB; - border-right: 1px solid #8CACBB; - text-align: right; +font-size: 15px; +font-weight: bold; +color: #4965B3; +padding: 0em 1.2em 0.5em 2em; +margin: 1.2em 1.2em 1.2em 1.2em; +border-bottom: 1px solid #8CACBB; +border-right: 1px solid #8CACBB; +text-align: right; } inputdisabled { - background: #FDFDFD; - border: 1px solid #ACBCBB; - padding: 0px 0px 0px 0px; - margin: 0px 0px 0px 0px; +background: #FDFDFD; +border: 1px solid #ACBCBB; +padding: 0px 0px 0px 0px; +margin: 0px 0px 0px 0px; } table.main { -background: #dcdcd3; +background: #F0F0F0 url(background.png) repeat-x; text-align: left; border: 1px solid #8CACBB; +color: #000000; } table.main-inside { padding-left: 10px; padding-right: 10px; -margin-bottom: 20px; +margin-bottom: 10px; margin-top: 10px; +color: #000000; } +/* OK */ div.ok { color: #114466; } +font.ok { +color: #114466; +} +/* Warning */ div.warning { color: #777711; } +font.warning { +color: #777711; +} +/* Error */ div.error { color: #550000; font-weight: bold; padding: 0.2em 0.2em 0.2em 0.2em; margin: 0.5em 0em 0.5em 0em; border: 1px solid #6C7C8B; } - font.error { -color: #550000; +color: #550000; font-weight: bold; } +/* Next button */ div.barrebottom { text-align: right; margin-top: 10px; -padding-top: 10px; -padding-bottom: 10px; +padding-top: 5px; +padding-bottom: 5px; padding-right: 10px; } -div.footer { -background-color: #dcdff4; -font-size: 10px; -border-top: solid black 1px; -padding-left: 5px; -text-align: center; -} - div.header { background-color: #dcdff4; border-bottom: solid black 1px; @@ -117,10 +122,6 @@ padding-left: 5px; text-align: center; } -div.footer p { -margin: 0px; -} - a:link,a:visited,a:active { text-decoration:none; } @@ -139,7 +140,8 @@ color:black; font-size: 13px; } -div.main-inside h2 { +h3 { +margin-top: 10px; font-size:18px; font-weight: bold; color: #4965B3; @@ -153,16 +155,16 @@ tr.bg2 { background-color: #B5C5C5; } +/* Class for parameters key and value */ td.label { -background: #dcdcd3; color: #5945A3; padding: 5px 5px 5px 5px; margin: 0em 0em 0em 0em; border-bottom: 1px solid #8CACBB; } +/* Class for parameters example */ td.comment { -background: #dcdcd3; color: black; padding: 5px 5px 5px 5px; margin: 0em 0em 0em 0em; diff --git a/htdocs/install/etape0.php b/htdocs/install/etape0.php index 1cc31844d6dd3afc017a91c10f82933126be1111..44867a7f99fd3a32ba18704104b9bf9a8b337185 100644 --- a/htdocs/install/etape0.php +++ b/htdocs/install/etape0.php @@ -18,10 +18,10 @@ */ /** - \file htdocs/install/etape0.php - \ingroup install - \brief Permet d'afficher et de confirmer le charset par rapport aux informations pr�c�dentes -> s�lection suite � connexion' - \version $Id$ + * \file htdocs/install/etape0.php + * \ingroup install + * \brief Permet d'afficher et de confirmer le charset par rapport aux informations pr�c�dentes -> s�lection suite � connexion' + * \version $Id$ */ define('DONOTLOADCONF',1); // To avoid loading conf by file inc.php @@ -233,7 +233,7 @@ if (! $error && $db->connected) ?> <tr> <td valign="top" class="label"><?php echo $langs->trans("CharacterSetDatabase"); ?></td> - <td valign="top" class="label"><?php + <td valign="top" class="label"><?php if (sizeof($listOfCharacterSet)) { print '<select name="dolibarr_main_db_character_set" '.$disabled.'>'; @@ -243,7 +243,7 @@ if (! $error && $db->connected) // We keep only utf8 and iso $linedisabled=false; if (! eregi('(utf8|latin1)',$characterSet['charset'])) $linedisabled=true; - + if ($defaultCharacterSet == $characterSet['charset'] ) { $selected="selected"; @@ -286,7 +286,7 @@ if (! $error && $db->connected) // We keep only utf8 and iso $linedisabled=false; if (! eregi('(utf8_general|latin1_swedish)',$collation['collation'])) $linedisabled=true; - + if ($defaultCollationConnection == $collation['collation']) { $selected="selected"; diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php index 3e490170051160ca53e0de3b30d8562a942a4512..12244ec192189661d023728039eb8d495ab63a14 100644 --- a/htdocs/install/etape5.php +++ b/htdocs/install/etape5.php @@ -242,15 +242,15 @@ if ($_POST["action"] == "upgrade") if ($_POST["action"] == "upgrade") { - print '<a href="'.$dolibarr_main_url_root .'/index.php?mainmenu=home'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">'; + print '<center><a href="'.$dolibarr_main_url_root .'/index.php?mainmenu=home'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">'; print $langs->trans("GoToDolibarr"); - print '</a>'; + print '</a></center>'; } else { - print '<a href="'.$dolibarr_main_url_root .'/admin/index.php?mainmenu=home&leftmenu=setup'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">'; + print '<center><a href="'.$dolibarr_main_url_root .'/admin/index.php?mainmenu=home&leftmenu=setup'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">'; print $langs->trans("GoToSetupArea"); - print '</a>'; + print '</a></center>'; } diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index b65a9a1e25df65445e50d28af197ee691c0de76d..d045067e2f2686f26985a201bcbd7a085966f629 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -66,7 +66,7 @@ if (! empty($force_install_message_doliwamp)) <tr> <td colspan="3" class="label" align="center"><h3> -<?php echo $langs->trans("Main"); ?> +<?php echo $langs->trans("WebServer"); ?> </h3></td></tr> <tr> @@ -314,7 +314,7 @@ while (($file = readdir($handle))!==false) </td> </tr> -<tr class="bg1"> +<tr> <td class="label" valign="top"> <b><?php echo $langs->trans("Login"); ?></b> </td> diff --git a/htdocs/install/headbg.jpg b/htdocs/install/headbg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5491c6e4acbc576eb5397d1091fdd7ea7e03de00 Binary files /dev/null and b/htdocs/install/headbg.jpg differ diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index b893364223a66531d7acf3274f1d8f338ff982da..1e7b92c3b1c2ffbd2d12f98008e5e43d6b8480c2 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -65,7 +65,7 @@ if (! is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initial * View */ -pHeader($langs->trans("DatabaseMigration"),"upgrade2","upgrade"); +pHeader('',"upgrade2","upgrade"); $actiondone=0; @@ -74,7 +74,7 @@ if (! isset($_GET["action"]) || $_GET["action"] == "upgrade" || $_GET["action"] { $actiondone=1; - print '<h3>'.$langs->trans("DatabaseMigration").'<h3>'; + print '<h3>'.$langs->trans("DatabaseMigration").'</h3>'; if ($_GET["action"] != "repair" && ! $versionfrom && ! $versionto) { @@ -103,7 +103,7 @@ if (! isset($_GET["action"]) || $_GET["action"] == "upgrade" || $_GET["action"] $db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port); if ($db->connected == 1) { - print "<tr><td nowrap>"; + print '<tr><td nowrap="nowrap">'; print $langs->trans("ServerConnection")." : $dolibarr_main_db_host</td><td align=\"right\">".$langs->trans("OK")."</td></tr>"; dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ServerConnection")." : $dolibarr_main_db_host ".$langs->transnoentities("OK")); $ok = 1; @@ -119,7 +119,7 @@ if (! isset($_GET["action"]) || $_GET["action"] == "upgrade" || $_GET["action"] { if($db->database_selected == 1) { - print "<tr><td nowrap>"; + print '<tr><td nowrap="nowrap">'; print $langs->trans("DatabaseConnection")." : ".$dolibarr_main_db_name."</td><td align=\"right\">".$langs->trans("OK")."</td></tr>"; dolibarr_install_syslog("upgrade: Database connection successfull : $dolibarr_main_db_name"); $ok=1; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 03058374bc62e75823ab1135cb0131ad1dd690b4..cc10370a473c41b7c7b6fc2d0da2e33885e2e814 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -65,7 +65,7 @@ dolibarr_install_syslog("upgrade2: Entering upgrade2.php page"); if (! is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initialized",LOG_ERR); -pHeader($langs->trans('DataMigration'),'etape5','upgrade'); +pHeader('','etape5','upgrade'); if (isset($_POST['action']) && $_POST['action'] == 'upgrade') diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 6914d32b7ff3b2ad92888b63b96243899435d674..c7b0e2fa583878fd6e5c3e97453f1e54b671db6b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -597,7 +597,7 @@ SummarySystem=System information summary SummaryConst=List of all Dolibarr setup parameters SystemUpdate=System update SystemSuccessfulyUpdate=Your system has been updated successfuly -MenuCompanySetup=Company/Fundation +MenuCompanySetup=Company/Foundation MenuNewUser=New user MenuTopManager=Top menu manager MenuLeftManager=Left menu manager @@ -647,8 +647,9 @@ DelaysOfToleranceMembers=Tolerance delay (in days) before alert on delayed adher DelaysOfToleranceChequesToDeposit=Tolerance delay (in days) before alert for cheques deposit to do SetupDescription1=All parameters available in the setup area allow you to setup Dolibarr before starting using it. SetupDescription2=The 2 most important setup steps are the 2 first ones in the left setup menu, this means Company/foundation setup page and Modules setup page: -SetupDescription3=<b>Company/fundation</b> setup is required because input information is used on Dolibarr displays and to modify Dolibarr behaviour (for example for features related to your country). -SetupDescription4=<b>Modules</b> setup is required because Dolibarr is not a simple ERP/CRM but a sum of several modules, all more or less independant. It's only after activating modules you're interesting in that you will see features appeared in Dolibarr menu. +SetupDescription3=Parameters in menu <b>Setup -> Company/foundation</b> are required because input information is used on Dolibarr displays and to modify Dolibarr behaviour (for example for features related to your country). +SetupDescription4=Parameters in menu <b>Setup -> Modules</b> are required because Dolibarr is not a fixed ERP/CRM but a sum of several modules, all more or less independant. It's only after activating modules you're interesting in that you will see features appeared in menus. +SetupDescription5=Other menu entries manage optionnal parameters. EventsSetup=Setup for events logs LogEvents=Security audit events Audit=Audit diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang index ce5f3a1c3664bf4bafbadfc83a5b84f419e5acf1..9de3e0ac17cfce09b3312c505da20d0f0bef6d17 100644 --- a/htdocs/langs/en_US/install.lang +++ b/htdocs/langs/en_US/install.lang @@ -1,6 +1,6 @@ # Dolibarr language file - en_US - install CHARSET=UTF-8 -InstallEasy=We tried to make the Dolibarr setup as easy as possible. Just follow the instructions step by step. +InstallEasy=Just follow the instructions step by step. MiscellanousChecks=Prerequisites check DolibarrWelcome=Welcome to Dolibarr ConfFileExists=Configuration file <b>%s</b> exists. diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 69167d2ac1132e937ca6c18e08978b055984dcbf..da6b68a894ed58b0f258e5bcd61ea08d2fa572d9 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -647,8 +647,9 @@ DelaysOfToleranceMembers = Tolérance de retard avant alerte (en jours) sur coti DelaysOfToleranceChequesToDeposit = Tolérance de retard avant alerte (en jours) sur chèques à déposer SetupDescription1 = Toutes les options de l'espace configuration sont des options permettant de configurer Dolibarr avant de commencer son utilisation. SetupDescription2 = Les 2 étapes indispensables de configuration sont les 2 premières dans le menu gauche, à savoir, la configuration de la société/institution et la configuration des modules: -SetupDescription3 = La configuration <b>Société/institution</b> à gérer est requise car les informations saisies sont utilisées dans la plupart des écrans, en affichage, ou pour modifier le comportement de Dolibarr (comme par exemple des fonctions qui dépendent de votre pays). -SetupDescription4 = La configuration <b>Modules</b> est indispensable car Dolibarr n'est pas un ERP/CRM monolithique mais un ensemble de modules tous plus ou moins indépendant. C'est après avoir activé les modules qui vous intéressent que vous verrez apparaitre les fonctionnalités dans les menus de Dolibarr. +SetupDescription3 = Les données du menu <b>Configuration -> Société/institution</b> sont requises car les informations saisies sont utilisées dans la plupart des écrans, en affichage, ou pour modifier le comportement de Dolibarr (comme par exemple des fonctions qui dépendent de votre pays). +SetupDescription4 = Les données du menu <b>Configuration -> Modules</b> sont indispensables car Dolibarr ERP/CRM est constitué d'un ensemble de modules tous plus ou moins indépendant. C'est après avoir activé les modules qui vous intéressent que vous verrez apparaitre les fonctionnalités dans les menus. +SetupDescription5 = Les autres entrées de configuration gèrent des paramètres facultatifs. EventsSetup = Configuration du traçage des évenements LogEvents = Evènements d'audit de sécurité Audit = Audit diff --git a/htdocs/langs/fr_FR/install.lang b/htdocs/langs/fr_FR/install.lang index 7c1391596fc69844013321878e1c7af641d73b40..e95b8ea70d7b29f27fc438e59390cea385880c35 100644 --- a/htdocs/langs/fr_FR/install.lang +++ b/htdocs/langs/fr_FR/install.lang @@ -1,6 +1,6 @@ # Dolibarr language file - fr_FR - install CHARSET=UTF-8 -InstallEasy=Nous avons fait en sorte que l'installation soit le plus simple possible, vous n'avez qu'à suivre les étapes une à une. +InstallEasy=Veuillez suivre les étapes une à une. MiscellanousChecks=Vérification de prérequis DolibarrWelcome=Bienvenue sur Dolibarr ConfFileExists=Le fichier de configuration <b>%s</b> existe. diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 4de3eb60fa9e7f0f2ea75669d76b24e07f17a0bc..0159788e6053e66395cd53ae79f1b3978bee25d7 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -139,7 +139,7 @@ if ($conf->file->main_force_https) { $newurl=eregi_replace('^http:','https:',$_SERVER["SCRIPT_URI"]); - dol_syslog("dolibarr_main_force_https is on, we make a redirect to ".$newurl); + dol_syslog("main.inc: dolibarr_main_force_https is on, we make a redirect to ".$newurl); header("Location: ".$newurl); exit; } @@ -155,7 +155,7 @@ if ($conf->file->main_force_https) $newurl='https://'.$domaineport.$_SERVER["REQUEST_URI"]; //print 'eee'.$newurl; exit; - dol_syslog("dolibarr_main_force_https is on, we make a redirect to ".$newurl); + dol_syslog("main.inc: dolibarr_main_force_https is on, we make a redirect to ".$newurl); header("Location: ".$newurl); exit; } @@ -169,6 +169,27 @@ if (! defined('NOREQUIREHTML')) require_once(DOL_DOCUMENT_ROOT ."/html.form.clas if (! defined('NOREQUIREAJAX') && $conf->use_javascript_ajax) require_once(DOL_DOCUMENT_ROOT.'/lib/ajax.lib.php'); // Need 20ko memory //stopwithmem(); +// If install or upgrade process not done or not completely finished, we call the install page. +if (! empty($conf->global->MAIN_NOT_INSTALLED) || ! empty($conf->global->MAIN_NOT_UPGRADED)) +{ + dol_syslog("main.inc: A previous install or upgrade was not complete. Redirect to install page.", LOG_WARNING); + Header("Location: ".DOL_URL_ROOT."/install/index.php"); + exit; +} +// If an upgrade process is required, we call the install page. +if (! empty($conf->global->MAIN_VERSION_LAST_UPGRADE) && ($conf->global->MAIN_VERSION_LAST_UPGRADE != DOL_VERSION)) +{ + require_once(DOL_DOCUMENT_ROOT ."/lib/admin.lib.php"); + $dolibarrversionlastupgrade=split('[\.-]',$conf->global->MAIN_VERSION_LAST_UPGRADE); + $dolibarrversionprogram=split('[\.-]',DOL_VERSION); + if (versioncompare($dolibarrversionprogram,$dolibarrversionlastupgrade) > 0) // Programs have a version higher than database + { + dol_syslog("main.inc: database version ".$conf->global->MAIN_VERSION_LAST_UPGRADE." is lower than programs version ".DOL_VERSION.". Redirect to install page.", LOG_WARNING); + Header("Location: ".DOL_URL_ROOT."/install/index.php"); + exit; + } +} + // Creation d'un jeton contre les failles CSRF if (! defined('NOTOKENRENEWAL')) { @@ -599,12 +620,12 @@ if (sizeof($conf->need_smarty) > 0) // Tentative de hacking ? if (! $user->login) accessforbidden(); -// Verifie si user actif +// Check if user is active if ($user->statut < 1) { // Si non actif, on delogue le user $langs->load("other"); - dol_syslog ("Authentification ko car login desactive"); + dol_syslog ("Authentification ko as login is disbaled"); accessforbidden($langs->trans("ErrorLoginDisabled")); exit; } @@ -615,14 +636,6 @@ dol_syslog("Access to ".$_SERVER["PHP_SELF"],LOG_INFO); // For backward compatibility if (! defined('MAIN_INFO_SOCIETE_PAYS')) define('MAIN_INFO_SOCIETE_PAYS','1'); -// If install not finished, we start again. -if (defined("MAIN_NOT_INSTALLED")) -{ - Header("Location: ".DOL_URL_ROOT."/install/index.php"); - exit; -} - - // On charge les fichiers lang principaux $langs->load("main"); $langs->load("dict"); diff --git a/htdocs/support/default.css b/htdocs/support/default.css index acc7ed481c1492a3f31edac76600865cd284d766..9e34b137ac6cc08c73af7ba9d95515b91f01e27d 100644 --- a/htdocs/support/default.css +++ b/htdocs/support/default.css @@ -44,7 +44,6 @@ margin: 0em 0em 0em 0em; border: 1px solid #AAAAAA; } - div.soustitre { font-size: 15px; font-weight: bold; @@ -58,10 +57,10 @@ text-align: right; inputdisabled { - background: #FDFDFD; - border: 1px solid #ACBCBB; - padding: 0px 0px 0px 0px; - margin: 0px 0px 0px 0px; +background: #FDFDFD; +border: 1px solid #ACBCBB; +padding: 0px 0px 0px 0px; +margin: 0px 0px 0px 0px; } table.main { @@ -70,13 +69,6 @@ text-align: left; border: 1px solid #8CACBB; } -table.main-inside { -padding-left: 10px; -padding-right: 10px; -margin-bottom: 20px; -margin-top: 10px; -} - div.ok { color: #114466; } @@ -96,23 +88,6 @@ font.error { color: #550000; } -div.barrebottom { -text-align: right; -margin-top: 10px; -padding-top: 10px; -padding-bottom: 10px; -padding-right: 10px; -} - - -div.footer { -background-color: #dcdff4; -font-size: 10px; -border-top: solid black 1px; -padding-left: 5px; -text-align: center; -} - div.header { background-color: #dcdff4; border-bottom: solid black 1px; @@ -120,10 +95,6 @@ padding-left: 5px; text-align: center; } -div.footer p { -margin: 0px; -} - a:link,a:visited,a:active { color: #2266DD; text-decoration:none; @@ -138,12 +109,6 @@ text-decoration:none; } -div.comment { -text-decoration:none; -color:black; -font-size: 13px; -} - div.main-inside h2 { font-size:18px; font-weight: bold; @@ -188,4 +153,4 @@ background: #DDDFDD; } table { font-size: 12px; } -table.login { border: 1px solid #C0C0C0; background: #F0F0F0 url(background.png) repeat-x;font-size: 12px; } +table.login { border: 1px solid #C0C0C0; background: #F0F0F0 url(background.png) repeat-x; font-size: 12px; }