forked from Wavyzz/dolibarr
Fix: Error in GETPOST function
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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='')
|
||||
|
||||
@@ -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$
|
||||
*/
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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>';
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user