Fix: le fichier de conf tait cras suite un test erron
This commit is contained in:
parent
cc0939ecde
commit
49dbabe689
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2005 Marc Barilley / Océbo <marc@ocebo.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -44,7 +45,8 @@ pHeader($langs->trans("DolibarrWelcome"),""); // Etape suivante = license
|
|||||||
print $langs->trans("InstallEasy")."<br>";
|
print $langs->trans("InstallEasy")."<br>";
|
||||||
|
|
||||||
// Si fichier présent et lisible et renseigné
|
// Si fichier présent et lisible et renseigné
|
||||||
if (is_readable($conffile) && sizeof($conffile) > 8)
|
clearstatcache();
|
||||||
|
if (is_readable($conffile) && filesize($conffile) > 8)
|
||||||
{
|
{
|
||||||
$confexists=1;
|
$confexists=1;
|
||||||
include_once($conffile);
|
include_once($conffile);
|
||||||
@ -57,7 +59,7 @@ else
|
|||||||
{
|
{
|
||||||
// Si non on le crée
|
// Si non on le crée
|
||||||
$confexists=0;
|
$confexists=0;
|
||||||
$fp = @fopen("$conffile", "w");
|
$fp = @fopen($conffile, "w");
|
||||||
if($fp)
|
if($fp)
|
||||||
{
|
{
|
||||||
@fwrite($fp, '<?php');
|
@fwrite($fp, '<?php');
|
||||||
|
|||||||
@ -1,107 +1,91 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Sebastien DiCintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien DiCintio <sdicintio@ressource-toi.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*/
|
*/
|
||||||
|
/** \file htdocs/install/inc.php
|
||||||
/** \file htdocs/install/inc.php
|
\brief Fichier include du programme d'installation
|
||||||
\brief Fichier include du programme d'installation
|
\version $Revision$
|
||||||
\version $Revision$
|
*/
|
||||||
*/
|
$docurl = '<a href="doc/dolibarr-install.html">documentation</a>';
|
||||||
|
$conffile = "../conf/conf.php";
|
||||||
|
// Defini objet langs
|
||||||
$docurl = '<a href="doc/dolibarr-install.html">documentation</a>';
|
require_once('../translate.class.php');
|
||||||
$conffile = "../conf/conf.php";
|
$langs = new Translate('../langs');
|
||||||
|
$langs->setDefaultLang('auto');
|
||||||
|
$langs->setPhpLang();
|
||||||
// Defini objet langs
|
$tab[0]=' class="bg1"';
|
||||||
require_once('../translate.class.php');
|
$tab[1]=' class="bg2"';
|
||||||
$langs = new Translate('../langs');
|
function pHeader($soutitre,$next,$action='set')
|
||||||
$langs->setDefaultLang('auto');
|
{
|
||||||
$langs->setPhpLang();
|
global $langs;
|
||||||
|
$langs->load("main");
|
||||||
|
$langs->load("admin");
|
||||||
$tab[0]=' class="bg1"';
|
|
||||||
$tab[1]=' class="bg2"';
|
|
||||||
|
|
||||||
function pHeader($soutitre,$next,$action='set')
|
|
||||||
{
|
|
||||||
global $langs;
|
|
||||||
$langs->load("main");
|
|
||||||
$langs->load("admin");
|
|
||||||
|
|
||||||
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'."\n";
|
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'."\n";
|
||||||
print '<html>';
|
print '<html>';
|
||||||
print '<head>';
|
print '<head>';
|
||||||
print '<meta http-equiv="content-type" content="text/html; charset='.$langs->trans("charset").'">';
|
print '<meta http-equiv="content-type" content="text/html; charset='.$langs->trans("charset").'">';
|
||||||
print '<link rel="stylesheet" type="text/css" href="./default.css">';
|
print '<link rel="stylesheet" type="text/css" href="./default.css">';
|
||||||
print '<title>'.$langs->trans("DolibarrSetup").'</title>';
|
print '<title>'.$langs->trans("DolibarrSetup").'</title>';
|
||||||
print '</head>';
|
print '</head>';
|
||||||
print '<body>';
|
print '<body>';
|
||||||
|
print '<span class="titre"><a class="titre" href="index.php">'.$langs->trans("DolibarrSetup").'</a></span>';
|
||||||
print '<span class="titre"><a class="titre" href="index.php">'.$langs->trans("DolibarrSetup").'</a></span>';
|
print '<form action="'.$next.'.php" method="POST">';
|
||||||
|
print '<input type="hidden" name="action" value="'.$action.'">';
|
||||||
print '<form action="'.$next.'.php" method="POST">';
|
print '<div class="main">';
|
||||||
print '<input type="hidden" name="action" value="'.$action.'">';
|
if ($soutitre) {
|
||||||
print '<div class="main">';
|
print '<div class="soustitre">'.$soutitre.'</div>';
|
||||||
if ($soutitre) {
|
}
|
||||||
print '<div class="soustitre">'.$soutitre.'</div>';
|
print '<div class="main-inside">';
|
||||||
}
|
}
|
||||||
print '<div class="main-inside">';
|
function pFooter($nonext=0,$setuplang='')
|
||||||
}
|
{
|
||||||
|
global $langs;
|
||||||
|
$langs->load("main");
|
||||||
function pFooter($nonext=0,$setuplang='')
|
$langs->load("admin");
|
||||||
{
|
|
||||||
global $langs;
|
print '</div></div>';
|
||||||
$langs->load("main");
|
if (! $nonext)
|
||||||
$langs->load("admin");
|
{
|
||||||
|
print '<div class="barrebottom"><input type="submit" value="'.$langs->trans("NextStep").' ->"></div>';
|
||||||
print '</div></div>';
|
}
|
||||||
if (! $nonext)
|
if ($setuplang)
|
||||||
{
|
{
|
||||||
print '<div class="barrebottom"><input type="submit" value="'.$langs->trans("NextStep").' ->"></div>';
|
print '<input type="hidden" name="selectlang" value="'.$setuplang.'">';
|
||||||
}
|
}
|
||||||
if ($setuplang)
|
print '</form>';
|
||||||
{
|
print '</body>';
|
||||||
print '<input type="hidden" name="selectlang" value="'.$setuplang.'">';
|
print '</html>';
|
||||||
}
|
}
|
||||||
print '</form>';
|
function dolibarr_syslog($message)
|
||||||
print '</body>';
|
{
|
||||||
print '</html>';
|
// Les fonctions syslog ne sont pas toujours installés ou autorisées chez les hébergeurs
|
||||||
}
|
if (function_exists("define_syslog_variables"))
|
||||||
|
{
|
||||||
|
// \todo Désactiver sous Windows (gros problème mémoire et faute de protections)
|
||||||
function dolibarr_syslog($message)
|
// if (1 == 2) {
|
||||||
{
|
define_syslog_variables();
|
||||||
// Les fonctions syslog ne sont pas toujours installés ou autorisées chez les hébergeurs
|
openlog("dolibarr", LOG_PID | LOG_PERROR, LOG_USER); # LOG_USER au lieu de LOG_LOCAL0 car non accepté par tous les php
|
||||||
if (function_exists("define_syslog_variables"))
|
syslog(LOG_WARNING, $message);
|
||||||
{
|
closelog();
|
||||||
// \todo Désactiver sous Windows (gros problème mémoire et faute de protections)
|
// }
|
||||||
// if (1 == 2) {
|
}
|
||||||
define_syslog_variables();
|
}
|
||||||
openlog("dolibarr", LOG_PID | LOG_PERROR, LOG_USER); # LOG_USER au lieu de LOG_LOCAL0 car non accepté par tous les php
|
?>
|
||||||
syslog(LOG_WARNING, $message);
|
|
||||||
closelog();
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
Loading…
Reference in New Issue
Block a user