Fix error on install
This commit is contained in:
parent
c3adbb11fe
commit
68d4f9c693
@ -73,7 +73,7 @@ if ($db->ok == 1)
|
|||||||
{
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<div class="error">'.$langs->trans("PasswordsMismatch").'</div>';
|
print '<div class="error">'.$langs->trans("PasswordsMismatch").'</div>';
|
||||||
$err=1;
|
$err=0; // We show button
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["error"]) && $_GET["error"] == 2)
|
if (isset($_GET["error"]) && $_GET["error"] == 2)
|
||||||
@ -82,14 +82,14 @@ if ($db->ok == 1)
|
|||||||
print '<div class="error">';
|
print '<div class="error">';
|
||||||
print $langs->trans("PleaseTypePassword");
|
print $langs->trans("PleaseTypePassword");
|
||||||
print '</div>';
|
print '</div>';
|
||||||
$err=1;
|
$err=0; // We show button
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["error"]) && $_GET["error"] == 3)
|
if (isset($_GET["error"]) && $_GET["error"] == 3)
|
||||||
{
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<div class="error">'.$langs->trans("PleaseTypeALogin").'</div>';
|
print '<div class="error">'.$langs->trans("PleaseTypeALogin").'</div>';
|
||||||
$err=1;
|
$err=0; // We show button
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* 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>
|
||||||
*
|
*
|
||||||
@ -56,7 +56,7 @@ dolibarr_install_syslog("Fileconf: Entering fileconf.php page");
|
|||||||
|
|
||||||
pHeader($langs->trans("ConfigurationFile"),"etape0");
|
pHeader($langs->trans("ConfigurationFile"),"etape0");
|
||||||
|
|
||||||
if ($force_install_message_doliwamp)
|
if (! empty($force_install_message_doliwamp))
|
||||||
{
|
{
|
||||||
print $langs->trans("KeepDefaultValues").'<br>';
|
print $langs->trans("KeepDefaultValues").'<br>';
|
||||||
}
|
}
|
||||||
@ -339,7 +339,7 @@ while (($file = readdir($handle))!==false)
|
|||||||
<?php echo $langs->trans("CreateUser"); ?>
|
<?php echo $langs->trans("CreateUser"); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="label" valign="top"><input type="checkbox" name="db_create_user"<?php if ($force_install_createuser) print ' checked="on"'; ?>></td>
|
<td class="label" valign="top"><input type="checkbox" name="db_create_user"<?php if (! empty($force_install_createuser)) print ' checked="on"'; ?>></td>
|
||||||
<td class="comment">
|
<td class="comment">
|
||||||
<?php echo $langs->trans("CheckToCreateUser"); ?>
|
<?php echo $langs->trans("CheckToCreateUser"); ?>
|
||||||
</td>
|
</td>
|
||||||
@ -379,6 +379,7 @@ while (($file = readdir($handle))!==false)
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
pFooter($err,$setuplang);
|
$db->close();
|
||||||
|
|
||||||
|
pFooter($err,$setuplang);
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -107,6 +107,7 @@ if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
|||||||
$includeconferror='ErrorBadFormatForConfFile';
|
$includeconferror='ErrorBadFormatForConfFile';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$conf->global->MAIN_LOGTOHTML=1;
|
||||||
|
|
||||||
|
|
||||||
// Define prefix
|
// Define prefix
|
||||||
@ -294,7 +295,7 @@ function pFooter($nonext=0,$setuplang='')
|
|||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
// If there is some logs in buffer to show
|
// If there is some logs in buffer to show
|
||||||
if (sizeof($conf->logbuffer))
|
if (isset($conf->logbuffer) && sizeof($conf->logbuffer))
|
||||||
{
|
{
|
||||||
print "\n";
|
print "\n";
|
||||||
print "<!-- Start of log output\n";
|
print "<!-- Start of log output\n";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -43,13 +43,14 @@ dolibarr_install_syslog("Licence: Entering licence.php page");
|
|||||||
|
|
||||||
pHeader($langs->trans("License"),"fileconf");
|
pHeader($langs->trans("License"),"fileconf");
|
||||||
|
|
||||||
|
|
||||||
//print '<pre style="align: center; font-size: 12px">';
|
//print '<pre style="align: center; font-size: 12px">';
|
||||||
$result=$langs->print_file("html/gpl.html",1);
|
$result=$langs->print_file("html/gpl.html",1);
|
||||||
if (! $result)
|
if (! $result)
|
||||||
{
|
{
|
||||||
print '<center>'."\n";
|
print '<center>'."\n";
|
||||||
print '<textarea readonly="1" rows="26" cols="80">';
|
print '<textarea readonly="1" rows="26" cols="80">';
|
||||||
$langs->print_file("html/gpl.txt",1);
|
$result=$langs->print_file("html/gpl.txt",1);
|
||||||
print '</textarea>';
|
print '</textarea>';
|
||||||
print '</center>'."\n";
|
print '</center>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -224,6 +224,7 @@ class DoliDb
|
|||||||
*/
|
*/
|
||||||
function close()
|
function close()
|
||||||
{
|
{
|
||||||
|
dolibarr_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||||
return mssql_close($this->db);
|
return mssql_close($this->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -269,6 +269,7 @@ class DoliDb
|
|||||||
*/
|
*/
|
||||||
function close()
|
function close()
|
||||||
{
|
{
|
||||||
|
dolibarr_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||||
return mysql_close($this->db);
|
return mysql_close($this->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -275,6 +275,7 @@ class DoliDb
|
|||||||
*/
|
*/
|
||||||
function close()
|
function close()
|
||||||
{
|
{
|
||||||
|
dolibarr_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||||
return mysqli_close($this->db);
|
return mysqli_close($this->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -412,7 +412,8 @@ class DoliDb
|
|||||||
*/
|
*/
|
||||||
function close()
|
function close()
|
||||||
{
|
{
|
||||||
return pg_close($this->db);
|
dolibarr_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||||
|
return pg_close($this->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -522,10 +522,12 @@ class Translate {
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Test si fichier dans repertoire de la langue
|
|
||||||
|
// Test if file is in lang directory
|
||||||
foreach($this->dir as $searchdir)
|
foreach($this->dir as $searchdir)
|
||||||
{
|
{
|
||||||
$htmlfile=($searchdir."/langs/".$this->defaultlang."/".$filename);
|
$htmlfile=($searchdir."/langs/".$this->defaultlang."/".$filename);
|
||||||
|
dolibarr_syslog('Translate::print_file search file '.$htmlfile, LOG_DEBUG);
|
||||||
if (is_readable($htmlfile))
|
if (is_readable($htmlfile))
|
||||||
{
|
{
|
||||||
$content=file_get_contents($htmlfile);
|
$content=file_get_contents($htmlfile);
|
||||||
@ -535,20 +537,24 @@ class Translate {
|
|||||||
else print $content;
|
else print $content;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else dolibarr_syslog('Translate::print_file not found', LOG_DEBUG);
|
||||||
|
|
||||||
if ($searchalt) {
|
if ($searchalt) {
|
||||||
// Test si fichier dans repertoire de la langue alternative
|
// Test si fichier dans repertoire de la langue alternative
|
||||||
if ($this->defaultlang != "en_US") $htmlfilealt = $searchdir."/en_US/".$filename;
|
if ($this->defaultlang != "en_US") $htmlfilealt = $searchdir."/langs/en_US/".$filename;
|
||||||
else $htmlfilealt = $searchdir."/langs/fr_FR/".$filename;
|
else $htmlfilealt = $searchdir."/langs/fr_FR/".$filename;
|
||||||
if (is_readable($htmlfilealt))
|
dolibarr_syslog('Translate::print_file search alt file '.$htmlfilealt, LOG_DEBUG);
|
||||||
|
//print 'getcwd='.getcwd().' htmlfilealt='.$htmlfilealt.' X '.file_exists(getcwd().'/'.$htmlfilealt);
|
||||||
|
if (is_readable($htmlfilealt))
|
||||||
{
|
{
|
||||||
$content=file_get_contents($htmlfile);
|
$content=file_get_contents($htmlfilealt);
|
||||||
$isutf8=utf8_check($content);
|
$isutf8=utf8_check($content);
|
||||||
if (! $isutf8 && $conf->character_set_client == 'UTF-8') print utf8_encode($content);
|
if (! $isutf8 && $conf->character_set_client == 'UTF-8') print utf8_encode($content);
|
||||||
elseif ($isutf8 && $conf->character_set_client == 'ISO-8859-1') print utf8_decode($content);
|
elseif ($isutf8 && $conf->character_set_client == 'ISO-8859-1') print utf8_decode($content);
|
||||||
else print $content;
|
else print $content;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else dolibarr_syslog('Translate::print_file not found', LOG_DEBUG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user