diff --git a/htdocs/install/check.php b/htdocs/install/check.php index e2b639916ab..af58799ad33 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -1,6 +1,7 @@ * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Océbo * * 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 @@ -44,7 +45,8 @@ pHeader($langs->trans("DolibarrWelcome"),""); // Etape suivante = license print $langs->trans("InstallEasy")."
"; // 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; include_once($conffile); @@ -57,7 +59,7 @@ else { // Si non on le crée $confexists=0; - $fp = @fopen("$conffile", "w"); + $fp = @fopen($conffile, "w"); if($fp) { @fwrite($fp, ' - * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2004 Sebastien DiCintio - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ - */ - -/** \file htdocs/install/inc.php - \brief Fichier include du programme d'installation - \version $Revision$ -*/ - - -$docurl = 'documentation'; -$conffile = "../conf/conf.php"; - - -// Defini objet langs -require_once('../translate.class.php'); -$langs = new Translate('../langs'); -$langs->setDefaultLang('auto'); -$langs->setPhpLang(); - - -$tab[0]=' class="bg1"'; -$tab[1]=' class="bg2"'; - -function pHeader($soutitre,$next,$action='set') -{ - global $langs; - $langs->load("main"); - $langs->load("admin"); - + + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2004 Sebastien DiCintio + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + */ +/** \file htdocs/install/inc.php + \brief Fichier include du programme d'installation + \version $Revision$ +*/ +$docurl = 'documentation'; +$conffile = "../conf/conf.php"; +// Defini objet langs +require_once('../translate.class.php'); +$langs = new Translate('../langs'); +$langs->setDefaultLang('auto'); +$langs->setPhpLang(); +$tab[0]=' class="bg1"'; +$tab[1]=' class="bg2"'; +function pHeader($soutitre,$next,$action='set') +{ + global $langs; + $langs->load("main"); + $langs->load("admin"); print ''."\n"; - print ''; - print ''; - print ''; - print ''; - print ''.$langs->trans("DolibarrSetup").''; - print ''; - print ''; - - print ''.$langs->trans("DolibarrSetup").''; - - print '
'; - print ''; - print '
'; - if ($soutitre) { - print '
'.$soutitre.'
'; - } - print '
'; -} - - -function pFooter($nonext=0,$setuplang='') -{ - global $langs; - $langs->load("main"); - $langs->load("admin"); - - print '
'; - if (! $nonext) - { - print '
">
'; - } - if ($setuplang) - { - print ''; - } - print '
'; - print ''; - print ''; -} - - -function dolibarr_syslog($message) -{ - // 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) - // 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(); - // } - } -} - -?> + print ''; + print ''; + print ''; + print ''; + print ''.$langs->trans("DolibarrSetup").''; + print ''; + print ''; + print ''.$langs->trans("DolibarrSetup").''; + print '
'; + print ''; + print '
'; + if ($soutitre) { + print '
'.$soutitre.'
'; + } + print '
'; +} +function pFooter($nonext=0,$setuplang='') +{ + global $langs; + $langs->load("main"); + $langs->load("admin"); + + print '
'; + if (! $nonext) + { + print '
">
'; + } + if ($setuplang) + { + print ''; + } + print '
'; + print ''; + print ''; +} +function dolibarr_syslog($message) +{ + // 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) + // 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(); + // } + } +} +?> \ No newline at end of file