bug #33563 : error_reporting(-1)
This commit is contained in:
parent
6f27293a8b
commit
a17d7c7ee0
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/boxes.php
|
* \file htdocs/boxes.php
|
||||||
* \brief Fichier de la classe boxes
|
* \brief File of class to manage widget boxes
|
||||||
* \author Rodolphe Qiedeville
|
* \author Rodolphe Qiedeville
|
||||||
* \author Laurent Destailleur
|
* \author Laurent Destailleur
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
@ -228,7 +228,7 @@ class InfoBox
|
|||||||
}
|
}
|
||||||
|
|
||||||
include_once($sourcefile);
|
include_once($sourcefile);
|
||||||
$box=new $boxname($db,$obj->note);
|
$box=new $boxname($this->db,$obj->note);
|
||||||
|
|
||||||
$box->rowid=$obj->rowid;
|
$box->rowid=$obj->rowid;
|
||||||
$box->box_id=$obj->box_id;
|
$box->box_id=$obj->box_id;
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,7 +57,7 @@ class box_bookmarks extends ModeleBoxes {
|
|||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
$langs->load("boxes");
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->max=$max;
|
$this->max=$max;
|
||||||
|
|
||||||
$this->info_box_head = array('text' => $langs->trans("BoxMyLastBookmarks",$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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,7 @@ class box_external_rss extends ModeleBoxes {
|
|||||||
|
|
||||||
var $db;
|
var $db;
|
||||||
var $param;
|
var $param;
|
||||||
|
|
||||||
var $info_box_head = array();
|
var $info_box_head = array();
|
||||||
var $info_box_contents = array();
|
var $info_box_contents = array();
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ class box_external_rss extends ModeleBoxes {
|
|||||||
|
|
||||||
$this->db=$DB;
|
$this->db=$DB;
|
||||||
$this->param=$param;
|
$this->param=$param;
|
||||||
|
|
||||||
$this->boxlabel=$langs->trans("BoxLastRssInfos");
|
$this->boxlabel=$langs->trans("BoxLastRssInfos");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ class box_external_rss extends ModeleBoxes {
|
|||||||
$langs->load("boxes");
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->max=$max;
|
$this->max=$max;
|
||||||
|
|
||||||
// On recupere numero de param de la boite
|
// On recupere numero de param de la boite
|
||||||
preg_match('/^([0-9]+) /',$this->param,$reg);
|
preg_match('/^([0-9]+) /',$this->param,$reg);
|
||||||
$site=$reg[1];
|
$site=$reg[1];
|
||||||
@ -76,7 +76,7 @@ class box_external_rss extends ModeleBoxes {
|
|||||||
// documents/rss is created by module activation
|
// documents/rss is created by module activation
|
||||||
// documents/rss/tmp is created by magpie
|
// documents/rss/tmp is created by magpie
|
||||||
//$result=create_exdir($conf->externalrss->dir_temp);
|
//$result=create_exdir($conf->externalrss->dir_temp);
|
||||||
|
|
||||||
// Recupere flux RSS definie dans EXTERNAL_RSS_URLRSS_$site
|
// Recupere flux RSS definie dans EXTERNAL_RSS_URLRSS_$site
|
||||||
$url=@constant("EXTERNAL_RSS_URLRSS_".$site);
|
$url=@constant("EXTERNAL_RSS_URLRSS_".$site);
|
||||||
//define('MAGPIE_DEBUG',1);
|
//define('MAGPIE_DEBUG',1);
|
||||||
@ -87,7 +87,7 @@ class box_external_rss extends ModeleBoxes {
|
|||||||
dol_syslog("FETCH_RSS url=".$url);
|
dol_syslog("FETCH_RSS url=".$url);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// INFO sur le channel
|
// INFO sur le channel
|
||||||
$description=$rss->channel['tagline'];
|
$description=$rss->channel['tagline'];
|
||||||
$link=$rss->channel['link'];
|
$link=$rss->channel['link'];
|
||||||
@ -100,7 +100,7 @@ class box_external_rss extends ModeleBoxes {
|
|||||||
$this->info_box_head = array('text' => $title,'limit' => 0);
|
$this->info_box_head = array('text' => $title,'limit' => 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->info_box_head = array('text' => $title,
|
$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');
|
'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']
|
//$item['atom_content']
|
||||||
}
|
}
|
||||||
if (is_numeric($date)) $date=dol_print_date($date,"dayhour");
|
if (is_numeric($date)) $date=dol_print_date($date,"dayhour");
|
||||||
|
|
||||||
$isutf8 = utf8_check($title);
|
$isutf8 = utf8_check($title);
|
||||||
if (! $isutf8 && $conf->file->character_set_client == 'UTF-8') $title=utf8_encode($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);
|
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("/([[:alnum:]])\?([[:alnum:]])/","\\1'\\2",$title); // Gere probleme des apostrophes mal codee/decodee par utf8
|
||||||
$title=preg_replace("/^\s+/","",$title); // Supprime espaces de debut
|
$title=preg_replace("/^\s+/","",$title); // Supprime espaces de debut
|
||||||
@ -143,7 +143,7 @@ class box_external_rss extends ModeleBoxes {
|
|||||||
'logo' => $this->boximg,
|
'logo' => $this->boximg,
|
||||||
'url' => $href,
|
'url' => $href,
|
||||||
'target' => 'newrss');
|
'target' => 'newrss');
|
||||||
|
|
||||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||||
'text' => $title,
|
'text' => $title,
|
||||||
'url' => $href,
|
'url' => $href,
|
||||||
@ -154,9 +154,9 @@ class box_external_rss extends ModeleBoxes {
|
|||||||
'text' => $date);
|
'text' => $date);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function showBox()
|
|
||||||
|
function showBox($head = null, $contents = null)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -87,7 +87,7 @@ class box_produits extends ModeleBoxes {
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$datem=$db->jdate($obj->tms);
|
$datem=$db->jdate($objp->tms);
|
||||||
|
|
||||||
// Multilangs
|
// Multilangs
|
||||||
if ($conf->global->MAIN_MULTILANGS) // si l'option est active
|
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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -205,13 +205,13 @@ class ModeleBoxes
|
|||||||
if (! empty($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength'];
|
if (! empty($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength'];
|
||||||
|
|
||||||
if ($maxlength) $textewithnotags=dol_trunc($textewithnotags,$maxlength);
|
if ($maxlength) $textewithnotags=dol_trunc($textewithnotags,$maxlength);
|
||||||
if (preg_match('/^<img/i',$texte) || $contents[$i][$j]['asis']) print $texte; // show text with no html cleaning
|
if (preg_match('/^<img/i',$texte) || ! empty($contents[$i][$j]['asis'])) print $texte; // show text with no html cleaning
|
||||||
else print $textewithnotags; // show text with html cleaning
|
else print $textewithnotags; // show text with html cleaning
|
||||||
|
|
||||||
// End Url
|
// End Url
|
||||||
if (! empty($contents[$i][$j]['url'])) print '</a>';
|
if (! empty($contents[$i][$j]['url'])) print '</a>';
|
||||||
|
|
||||||
if (preg_match('/^<img/i',$texte2 || $contents[$i][$j]['asis2'])) print $texte2; // show text with no html cleaning
|
if (preg_match('/^<img/i',$texte2) || ! empty($contents[$i][$j]['asis2'])) print $texte2; // show text with no html cleaning
|
||||||
else print $texte2withnotags; // show text with html cleaning
|
else print $texte2withnotags; // show text with html cleaning
|
||||||
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user