From 2ea7f38d38d9cf48b1e223320ff0b7011c9c9b26 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Jul 2017 12:48:17 +0200 Subject: [PATCH] Fix migration of version that is not a final version --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/install/check.php | 2 +- htdocs/install/step4.php | 6 ++++-- htdocs/install/step5.php | 4 ++-- htdocs/install/upgrade.php | 2 +- htdocs/install/upgrade2.php | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 54388fdd701..ce4f498869c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -429,7 +429,7 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL) break; case 'aZ09': $out=trim($out); - if (preg_match('/[^a-z0-9_\-]+/i',$out)) $out=''; + if (preg_match('/[^a-z0-9_\-\.]+/i',$out)) $out=''; break; case 'array': if (! is_array($out) || empty($out)) $out=array(); diff --git a/htdocs/install/check.php b/htdocs/install/check.php index bc7082b8d9d..1bcc6fadaff 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -62,7 +62,7 @@ pHeader('',''); // No next step for navigation buttons. Next step is defined //print "
\n"; //print $langs->trans("InstallEasy")."

\n"; -print '

'.$langs->trans("MiscellaneousChecks").":

\n"; +print '

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

\n"; // Check browser $useragent=$_SERVER['HTTP_USER_AGENT']; diff --git a/htdocs/install/step4.php b/htdocs/install/step4.php index 740a45a9063..54d985597bc 100644 --- a/htdocs/install/step4.php +++ b/htdocs/install/step4.php @@ -69,7 +69,9 @@ if (! is_writable($conffile)) } -print '
'.$langs->trans("LastStepDesc").'

'; +print '

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

'; + +print $langs->trans("LastStepDesc").'

'; print ''; @@ -78,7 +80,7 @@ $db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db- if ($db->ok) { - print ''; print ''; diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php index 28594c0e6c4..4afe2e4a722 100644 --- a/htdocs/install/step5.php +++ b/htdocs/install/step5.php @@ -47,8 +47,8 @@ if (! empty($action) && preg_match('/upgrade/i', $action)) // If it's an old upg $tmp=explode('_', $action, 2); if ($tmp[0]=='upgrade') { - //if (! empty($tmp[1])) $targetversion=$tmp[1]; - $targetversion=$versionto; + if (! empty($tmp[1])) $targetversion=$tmp[1]; // if $action = 'upgrade_6.0.0-beta', we use '6.0.0-beta' + else $targetversion=DOL_VERSION; // if $action = 'upgrade', we use DOL_VERSION } } diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index e7cb6f46d71..edd6463482f 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -106,7 +106,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 { $actiondone=1; - print '

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

'; + print '

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

'; print '
'.$langs->trans("DolibarrAdminLogin").' :'; + print '
'.$langs->trans("Login").' :'; print '
'.$langs->trans("Password").' :'; print '
'; $error=0; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 79b6df8d14f..2c032ffa7c0 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -106,7 +106,7 @@ pHeader('','step5',GETPOST('action','aZ09')?GETPOST('action','aZ09'):'upgrade',' if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09'))) { - print '

'.$langs->trans('DataMigration').'

'; + print '

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

'; print '
';