diff --git a/htdocs/install/check.php b/htdocs/install/check.php index e583a448ef99d1b22a352bce7e0553fab8d1a17d..64a1ec52d05fddb408bc896927fefb11a4093ab7 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -22,7 +22,7 @@ /** * \file htdocs/install/check.php * \ingroup install - * \brief Test si le fichier conf est modifiable et si il n'existe pas, test la possibilite de le creer + * \brief Test if file conf can be modified and if does not exists, test if install process can create it * \version $Id$ */ include_once("./inc.php"); @@ -44,11 +44,14 @@ if (file_exists("./install.forced.php")) include_once("./install.forced.php"); dolibarr_install_syslog("Dolibarr install/upgrade process started"); + /* * View */ -pHeader('',""); // Etape suivante = license +pHeader('',''); // No next step for navigation buttons. Next step is defined by clik on links. + + print '<center>'; print '<img src="../theme/dolibarr_logo.png" alt="Dolibarr logo"><br>'; @@ -348,7 +351,8 @@ else print '<td align="center">'; if ($allowinstall) { - print '<a href="licence.php?selectlang='.$setuplang.'">'.$langs->trans("Start").'</a>'; + //print '<a href="licence.php?selectlang='.$setuplang.'">'.$langs->trans("Start").'</a>'; // To restore licence page + print '<a href="fileconf.php?selectlang='.$setuplang.'">'.$langs->trans("Start").'</a>'; } else { diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php index 695131db5650bafc1c86157b7d7a9c89674b79d6..833d754c6966155ea86f7ea3a78fb3417563bbe6 100644 --- a/htdocs/install/etape5.php +++ b/htdocs/install/etape5.php @@ -280,7 +280,7 @@ print "<br>"; // Create lock file // If first install -if ($_POST["action"] == "set") +if (GETPOST("action") == "set") { if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ($conf->global->MAIN_VERSION_LAST_UPGRADE == DOL_VERSION)) { @@ -330,7 +330,7 @@ if ($_POST["action"] == "set") } } // If upgrade -elseif (preg_match('/upgrade/i',$_POST["action"])) +elseif (preg_match('/upgrade/i',GETPOST("action"))) { if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ($conf->global->MAIN_VERSION_LAST_UPGRADE == DOL_VERSION)) { diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 264a896e33c77489c90e6a61a50d8902f99e6f8c..478cb5d157932eea2d7d21489ce9db4899f9a2d9 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -279,7 +279,7 @@ function conf($dolibarr_main_document_root) * * @param $soutitre * @param $next - * @param $action + * @param $action Action code ('set' or 'upgrade') * @param $param */ function pHeader($soutitre,$next,$action='set',$param='') diff --git a/htdocs/install/licence.php b/htdocs/install/licence.php index 407e08da415fd21371f42b9d2fc3dfa55268b94e..62a8c7653a3be14286662b36110e16adfe575027 100644 --- a/htdocs/install/licence.php +++ b/htdocs/install/licence.php @@ -20,7 +20,7 @@ /** * \file htdocs/install/licence.php * \ingroup install - * \brief Page affichage license + * \brief Page to show licence (Removed from install process to save time) * \version $Id$ */ diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 13393da8488e61cefdc6ba2a966810a7b7293842..18dfd3099bf896cf20626f190d0c89579b3955a5 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -72,7 +72,7 @@ pHeader('',"upgrade2",isset($_REQUEST['action'])?$_REQUEST['action']:'','version $actiondone=0; // Action to launch the repair or migrate script -if (! isset($_GET["action"]) || preg_match('/upgrade/i',$_GET["action"])) +if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) { $actiondone=1; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 6b13ca52dbe7009aea4d196543fe9b4acef68861..a00162acccff8ae1ba67bdb3ac58eea310e142d8 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -21,7 +21,7 @@ /** * \file htdocs/install/upgrade2.php - * \brief Effectue la migration de donnees diverses + * \brief Upgrade some data * \version $Id$ */ @@ -80,7 +80,7 @@ if (! is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initial pHeader('','etape5',GETPOST("action"),'versionfrom='.$versionfrom.'&versionto='.$versionto); -if (GETPOST('action') && preg_match('/upgrade/i',GETPOST("action"))) +if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) { print '<h3>'.$langs->trans('DataMigration').'</h3>'; @@ -3244,7 +3244,7 @@ function migrate_reload_modules($db,$langs,$conf) //$mod->remove('noboxes'); $mod->init(); } - + if (! empty($conf->global->MAIN_MODULE_USER)) // Permission has changed into 3.0 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module User"); diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 2fefe0eb1583ea94cbadfa6885c469689703377f..fd343f424762875a63d6284db5f22ef61d952cc6 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -46,19 +46,19 @@ if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/a */ function GETPOST($paramname,$check='',$method=0) { - if ($method=1) $out = isset($_GET[$paramname])?$_GET[$paramname]:''; - else if ($method=2) isset($_POST[$paramname])?$_POST[$paramname]:''; + if ($method==1) $out = isset($_GET[$paramname])?$_GET[$paramname]:''; + else if ($method==2) isset($_POST[$paramname])?$_POST[$paramname]:''; else $out = isset($_GET[$paramname])?$_GET[$paramname]:(isset($_POST[$paramname])?$_POST[$paramname]:''); - + // Clean value $out = trim($out); - + if (!empty($check)) { // Check if integer if ($check = 'int' && ! is_int($out)) $out=''; } - + return $out; }