2
0
forked from Wavyzz/dolibarr

Fix: Supprime nombreux warnings

This commit is contained in:
Laurent Destailleur
2007-10-29 12:54:25 +00:00
parent a76c63e096
commit 8ef2bb9f0b
4 changed files with 7 additions and 15 deletions

View File

@@ -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$
*/ */
/** /**
@@ -105,8 +104,8 @@ if ($_POST["action"] == "set")
fputs($fp, '<?php'); fputs($fp, '<?php');
fputs($fp,"\n"); fputs($fp,"\n");
fputs($fp,"#\n"); fputs($fp,"#\n");
fputs($fp,"# File generated by Dolibarr installer on ".dolibarr_print_date(gmmktime(),'dayhour')); fputs($fp,"# File generated by Dolibarr installer on ".dolibarr_print_date(gmmktime(),''));
if ($_ENV["TZ"]) fputs($fp," (TZ=".$_ENV["TZ"].")"); if (isset($_ENV["TZ"])) fputs($fp," (TZ=".$_ENV["TZ"].")");
fputs($fp,"\n"); fputs($fp,"\n");
fputs($fp,"#\n"); fputs($fp,"#\n");
fputs($fp,"# Take a look at conf.php.example file for an example of conf.php file\n"); fputs($fp,"# Take a look at conf.php.example file for an example of conf.php file\n");

View File

@@ -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$
*/ */
/** /**
@@ -27,8 +26,6 @@
*/ */
include("./inc.php"); include("./inc.php");
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 . "/conf/conf.class.php"); require_once($dolibarr_main_document_root . "/conf/conf.class.php");

View File

@@ -2,7 +2,7 @@
/* 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>
* Copyright (C) 2004-2005 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
@@ -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$
*/ */
/** /**
@@ -30,8 +29,6 @@
include_once("./inc.php"); include_once("./inc.php");
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 . "/conf/conf.class.php"); require_once($dolibarr_main_document_root . "/conf/conf.class.php");

View File

@@ -520,8 +520,8 @@ function dolibarr_print_date($time,$format='')
{ {
global $conf; global $conf;
// Si format non d<>fini, on prend $conf->format_date_text_short // Si format non d<>fini, on prend $conf->format_date_text_short sinon %Y-%m-%d %H:%M:%S
if (! $format) $format=$conf->format_date_text_short; if (! $format) $format=(isset($conf->format_date_text_short) ? $conf->format_date_text_short : '%Y-%m-%d %H:%M:%S');
if ($format == 'day') $format=$conf->format_date_short; if ($format == 'day') $format=$conf->format_date_short;
if ($format == 'hour') $format=$conf->format_hour_short; if ($format == 'hour') $format=$conf->format_hour_short;
@@ -529,10 +529,9 @@ function dolibarr_print_date($time,$format='')
if ($format == 'dayhour') $format=$conf->format_date_hour_short; if ($format == 'dayhour') $format=$conf->format_date_hour_short;
if ($format == 'dayhourtext') $format=$conf->format_date_hour_text_short; if ($format == 'dayhourtext') $format=$conf->format_date_hour_text_short;
if ($format == 'dayhourldap') $format='%Y%m%d%H%M%SZ'; if ($format == 'dayhourldap') $format='%Y%m%d%H%M%SZ';
if (! $format) $format='%Y-%m-%d %H:%M:%S';
// Si date non d<>finie, on renvoie '' // Si date non d<>finie, on renvoie ''
if ($time == "") return ''; // $time=0 permis car signifie 01/01/1970 00:00:00 if ($time == '') return ''; // $time=0 permis car signifie 01/01/1970 00:00:00
// Analyse de la date // Analyse de la date
if (eregi('^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?',$time,$reg)) if (eregi('^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?',$time,$reg))