Fix migration of version that is not a final version

This commit is contained in:
Laurent Destailleur 2017-07-08 12:48:17 +02:00
parent a9468ad84a
commit 2ea7f38d38
6 changed files with 10 additions and 8 deletions

View File

@ -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();

View File

@ -62,7 +62,7 @@ pHeader('',''); // No next step for navigation buttons. Next step is defined
//print "<br>\n";
//print $langs->trans("InstallEasy")."<br><br>\n";
print '<h3>'.$langs->trans("MiscellaneousChecks").":</h3>\n";
print '<h3><img class="valigntextbottom" src="../theme/common/octicons/lib/svg/gear.svg" width="20" alt="Database"> '.$langs->trans("MiscellaneousChecks").":</h3>\n";
// Check browser
$useragent=$_SERVER['HTTP_USER_AGENT'];

View File

@ -69,7 +69,9 @@ if (! is_writable($conffile))
}
print '<br>'.$langs->trans("LastStepDesc").'<br><br>';
print '<h3><img class="valigntextbottom" src="../theme/common/octicons/lib/svg/key.svg" width="20" alt="Database"> '.$langs->trans("DolibarrAdminLogin").'</h3>';
print $langs->trans("LastStepDesc").'<br><br>';
print '<table cellspacing="0" cellpadding="2" width="100%">';
@ -78,7 +80,7 @@ $db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db-
if ($db->ok)
{
print '<tr><td>'.$langs->trans("DolibarrAdminLogin").' :</td><td>';
print '<tr><td>'.$langs->trans("Login").' :</td><td>';
print '<input name="login" type="text" value="' . (!empty($_GET["login"]) ? GETPOST("login") : (isset($force_install_dolibarrlogin) ? $force_install_dolibarrlogin : '')) . '"' . (@$force_install_noedit == 2 && $force_install_dolibarrlogin !== null ? ' disabled' : '') . '></td></tr>';
print '<tr><td>'.$langs->trans("Password").' :</td><td>';
print '<input type="password" name="pass"></td></tr>';

View File

@ -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
}
}

View File

@ -106,7 +106,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09
{
$actiondone=1;
print '<h3>'.$langs->trans("DatabaseMigration").'</h3>';
print '<h3><img class="valigntextbottom" src="../theme/common/octicons/lib/svg/database.svg" width="20" alt="Database"> '.$langs->trans("DatabaseMigration").'</h3>';
print '<table cellspacing="0" cellpadding="1" border="0" width="100%">';
$error=0;

View File

@ -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 '<h3>'.$langs->trans('DataMigration').'</h3>';
print '<h3><img class="valigntextbottom" src="../theme/common/octicons/lib/svg/database.svg" width="20" alt="Database"> '.$langs->trans('DataMigration').'</h3>';
print '<table cellspacing="0" cellpadding="1" border="0" width="100%">';