From a17d7c7ee0b693126cf0c03c8e7ccb27f74d9ac6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Jun 2011 19:14:47 +0000 Subject: [PATCH] bug #33563 : error_reporting(-1) --- htdocs/boxes.php | 6 ++--- htdocs/includes/boxes/box_actions.php | 2 +- htdocs/includes/boxes/box_bookmarks.php | 4 ++-- htdocs/includes/boxes/box_clients.php | 2 +- htdocs/includes/boxes/box_commandes.php | 2 +- htdocs/includes/boxes/box_comptes.php | 2 +- htdocs/includes/boxes/box_contacts.php | 2 +- htdocs/includes/boxes/box_contracts.php | 2 +- htdocs/includes/boxes/box_external_rss.php | 24 +++++++++---------- htdocs/includes/boxes/box_factures.php | 2 +- htdocs/includes/boxes/box_factures_fourn.php | 2 +- .../includes/boxes/box_factures_fourn_imp.php | 2 +- htdocs/includes/boxes/box_factures_imp.php | 2 +- htdocs/includes/boxes/box_fournisseurs.php | 2 +- htdocs/includes/boxes/box_members.php | 2 +- htdocs/includes/boxes/box_osc_client.php | 2 +- htdocs/includes/boxes/box_produits.php | 4 ++-- htdocs/includes/boxes/box_propales.php | 2 +- htdocs/includes/boxes/box_prospect.php | 2 +- htdocs/includes/boxes/box_services_vendus.php | 2 +- htdocs/includes/boxes/modules_boxes.php | 4 ++-- 21 files changed, 37 insertions(+), 37 deletions(-) diff --git a/htdocs/boxes.php b/htdocs/boxes.php index f3d21f9cca5..06e6540e225 100644 --- a/htdocs/boxes.php +++ b/htdocs/boxes.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -20,7 +20,7 @@ /** * \file htdocs/boxes.php - * \brief Fichier de la classe boxes + * \brief File of class to manage widget boxes * \author Rodolphe Qiedeville * \author Laurent Destailleur * \version $Id$ @@ -228,7 +228,7 @@ class InfoBox } include_once($sourcefile); - $box=new $boxname($db,$obj->note); + $box=new $boxname($this->db,$obj->note); $box->rowid=$obj->rowid; $box->box_id=$obj->box_id; diff --git a/htdocs/includes/boxes/box_actions.php b/htdocs/includes/boxes/box_actions.php index c5e0aee9f38..9d7686a0ff9 100644 --- a/htdocs/includes/boxes/box_actions.php +++ b/htdocs/includes/boxes/box_actions.php @@ -148,7 +148,7 @@ class box_actions extends ModeleBoxes { } } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_bookmarks.php b/htdocs/includes/boxes/box_bookmarks.php index 7af49d9fe5a..17e823e6dd1 100644 --- a/htdocs/includes/boxes/box_bookmarks.php +++ b/htdocs/includes/boxes/box_bookmarks.php @@ -57,7 +57,7 @@ class box_bookmarks extends ModeleBoxes { { global $user, $langs, $db; $langs->load("boxes"); - + $this->max=$max; $this->info_box_head = array('text' => $langs->trans("BoxMyLastBookmarks",$max), @@ -123,7 +123,7 @@ class box_bookmarks extends ModeleBoxes { } } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_clients.php b/htdocs/includes/boxes/box_clients.php index 2786c3ff3c4..21da64ebff1 100644 --- a/htdocs/includes/boxes/box_clients.php +++ b/htdocs/includes/boxes/box_clients.php @@ -127,7 +127,7 @@ class box_clients extends ModeleBoxes { } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_commandes.php b/htdocs/includes/boxes/box_commandes.php index 1f3c36f5064..895bf51c96c 100644 --- a/htdocs/includes/boxes/box_commandes.php +++ b/htdocs/includes/boxes/box_commandes.php @@ -136,7 +136,7 @@ class box_commandes extends ModeleBoxes { } } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_comptes.php b/htdocs/includes/boxes/box_comptes.php index 14c92c18019..8f4638748e8 100644 --- a/htdocs/includes/boxes/box_comptes.php +++ b/htdocs/includes/boxes/box_comptes.php @@ -148,7 +148,7 @@ class box_comptes extends ModeleBoxes { } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_contacts.php b/htdocs/includes/boxes/box_contacts.php index 8d91a842acb..bc2a072ee1d 100755 --- a/htdocs/includes/boxes/box_contacts.php +++ b/htdocs/includes/boxes/box_contacts.php @@ -125,7 +125,7 @@ class box_contacts extends ModeleBoxes { } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_contracts.php b/htdocs/includes/boxes/box_contracts.php index ccb14f2faa5..8f92bac5704 100644 --- a/htdocs/includes/boxes/box_contracts.php +++ b/htdocs/includes/boxes/box_contracts.php @@ -145,7 +145,7 @@ class box_contracts extends ModeleBoxes { } } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_external_rss.php b/htdocs/includes/boxes/box_external_rss.php index 483bc6b5f4e..b41c4b8ec3d 100644 --- a/htdocs/includes/boxes/box_external_rss.php +++ b/htdocs/includes/boxes/box_external_rss.php @@ -39,7 +39,7 @@ class box_external_rss extends ModeleBoxes { var $db; var $param; - + var $info_box_head = array(); var $info_box_contents = array(); @@ -53,7 +53,7 @@ class box_external_rss extends ModeleBoxes { $this->db=$DB; $this->param=$param; - + $this->boxlabel=$langs->trans("BoxLastRssInfos"); } @@ -67,7 +67,7 @@ class box_external_rss extends ModeleBoxes { $langs->load("boxes"); $this->max=$max; - + // On recupere numero de param de la boite preg_match('/^([0-9]+) /',$this->param,$reg); $site=$reg[1]; @@ -76,7 +76,7 @@ class box_external_rss extends ModeleBoxes { // documents/rss is created by module activation // documents/rss/tmp is created by magpie //$result=create_exdir($conf->externalrss->dir_temp); - + // Recupere flux RSS definie dans EXTERNAL_RSS_URLRSS_$site $url=@constant("EXTERNAL_RSS_URLRSS_".$site); //define('MAGPIE_DEBUG',1); @@ -87,7 +87,7 @@ class box_external_rss extends ModeleBoxes { dol_syslog("FETCH_RSS url=".$url); return -1; } - + // INFO sur le channel $description=$rss->channel['tagline']; $link=$rss->channel['link']; @@ -100,7 +100,7 @@ class box_external_rss extends ModeleBoxes { $this->info_box_head = array('text' => $title,'limit' => 0); } else - { + { $this->info_box_head = array('text' => $title, 'sublink' => $link, 'subtext'=>$langs->trans("LastRefreshDate").': '.(isset($rss->date)?dol_print_date($rss->date,"dayhourtext"):$langs->trans("Unknown")), 'subpicto'=>'object_bookmark'); } @@ -130,10 +130,10 @@ class box_external_rss extends ModeleBoxes { //$item['atom_content'] } if (is_numeric($date)) $date=dol_print_date($date,"dayhour"); - + $isutf8 = utf8_check($title); - if (! $isutf8 && $conf->file->character_set_client == 'UTF-8') $title=utf8_encode($title); - elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') $title=utf8_decode($title); + if (! $isutf8 && $conf->file->character_set_client == 'UTF-8') $title=utf8_encode($title); + elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') $title=utf8_decode($title); $title=preg_replace("/([[:alnum:]])\?([[:alnum:]])/","\\1'\\2",$title); // Gere probleme des apostrophes mal codee/decodee par utf8 $title=preg_replace("/^\s+/","",$title); // Supprime espaces de debut @@ -143,7 +143,7 @@ class box_external_rss extends ModeleBoxes { 'logo' => $this->boximg, 'url' => $href, 'target' => 'newrss'); - + $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $title, 'url' => $href, @@ -154,9 +154,9 @@ class box_external_rss extends ModeleBoxes { 'text' => $date); } } - - function showBox() + + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_factures.php b/htdocs/includes/boxes/box_factures.php index 3644c72b7ae..7adc61d5729 100644 --- a/htdocs/includes/boxes/box_factures.php +++ b/htdocs/includes/boxes/box_factures.php @@ -151,7 +151,7 @@ class box_factures extends ModeleBoxes { } } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_factures_fourn.php b/htdocs/includes/boxes/box_factures_fourn.php index 480f843dbbc..2fe7ba95c0b 100644 --- a/htdocs/includes/boxes/box_factures_fourn.php +++ b/htdocs/includes/boxes/box_factures_fourn.php @@ -145,7 +145,7 @@ class box_factures_fourn extends ModeleBoxes { } } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_factures_fourn_imp.php b/htdocs/includes/boxes/box_factures_fourn_imp.php index bd2dd3636a5..2482944c9fa 100644 --- a/htdocs/includes/boxes/box_factures_fourn_imp.php +++ b/htdocs/includes/boxes/box_factures_fourn_imp.php @@ -145,7 +145,7 @@ class box_factures_fourn_imp extends ModeleBoxes { } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_factures_imp.php b/htdocs/includes/boxes/box_factures_imp.php index e4a903689d5..f4a1818e45d 100644 --- a/htdocs/includes/boxes/box_factures_imp.php +++ b/htdocs/includes/boxes/box_factures_imp.php @@ -147,7 +147,7 @@ class box_factures_imp extends ModeleBoxes { } } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_fournisseurs.php b/htdocs/includes/boxes/box_fournisseurs.php index aaffc5da19b..7dda9b9f14d 100644 --- a/htdocs/includes/boxes/box_fournisseurs.php +++ b/htdocs/includes/boxes/box_fournisseurs.php @@ -122,7 +122,7 @@ class box_fournisseurs extends ModeleBoxes { } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_members.php b/htdocs/includes/boxes/box_members.php index 5eafd54e4b6..7d0c80c916b 100755 --- a/htdocs/includes/boxes/box_members.php +++ b/htdocs/includes/boxes/box_members.php @@ -123,7 +123,7 @@ class box_members extends ModeleBoxes { } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_osc_client.php b/htdocs/includes/boxes/box_osc_client.php index e801f0a21b8..60e210697c3 100644 --- a/htdocs/includes/boxes/box_osc_client.php +++ b/htdocs/includes/boxes/box_osc_client.php @@ -99,7 +99,7 @@ class box_osc_clients extends ModeleBoxes { } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_produits.php b/htdocs/includes/boxes/box_produits.php index 6228576869b..560053eb8f1 100644 --- a/htdocs/includes/boxes/box_produits.php +++ b/htdocs/includes/boxes/box_produits.php @@ -87,7 +87,7 @@ class box_produits extends ModeleBoxes { while ($i < $num) { $objp = $db->fetch_object($result); - $datem=$db->jdate($obj->tms); + $datem=$db->jdate($objp->tms); // Multilangs if ($conf->global->MAIN_MULTILANGS) // si l'option est active @@ -156,7 +156,7 @@ class box_produits extends ModeleBoxes { } } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_propales.php b/htdocs/includes/boxes/box_propales.php index c26532e661f..12c8f7580e6 100644 --- a/htdocs/includes/boxes/box_propales.php +++ b/htdocs/includes/boxes/box_propales.php @@ -141,7 +141,7 @@ class box_propales extends ModeleBoxes { } } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_prospect.php b/htdocs/includes/boxes/box_prospect.php index bb51806e20a..a3fcd9847fa 100644 --- a/htdocs/includes/boxes/box_prospect.php +++ b/htdocs/includes/boxes/box_prospect.php @@ -134,7 +134,7 @@ class box_prospect extends ModeleBoxes { } } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/box_services_vendus.php b/htdocs/includes/boxes/box_services_vendus.php index fde238eac4d..34e35392858 100644 --- a/htdocs/includes/boxes/box_services_vendus.php +++ b/htdocs/includes/boxes/box_services_vendus.php @@ -161,7 +161,7 @@ class box_services_vendus extends ModeleBoxes { } - function showBox() + function showBox($head = null, $contents = null) { parent::showBox($this->info_box_head, $this->info_box_contents); } diff --git a/htdocs/includes/boxes/modules_boxes.php b/htdocs/includes/boxes/modules_boxes.php index 1001332647d..549bd76f181 100644 --- a/htdocs/includes/boxes/modules_boxes.php +++ b/htdocs/includes/boxes/modules_boxes.php @@ -205,13 +205,13 @@ class ModeleBoxes if (! empty($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength']; if ($maxlength) $textewithnotags=dol_trunc($textewithnotags,$maxlength); - if (preg_match('/^'; - if (preg_match('/^";