NEW: Rename install etape to step

This commit is contained in:
Raphaël Doursenaud 2015-07-06 15:29:58 +02:00
parent 8eb4a208ce
commit 572ce7bcbb
9 changed files with 77 additions and 71 deletions

View File

@ -242,7 +242,7 @@ if ($upgrade) {
[ "versionfrom", $upgrade->{'version'} ],
[ "versionto", $ver ],
);
local $err = &call_dolibarr_wizard_page(\@params, "etape5", $d, $opts);
local $err = &call_dolibarr_wizard_page(\@params, "step5", $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Remove the installation directory.
@ -268,12 +268,12 @@ else {
[ "usealternaterootdir", "1" ],
[ "main_alt_dir_name", "custom" ],
);
local $err = &call_dolibarr_wizard_page(\@params, "etape1", $d, $opts);
local $err = &call_dolibarr_wizard_page(\@params, "step1", $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Second page (Populate database)
local @params = ( [ "action", "set" ] );
local $err = &call_dolibarr_wizard_page(\@params, "etape2", $d, $opts);
local $err = &call_dolibarr_wizard_page(\@params, "step2", $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Third page (Add administrator account)
@ -282,7 +282,7 @@ else {
[ "pass", $dompass ],
[ "pass_verif", $dompass ],
);
local $err = &call_dolibarr_wizard_page(\@params, "etape5", $d, $opts);
local $err = &call_dolibarr_wizard_page(\@params, "step5", $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Remove the installation directory and protect config file.

View File

@ -71,7 +71,7 @@ if (@file_exists($forcedfile)) {
session_start(); // To be able to keep info into session (used for not loosing pass during navigation. pass must not transit throug parmaeters)
pHeader($langs->trans("ConfigurationFile"),"etape1","set","",(empty($force_dolibarr_js_JQUERY)?'':$force_dolibarr_js_JQUERY.'/'));
pHeader($langs->trans("ConfigurationFile"),"step1","set","",(empty($force_dolibarr_js_JQUERY)?'':$force_dolibarr_js_JQUERY.'/'));
// Test if we can run a first install process
if (! is_writable($conffile))

View File

@ -29,7 +29,7 @@ require_once $dolibarr_main_document_root.'/core/class/extrafields.class.php';
require_once 'lib/repair.lib.php';
$grant_query='';
$etape = 2;
$step = 2;
$ok = 0;

View File

@ -4,6 +4,7 @@
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* 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
@ -20,7 +21,7 @@
*/
/**
* \file htdocs/install/etape1.php
* \file htdocs/install/step1.php
* \ingroup install
* \brief Build conf file on disk
*/
@ -64,7 +65,7 @@ $forcedfile="./install.forced.php";
if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php";
if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once $forcedfile; }
dolibarr_install_syslog("--- etape1: Entering etape1.php page");
dolibarr_install_syslog("--- step1: Entering step1.php page");
$error = 0;
@ -74,7 +75,7 @@ $error = 0;
*/
pHeader($langs->trans("ConfigurationFile"),"etape2");
pHeader($langs->trans("ConfigurationFile"),"step2");
// Test if we can run a first install process
if (! is_writable($conffile))
@ -299,7 +300,7 @@ if (! $error && $db->connected && $action == "set")
{
if (! is_dir($main_dir))
{
dolibarr_install_syslog("etape1: Repertoire '".$main_dir."' inexistant ou non accessible");
dolibarr_install_syslog("step1: Repertoire '".$main_dir."' inexistant ou non accessible");
print "<tr><td>";
print $langs->trans("ErrorDirDoesNotExists",$main_dir).'<br>';
@ -314,7 +315,7 @@ if (! $error && $db->connected && $action == "set")
if (! $error)
{
dolibarr_install_syslog("etape1: Directory '".$main_dir."' exists");
dolibarr_install_syslog("step1: Directory '".$main_dir."' exists");
}
@ -343,7 +344,7 @@ if (! $error && $db->connected && $action == "set")
$pathhtaccess=$main_data_dir.'/.htaccess';
if (! file_exists($pathhtaccess))
{
dolibarr_install_syslog("etape1: .htaccess file does not exists, we create it in '".$main_data_dir."'");
dolibarr_install_syslog("step1: .htaccess file does not exists, we create it in '".$main_data_dir."'");
$handlehtaccess=@fopen($pathhtaccess,'w');
if ($handlehtaccess)
{
@ -351,7 +352,7 @@ if (! $error && $db->connected && $action == "set")
fwrite($handlehtaccess,'Deny from all'."\n");
fclose($handlehtaccess);
dolibarr_install_syslog("etape1: .htaccess file created");
dolibarr_install_syslog("step1: .htaccess file created");
}
}
@ -372,7 +373,7 @@ if (! $error && $db->connected && $action == "set")
{
if (is_dir($dir[$i]))
{
dolibarr_install_syslog("etape1: Directory '".$dir[$i]."' exists");
dolibarr_install_syslog("step1: Directory '".$dir[$i]."' exists");
}
else
{
@ -387,7 +388,7 @@ if (! $error && $db->connected && $action == "set")
}
else
{
dolibarr_install_syslog("etape1: Directory '".$dir[$i]."' created");
dolibarr_install_syslog("step1: Directory '".$dir[$i]."' created");
}
}
}
@ -475,7 +476,7 @@ if (! $error && $db->connected && $action == "set")
// Si creation utilisateur admin demandee, on le cree
if (isset($_POST["db_create_user"]) && $_POST["db_create_user"] == "on")
{
dolibarr_install_syslog("etape1: Create database user: ".$dolibarr_main_db_user);
dolibarr_install_syslog("step1: Create database user: ".$dolibarr_main_db_user);
//print $conf->db->host." , ".$conf->db->name." , ".$conf->db->user." , ".$conf->db->port;
$databasefortest=$conf->db->name;
@ -523,7 +524,7 @@ if (! $error && $db->connected && $action == "set")
|| $db->errno() == 'DB_ERROR_KEY_NAME_ALREADY_EXISTS'
|| $db->errno() == 'DB_ERROR_USER_ALREADY_EXISTS')
{
dolibarr_install_syslog("etape1: User already exists");
dolibarr_install_syslog("step1: User already exists");
print '<tr><td>';
print $langs->trans("UserCreation").' : ';
print $dolibarr_main_db_user;
@ -532,7 +533,7 @@ if (! $error && $db->connected && $action == "set")
}
else
{
dolibarr_install_syslog("etape1: Failed to create user");
dolibarr_install_syslog("step1: Failed to create user");
print '<tr><td>';
print $langs->trans("UserCreation").' : ';
print $dolibarr_main_db_user;
@ -569,7 +570,7 @@ if (! $error && $db->connected && $action == "set")
// If database creation is asked, we create it
if (! $error && (isset($_POST["db_create_database"]) && $_POST["db_create_database"] == "on"))
{
dolibarr_install_syslog("etape1: Create database : ".$dolibarr_main_db_name." ".$dolibarr_main_db_character_set." ".$dolibarr_main_db_collation." ".$dolibarr_main_db_user, LOG_DEBUG);
dolibarr_install_syslog("step1: Create database : ".$dolibarr_main_db_name." ".$dolibarr_main_db_character_set." ".$dolibarr_main_db_collation." ".$dolibarr_main_db_user, LOG_DEBUG);
$newdb=getDoliDBInstance($conf->db->type,$conf->db->host,$userroot,$passroot,'',$conf->db->port);
//print 'eee'.$conf->db->type." ".$conf->db->host." ".$userroot." ".$passroot." ".$conf->db->port." ".$newdb->connected." ".$newdb->forcecharset;exit;
@ -587,11 +588,11 @@ if (! $error && $db->connected && $action == "set")
$check1=$newdb->getDefaultCharacterSetDatabase();
$check2=$newdb->getDefaultCollationDatabase();
dolibarr_install_syslog('etape1: Note that default server was charset='.$check1.' collation='.$check2, LOG_DEBUG);
dolibarr_install_syslog('step1: Note that default server was charset='.$check1.' collation='.$check2, LOG_DEBUG);
// If values differs, we save conf file again
//if ($check1 != $dolibarr_main_db_character_set) dolibarr_install_syslog('etape1: Value for character_set is not the one asked for database creation', LOG_WARNING);
//if ($check2 != $dolibarr_main_db_collation) dolibarr_install_syslog('etape1: Value for collation is not the one asked for database creation', LOG_WARNING);
//if ($check1 != $dolibarr_main_db_character_set) dolibarr_install_syslog('step1: Value for character_set is not the one asked for database creation', LOG_WARNING);
//if ($check2 != $dolibarr_main_db_collation) dolibarr_install_syslog('step1: Value for collation is not the one asked for database creation', LOG_WARNING);
}
else
{
@ -603,7 +604,7 @@ if (! $error && $db->connected && $action == "set")
print '<br>';
print '</td></tr>';
dolibarr_install_syslog('etape1: Failed to create database '.$dolibarr_main_db_name.' '.$newdb->lasterrno().' '.$newdb->lasterror(), LOG_ERR);
dolibarr_install_syslog('step1: Failed to create database '.$dolibarr_main_db_name.' '.$newdb->lasterrno().' '.$newdb->lasterror(), LOG_ERR);
$error++;
}
$newdb->close();
@ -632,14 +633,14 @@ if (! $error && $db->connected && $action == "set")
// We test access with dolibarr database user (not admin)
if (! $error)
{
dolibarr_install_syslog("etape1: connexion de type=".$conf->db->type." sur host=".$conf->db->host." port=".$conf->db->port." user=".$conf->db->user." name=".$conf->db->name, LOG_DEBUG);
dolibarr_install_syslog("step1: connexion de type=".$conf->db->type." sur host=".$conf->db->host." port=".$conf->db->port." user=".$conf->db->user." name=".$conf->db->name, LOG_DEBUG);
//print "connexion de type=".$conf->db->type." sur host=".$conf->db->host." port=".$conf->db->port." user=".$conf->db->user." name=".$conf->db->name;
$db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port);
if ($db->connected)
{
dolibarr_install_syslog("etape1: connexion to server by user ".$conf->db->user." is ok", LOG_DEBUG);
dolibarr_install_syslog("step1: connexion to server by user ".$conf->db->user." is ok", LOG_DEBUG);
print "<tr><td>";
print $langs->trans("ServerConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
print $dolibarr_main_db_host;
@ -650,7 +651,7 @@ if (! $error && $db->connected && $action == "set")
// si acces serveur ok et acces base ok, tout est ok, on ne va pas plus loin, on a meme pas utilise le compte root.
if ($db->database_selected)
{
dolibarr_install_syslog("etape1: connexion to database : ".$conf->db->name.", by user : ".$conf->db->user." is ok", LOG_DEBUG);
dolibarr_install_syslog("step1: connexion to database : ".$conf->db->name.", by user : ".$conf->db->user." is ok", LOG_DEBUG);
print "<tr><td>";
print $langs->trans("DatabaseConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
print $dolibarr_main_db_name;
@ -662,7 +663,7 @@ if (! $error && $db->connected && $action == "set")
}
else
{
dolibarr_install_syslog("etape1: connexion to database ".$conf->db->name.", by user : ".$conf->db->user." has failed", LOG_ERR);
dolibarr_install_syslog("step1: connexion to database ".$conf->db->name.", by user : ".$conf->db->user." has failed", LOG_ERR);
print "<tr><td>";
print $langs->trans("DatabaseConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
print $dolibarr_main_db_name;
@ -682,7 +683,7 @@ if (! $error && $db->connected && $action == "set")
}
else
{
dolibarr_install_syslog("etape1: la connexion au serveur par le user ".$conf->db->user." est rate");
dolibarr_install_syslog("step1: la connexion au serveur par le user ".$conf->db->user." est rate");
print "<tr><td>";
print $langs->trans("ServerConnection")." (".$langs->trans("User")." ".$conf->db->user.") : ";
print $dolibarr_main_db_host;
@ -723,7 +724,7 @@ function jsinfo()
<?php
dolibarr_install_syslog("--- install/etape1.php end", LOG_INFO);
dolibarr_install_syslog("--- install/step1.php end", LOG_INFO);
pFooter($error,$setuplang,'jsinfo',1);

View File

@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Cedric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2015 Cedric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* 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,8 +19,8 @@
*/
/**
* \file htdocs/install/etape2.php
* \ingroup install
* \file htdocs/install/step2.php
* \ingroup install
* \brief Create tables, primary keys, foreign keys, indexes and functions into database and then load reference data
*/
@ -27,7 +28,7 @@ include 'inc.php';
require_once $dolibarr_main_document_root.'/core/class/conf.class.php';
require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php';
$etape = 2;
$step = 2;
$ok = 0;
@ -54,7 +55,7 @@ if ($dolibarr_main_db_type == "mssql") $choix=3;
if ($dolibarr_main_db_type == "sqlite") $choix=4;
if ($dolibarr_main_db_type == "sqlite3") $choix=5;
//if (empty($choix)) dol_print_error('','Database type '.$dolibarr_main_db_type.' not supported into etape2.php page');
//if (empty($choix)) dol_print_error('','Database type '.$dolibarr_main_db_type.' not supported into step2.php page');
// Now we load forced value from install.forced.php file.
$useforcedwizard=false;
@ -62,14 +63,14 @@ $forcedfile="./install.forced.php";
if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php";
if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once $forcedfile; }
dolibarr_install_syslog("--- etape2: Entering etape2.php page");
dolibarr_install_syslog("--- step2: Entering step2.php page");
/*
* View
*/
pHeader($langs->trans("CreateDatabaseObjects"),"etape4");
pHeader($langs->trans("CreateDatabaseObjects"),"step4");
// Test if we can run a first install process
if (! is_writable($conffile))
@ -103,11 +104,11 @@ if ($action == "set")
{
if($db->database_selected)
{
dolibarr_install_syslog("etape2: Connexion successful to database : ".$conf->db->name);
dolibarr_install_syslog("step2: Connexion successful to database : ".$conf->db->name);
}
else
{
dolibarr_install_syslog("etape2: Connexion failed to database : ".$conf->db->name);
dolibarr_install_syslog("step2: Connexion failed to database : ".$conf->db->name);
print "<tr><td>Failed to select database ".$conf->db->name.'</td><td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
$ok = 0 ;
}
@ -131,7 +132,7 @@ if ($action == "set")
$requestnb=0;
// To disable some code, so you can call step2 with url like
// http://localhost/dolibarrnew/install/etape2.php?action=set&createtables=0&createkeys=0&createfunctions=0&createdata=llx_20_c_departements
// http://localhost/dolibarrnew/install/step2.php?action=set&createtables=0&createkeys=0&createfunctions=0&createdata=llx_20_c_departements
$createtables=isset($_GET['createtables'])?GETPOST('createtables'):1;
$createkeys=isset($_GET['createkeys'])?GETPOST('createkeys'):1;
$createfunctions=isset($_GET['createfunctions'])?GETPOST('createfunction'):1;
@ -613,7 +614,7 @@ else
print 'Parameter action=set not defined';
}
dolibarr_install_syslog("--- install/etape2.php end", LOG_INFO);
dolibarr_install_syslog("--- install/step2.php end", LOG_INFO);
pFooter(!$ok,$setuplang);

View File

@ -3,6 +3,7 @@
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Sebastien DiCintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* 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
@ -19,7 +20,7 @@
*/
/**
* \file htdocs/install/etape4.php
* \file htdocs/install/step4.php
* \ingroup install
* \brief Ask login and password of Dolibarr admin user
*/
@ -42,7 +43,7 @@ $forcedfile="./install.forced.php";
if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php";
if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once $forcedfile; }
dolibarr_install_syslog("--- etape4: Entering etape4.php page");
dolibarr_install_syslog("--- step4: Entering step4.php page");
$err=0;
$ok = 0;
@ -53,7 +54,7 @@ $ok = 0;
* View
*/
pHeader($langs->trans("AdminAccountCreation"),"etape5");
pHeader($langs->trans("AdminAccountCreation"),"step5");
// Test if we can run a first install process
if (! is_writable($conffile))
@ -106,7 +107,7 @@ if ($db->ok)
}
dolibarr_install_syslog("--- install/etape4.php end", LOG_INFO);
dolibarr_install_syslog("--- install/step4.php end", LOG_INFO);
pFooter($err,$setuplang);

View File

@ -1,9 +1,10 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Sebastien DiCintio <sdicintio@ressource-toi.org>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Sebastien DiCintio <sdicintio@ressource-toi.org>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* 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
@ -20,8 +21,8 @@
*/
/**
* \file htdocs/install/etape5.php
* \ingroup install
* \file htdocs/install/step5.php
* \ingroup install
* \brief Last page of upgrade or install process
*/
@ -68,7 +69,7 @@ $forcedfile="./install.forced.php";
if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php";
if (@file_exists($forcedfile)) { $useforcedwizard=true; include_once $forcedfile; }
dolibarr_install_syslog("--- etape5: Entering etape5.php page", LOG_INFO);
dolibarr_install_syslog("--- step5: Entering step5.php page", LOG_INFO);
/*
@ -80,19 +81,19 @@ if ($action == "set")
{
if ($_POST["pass"] <> $_POST["pass_verif"])
{
header("Location: etape4.php?error=1&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:''));
header("Location: step4.php?error=1&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:''));
exit;
}
if (dol_strlen(trim($_POST["pass"])) == 0)
{
header("Location: etape4.php?error=2&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:''));
header("Location: step4.php?error=2&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:''));
exit;
}
if (dol_strlen(trim($_POST["login"])) == 0)
{
header("Location: etape4.php?error=3&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:''));
header("Location: step4.php?error=3&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:''));
exit;
}
}
@ -102,7 +103,7 @@ if ($action == "set")
* View
*/
pHeader($langs->trans("SetupEnd"),"etape5");
pHeader($langs->trans("SetupEnd"),"step5");
print '<br>';
// Test if we can run a first install process
@ -153,7 +154,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
// Active module user
$modName='modUser';
$file = $modName . ".class.php";
dolibarr_install_syslog('install/etape5.php Load module user '.DOL_DOCUMENT_ROOT ."/core/modules/".$file, LOG_INFO);
dolibarr_install_syslog('install/step5.php Load module user '.DOL_DOCUMENT_ROOT ."/core/modules/".$file, LOG_INFO);
include_once DOL_DOCUMENT_ROOT ."/core/modules/".$file;
$objMod = new $modName($db);
$result=$objMod->init();
@ -188,13 +189,13 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
{
if ($newuser->error == 'ErrorLoginAlreadyExists')
{
dolibarr_install_syslog('install/etape5.php AdminLoginAlreadyExists', LOG_WARNING);
dolibarr_install_syslog('install/step5.php AdminLoginAlreadyExists', LOG_WARNING);
print '<br><div class="warning">'.$langs->trans("AdminLoginAlreadyExists",$_POST["login"])."</div><br>";
$success = 1;
}
else
{
dolibarr_install_syslog('install/etape5.php FailedToCreateAdminLogin '.$newuser->error, LOG_ERR);
dolibarr_install_syslog('install/step5.php FailedToCreateAdminLogin '.$newuser->error, LOG_ERR);
print '<br><div class="error">'.$langs->trans("FailedToCreateAdminLogin").' '.$newuser->error.'</div><br><br>';
}
}
@ -203,7 +204,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
{
$db->begin();
dolibarr_install_syslog('install/etape5.php set MAIN_VERSION_LAST_INSTALL const to '.$targetversion, LOG_DEBUG);
dolibarr_install_syslog('install/step5.php set MAIN_VERSION_LAST_INSTALL const to '.$targetversion, LOG_DEBUG);
$resql=$db->query("DELETE FROM ".MAIN_DB_PREFIX."const WHERE ".$db->decrypt('name')."='MAIN_VERSION_LAST_INSTALL'");
if (! $resql) dol_print_error($db,'Error in setup program');
$resql=$db->query("INSERT INTO ".MAIN_DB_PREFIX."const(name,value,type,visible,note,entity) values(".$db->encrypt('MAIN_VERSION_LAST_INSTALL',1).",".$db->encrypt($targetversion,1).",'chaine',0,'Dolibarr version when install',0)");
@ -212,7 +213,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
if ($useforcedwizard)
{
dolibarr_install_syslog('install/etape5.php set MAIN_REMOVE_INSTALL_WARNING const to 1', LOG_DEBUG);
dolibarr_install_syslog('install/step5.php set MAIN_REMOVE_INSTALL_WARNING const to 1', LOG_DEBUG);
$resql=$db->query("DELETE FROM ".MAIN_DB_PREFIX."const WHERE ".$db->decrypt('name')."='MAIN_REMOVE_INSTALL_WARNING'");
if (! $resql) dol_print_error($db,'Error in setup program');
$resql=$db->query("INSERT INTO ".MAIN_DB_PREFIX."const(name,value,type,visible,note,entity) values(".$db->encrypt('MAIN_REMOVE_INSTALL_WARNING',1).",".$db->encrypt(1,1).",'chaine',1,'Disable install warnings',0)");
@ -232,7 +233,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
print $langs->trans("ActivateModule",$modtoactivatenew).'<br>';
$file=$modtoactivatenew.'.class.php';
dolibarr_install_syslog('install/etape5.php Activate module file='.$file);
dolibarr_install_syslog('install/step5.php Activate module file='.$file);
$res=dol_include_once("/core/modules/".$file);
$res=activateModule($modtoactivatenew,1);
@ -240,7 +241,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
}
}
dolibarr_install_syslog('install/etape5.php Remove MAIN_NOT_INSTALLED const', LOG_DEBUG);
dolibarr_install_syslog('install/step5.php Remove MAIN_NOT_INSTALLED const', LOG_DEBUG);
$resql=$db->query("DELETE FROM ".MAIN_DB_PREFIX."const WHERE ".$db->decrypt('name')."='MAIN_NOT_INSTALLED'");
if (! $resql) dol_print_error($db,'Error in setup program');
@ -271,7 +272,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
if ($tagdatabase)
{
dolibarr_install_syslog('install/etape5.php set MAIN_VERSION_LAST_UPGRADE const to value '.$targetversion, LOG_DEBUG);
dolibarr_install_syslog('install/step5.php set MAIN_VERSION_LAST_UPGRADE const to value '.$targetversion, LOG_DEBUG);
$resql=$db->query("DELETE FROM ".MAIN_DB_PREFIX."const WHERE ".$db->decrypt('name')."='MAIN_VERSION_LAST_UPGRADE'");
if (! $resql) dol_print_error($db,'Error in setup program');
$resql=$db->query("INSERT INTO ".MAIN_DB_PREFIX."const(name,value,type,visible,note,entity) VALUES (".$db->encrypt('MAIN_VERSION_LAST_UPGRADE',1).",".$db->encrypt($targetversion,1).",'chaine',0,'Dolibarr version for last upgrade',0)");
@ -280,7 +281,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
}
else
{
dolibarr_install_syslog('install/etape5.php We run an upgrade to version '.$targetversion.' but database was already upgraded to '.$conf->global->MAIN_VERSION_LAST_UPGRADE.'. We keep MAIN_VERSION_LAST_UPGRADE as it is.', LOG_DEBUG);
dolibarr_install_syslog('install/step5.php We run an upgrade to version '.$targetversion.' but database was already upgraded to '.$conf->global->MAIN_VERSION_LAST_UPGRADE.'. We keep MAIN_VERSION_LAST_UPGRADE as it is.', LOG_DEBUG);
}
}
else
@ -290,7 +291,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
}
else
{
dol_print_error('','install/etape5.php Unknown choice of action');
dol_print_error('','install/step5.php Unknown choice of action');
}
// May fail if parameter already defined
@ -404,7 +405,7 @@ elseif (empty($action) || preg_match('/upgrade/i',$action))
}
else
{
dol_print_error('','install/etape5.php Unknown choice of action');
dol_print_error('','install/step5.php Unknown choice of action');
}
@ -413,6 +414,6 @@ else
clearstatcache();
dolibarr_install_syslog("--- install/etape5.php Dolibarr setup finished", LOG_INFO);
dolibarr_install_syslog("--- install/step5.php Dolibarr setup finished", LOG_INFO);
pFooter(1,$setuplang);

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* 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
@ -41,7 +42,7 @@ require_once $conffile; if (! isset($dolibarr_main_db_type)) $dolibarr_main_db_t
require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php';
$grant_query='';
$etape = 2;
$step = 2;
$ok = 0;

View File

@ -3,6 +3,7 @@
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* 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
@ -47,7 +48,7 @@ require_once $dolibarr_main_document_root . '/core/class/menubase.class.php';
require_once $dolibarr_main_document_root . '/core/lib/files.lib.php';
$grant_query='';
$etape = 2;
$step = 2;
$error = 0;
@ -98,7 +99,7 @@ if (! $versionfrom && ! $versionto)
exit;
}
pHeader('','etape5',GETPOST("action")?GETPOST("action"):'upgrade','versionfrom='.$versionfrom.'&versionto='.$versionto);
pHeader('','step5',GETPOST("action")?GETPOST("action"):'upgrade','versionfrom='.$versionfrom.'&versionto='.$versionto);
if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))