mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-11 12:01:23 +01:00
Fix: Supprime nombreux warnings
This commit is contained in:
@@ -99,10 +99,10 @@ class Conf
|
|||||||
$key=$objp->name;
|
$key=$objp->name;
|
||||||
$value=$objp->value; // Pas de stripslashes (ne s'applique pas sur lecture en base mais apr<70>s POST quand get_magic_quotes_gpc()==1)
|
$value=$objp->value; // Pas de stripslashes (ne s'applique pas sur lecture en base mais apr<70>s POST quand get_magic_quotes_gpc()==1)
|
||||||
if ($key)
|
if ($key)
|
||||||
{
|
{
|
||||||
define ("$key", $value);
|
if (! defined("$key")) define ("$key", $value); // In some cases, the constant might be already forced (Example: SYSLOG_FILE during install)
|
||||||
$this->global->$key=$value;
|
$this->global->$key=$value;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ define ("K_PATH_CACHE", $conf->fckeditor->dir_output);
|
|||||||
/**
|
/**
|
||||||
* url qui sera substituer par le K_PATH_CACHE lorsqu'une image sera int<6E>gr<67>e au pdf
|
* url qui sera substituer par le K_PATH_CACHE lorsqu'une image sera int<6E>gr<67>e au pdf
|
||||||
*/
|
*/
|
||||||
define ("K_PATH_URL_CACHE", $dolibarr_main_url_root."/document.php?modulepart=editor&file=");
|
if (defined('DOL_URL_ROOT')) define ("K_PATH_URL_CACHE", DOL_URL_ROOT."/document.php?modulepart=editor&file=");
|
||||||
|
|
||||||
if(!class_exists('FPDF'))
|
if(!class_exists('FPDF'))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2007 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
|
||||||
@@ -20,7 +20,6 @@
|
|||||||
* 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$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -433,31 +432,33 @@ class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Supprime les documents
|
\brief Supprime les documents
|
||||||
\return int Nombre d'erreurs (0 si ok)
|
\return int Nombre d'erreurs (0 si ok)
|
||||||
*/
|
*/
|
||||||
function delete_docs()
|
function delete_docs()
|
||||||
{
|
{
|
||||||
// Cr<43><72> les documents g<>n<EFBFBD>rables
|
$err=0;
|
||||||
if (is_array($this->docs))
|
|
||||||
{
|
// Cr<43><72> les documents g<>n<EFBFBD>rables
|
||||||
foreach ($this->docs as $key => $doc)
|
if (is_array($this->docs))
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_generator ";
|
foreach ($this->docs as $key => $doc)
|
||||||
$sql .= "WHERE name= '".addslashes($doc[0])."' AND classfile='".$doc[1]."'AND class='".$doc[2]."';";
|
{
|
||||||
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_generator ";
|
||||||
$result=$this->db->query($sql);
|
$sql .= "WHERE name= '".addslashes($doc[0])."' AND classfile='".$doc[1]."'AND class='".$doc[2]."';";
|
||||||
if (! $result)
|
|
||||||
{
|
$result=$this->db->query($sql);
|
||||||
dolibarr_syslog("DolibarrModules.class::delete_docs Error sql=".$sql." - ".$this->db->error());
|
if (! $result)
|
||||||
$err++;
|
{
|
||||||
}
|
dolibarr_syslog("DolibarrModules.class::delete_docs Error sql=".$sql." - ".$this->db->error());
|
||||||
|
$err++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return $err;
|
}
|
||||||
}
|
}
|
||||||
|
return $err;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
* 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$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade")
|
|||||||
|
|
||||||
// on d<>code le mot de passe de la base si besoin
|
// on d<>code le mot de passe de la base si besoin
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/lib/functions.inc.php");
|
require_once(DOL_DOCUMENT_ROOT ."/lib/functions.inc.php");
|
||||||
if ($dolibarr_main_db_encrypted_pass) $dolibarr_main_db_pass = dolibarr_decode($dolibarr_main_db_encrypted_pass);
|
if (isset($dolibarr_main_db_encrypted_pass) && $dolibarr_main_db_encrypted_pass) $dolibarr_main_db_pass = dolibarr_decode($dolibarr_main_db_encrypted_pass);
|
||||||
|
|
||||||
$conf->db->type = $dolibarr_main_db_type;
|
$conf->db->type = $dolibarr_main_db_type;
|
||||||
$conf->db->host = $dolibarr_main_db_host;
|
$conf->db->host = $dolibarr_main_db_host;
|
||||||
@@ -183,7 +183,7 @@ if ($_POST["action"] == "upgrade")
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '<a href="'.$dolibarr_main_url_root .'/admin/index.php?mainmenu=home&leftmenu=setup&username='.urlencode($_POST["login"]).'">';
|
print '<a href="'.$dolibarr_main_url_root .'/admin/index.php?mainmenu=home&leftmenu=setup'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">';
|
||||||
print $langs->trans("GoToSetupArea");
|
print $langs->trans("GoToSetupArea");
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
* 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$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \file htdocs/install/inc.php
|
/** \file htdocs/install/inc.php
|
||||||
@@ -30,6 +29,8 @@
|
|||||||
require_once('../translate.class.php');
|
require_once('../translate.class.php');
|
||||||
require_once('../lib/functions.inc.php');
|
require_once('../lib/functions.inc.php');
|
||||||
|
|
||||||
|
// DOL_DOCUMENT_ROOT has been defined in function.inc.php to '..'
|
||||||
|
|
||||||
// Correction PHP_SELF (ex pour apache via caudium) car PHP_SELF doit valoir URL relative
|
// Correction PHP_SELF (ex pour apache via caudium) car PHP_SELF doit valoir URL relative
|
||||||
// et non path absolu.
|
// et non path absolu.
|
||||||
if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
|
if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
|
||||||
@@ -61,18 +62,14 @@ if (file_exists($conffile))
|
|||||||
}
|
}
|
||||||
if (! isset($dolibarr_main_db_prefix) || ! $dolibarr_main_db_prefix) $dolibarr_main_db_prefix='llx_';
|
if (! isset($dolibarr_main_db_prefix) || ! $dolibarr_main_db_prefix) $dolibarr_main_db_prefix='llx_';
|
||||||
define('MAIN_DB_PREFIX',$dolibarr_main_db_prefix);
|
define('MAIN_DB_PREFIX',$dolibarr_main_db_prefix);
|
||||||
|
define('DOL_DATA_ROOT',$dolibarr_main_data_root);
|
||||||
|
|
||||||
define('DOL_DOCUMENT_ROOT','../');
|
|
||||||
|
|
||||||
|
|
||||||
// Forcage du log pour les install et mises a jour
|
// Forcage du log pour les install et mises a jour
|
||||||
$conf->syslog->enabled=1;
|
$conf->syslog->enabled=1;
|
||||||
$conf->global->SYSLOG_LEVEL=constant('LOG_DEBUG');
|
$conf->global->SYSLOG_LEVEL=constant('LOG_DEBUG');
|
||||||
if (is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log');
|
if (is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log');
|
||||||
else if ((isset($_ENV["TMP"]) && is_writable($_ENV["TMP"])) || (isset($_ENV["TEMP"]) && is_writable($_ENV["TEMP"]))) {
|
else if (isset($_ENV["TMP"]) && is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log');
|
||||||
define('SYSLOG_FILE',($_ENV["TMP"]?$_ENV["TMP"]:$_ENV["TEMP"]).'/dolibarr_install.log');
|
else if (isset($_ENV["TEMP"]) && is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log');
|
||||||
}
|
|
||||||
else define('SYSLOG_FILE','/dolibarr_install.log');
|
else define('SYSLOG_FILE','/dolibarr_install.log');
|
||||||
define('SYSLOG_FILE_NO_ERROR',1);
|
define('SYSLOG_FILE_NO_ERROR',1);
|
||||||
|
|
||||||
@@ -120,7 +117,7 @@ function conf($dolibarr_main_document_root)
|
|||||||
$conf->db->pass = trim($dolibarr_main_db_pass);
|
$conf->db->pass = trim($dolibarr_main_db_pass);
|
||||||
if (! isset($character_set_client) || ! $character_set_client) $character_set_client='ISO-8859-1';
|
if (! isset($character_set_client) || ! $character_set_client) $character_set_client='ISO-8859-1';
|
||||||
$conf->character_set_client=$character_set_client;
|
$conf->character_set_client=$character_set_client;
|
||||||
if (! isset($dolibarr_main_db_charset) && ! $dolibarr_main_db_charset) $dolibarr_main_db_charset='latin1';
|
if (! isset($dolibarr_main_db_charset) || ! $dolibarr_main_db_charset) $dolibarr_main_db_charset='latin1';
|
||||||
$conf->db->character_set=$dolibarr_main_db_charset;
|
$conf->db->character_set=$dolibarr_main_db_charset;
|
||||||
if (! isset($collation_connection) || ! $collation_connection) $collation_connection='latin1_swedish_ci';
|
if (! isset($collation_connection) || ! $collation_connection) $collation_connection='latin1_swedish_ci';
|
||||||
$conf->db->collation_connection=$collation_connection;
|
$conf->db->collation_connection=$collation_connection;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2007 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
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
* 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$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,8 +27,6 @@
|
|||||||
|
|
||||||
include_once("./inc.php");
|
include_once("./inc.php");
|
||||||
if (file_exists($conffile)) include_once($conffile);
|
if (file_exists($conffile)) include_once($conffile);
|
||||||
if (! isset($dolibarr_main_db_prefix) || ! $dolibarr_main_db_prefix) $dolibarr_main_db_prefix='llx_';
|
|
||||||
define('MAIN_DB_PREFIX',$dolibarr_main_db_prefix);
|
|
||||||
require_once($dolibarr_main_document_root . "/lib/databases/".$dolibarr_main_db_type.".lib.php");
|
require_once($dolibarr_main_document_root . "/lib/databases/".$dolibarr_main_db_type.".lib.php");
|
||||||
|
|
||||||
$grant_query='';
|
$grant_query='';
|
||||||
@@ -79,7 +76,7 @@ if (! isset($_GET["action"]) || $_GET["action"] == "upgrade")
|
|||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
// on d<>code le mot de passe de la base si besoin
|
// on d<>code le mot de passe de la base si besoin
|
||||||
if ($dolibarr_main_db_encrypted_pass) $dolibarr_main_db_pass = dolibarr_decode($dolibarr_main_db_encrypted_pass);
|
if (isset($dolibarr_main_db_encrypted_pass) && $dolibarr_main_db_encrypted_pass) $dolibarr_main_db_pass = dolibarr_decode($dolibarr_main_db_encrypted_pass);
|
||||||
|
|
||||||
// $conf is already instancied inside inc.php
|
// $conf is already instancied inside inc.php
|
||||||
$conf->db->type = $dolibarr_main_db_type;
|
$conf->db->type = $dolibarr_main_db_type;
|
||||||
@@ -133,7 +130,6 @@ if (! isset($_GET["action"]) || $_GET["action"] == "upgrade")
|
|||||||
|
|
||||||
// Force l'affichage de la progression
|
// Force l'affichage de la progression
|
||||||
print '<tr><td>'.$langs->trans("PleaseBePatient").'</td>';
|
print '<tr><td>'.$langs->trans("PleaseBePatient").'</td>';
|
||||||
ob_flush();
|
|
||||||
flush();
|
flush();
|
||||||
|
|
||||||
if ($ok)
|
if ($ok)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Marc Barilley / Oc<4F>bo <marc@ocebo.com>
|
/* Copyright (C) 2005 Marc Barilley / Oc<4F>bo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2007 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
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
* 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$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,8 +27,6 @@
|
|||||||
|
|
||||||
include_once('./inc.php');
|
include_once('./inc.php');
|
||||||
if (file_exists($conffile)) include_once($conffile);
|
if (file_exists($conffile)) include_once($conffile);
|
||||||
if (! isset($dolibarr_main_db_prefix) || ! $dolibarr_main_db_prefix) $dolibarr_main_db_prefix='llx_';
|
|
||||||
define('MAIN_DB_PREFIX',$dolibarr_main_db_prefix);
|
|
||||||
require_once($dolibarr_main_document_root . "/lib/databases/".$dolibarr_main_db_type.".lib.php");
|
require_once($dolibarr_main_document_root . "/lib/databases/".$dolibarr_main_db_type.".lib.php");
|
||||||
require_once($dolibarr_main_document_root . '/facture.class.php');
|
require_once($dolibarr_main_document_root . '/facture.class.php');
|
||||||
require_once($dolibarr_main_document_root . '/propal.class.php');
|
require_once($dolibarr_main_document_root . '/propal.class.php');
|
||||||
@@ -77,7 +74,7 @@ if (isset($_POST['action']) && $_POST['action'] == 'upgrade')
|
|||||||
print '<table cellspacing="0" cellpadding="1" border="0" width="100%">';
|
print '<table cellspacing="0" cellpadding="1" border="0" width="100%">';
|
||||||
|
|
||||||
// on d<>code le mot de passe de la base si besoin
|
// on d<>code le mot de passe de la base si besoin
|
||||||
if ($dolibarr_main_db_encrypted_pass) $dolibarr_main_db_pass = dolibarr_decode($dolibarr_main_db_encrypted_pass);
|
if (isset($dolibarr_main_db_encrypted_pass) && $dolibarr_main_db_encrypted_pass) $dolibarr_main_db_pass = dolibarr_decode($dolibarr_main_db_encrypted_pass);
|
||||||
|
|
||||||
// $conf is already instancied inside inc.php
|
// $conf is already instancied inside inc.php
|
||||||
$conf->db->type = $dolibarr_main_db_type;
|
$conf->db->type = $dolibarr_main_db_type;
|
||||||
@@ -106,7 +103,6 @@ if (isset($_POST['action']) && $_POST['action'] == 'upgrade')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Chargement config
|
// Chargement config
|
||||||
define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root);
|
|
||||||
$conf->setValues($db);
|
$conf->setValues($db);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Pour compatibilit<69> lors de l'upgrade
|
// Pour compatibilit<69> lors de l'upgrade
|
||||||
if (!defined('DOL_DOCUMENT_ROOT'))
|
if (! defined('DOL_DOCUMENT_ROOT'))
|
||||||
{
|
{
|
||||||
define('DOL_DOCUMENT_ROOT', '..');
|
define('DOL_DOCUMENT_ROOT', '..');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user