diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index fb826f9ccd6..4c506b9cfe5 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -1,7 +1,7 @@ +/* Copyright (C) 2003 Eric Seigne * Copyright (C) 2003,2005 Rodolphe Quiedeville - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * @@ -18,15 +18,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \file htdocs/admin/external_rss.php \ingroup external_rss \brief Page d'administration/configuration du module ExternalRss - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); @@ -70,8 +68,8 @@ if ($_POST["action"] == 'add' || $_POST["modify"]) if ($_POST["modify"]) { - // Supprime boite box_external_rss de d�finition des boites - $sql = "UPDATE ".MAIN_DB_PREFIX."boxes_def"; + // Supprime boite box_external_rss de definition des boites +/* $sql = "UPDATE ".MAIN_DB_PREFIX."boxes_def"; $sql.= " SET name = '".$boxlabel."'"; $sql.= " WHERE file ='box_external_rss.php' AND note like '".$_POST["norss"]." %'"; @@ -81,14 +79,16 @@ if ($_POST["action"] == 'add' || $_POST["modify"]) dolibarr_print_error($db,"sql=$sql"); exit; } +*/ } else { // Ajoute boite box_external_rss dans d�finition des boites - $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes_def (name, file, note)"; - $sql.= " VALUES ('".$boxlabel."','box_external_rss.php','".addslashes($_POST["norss"].' ('.$_POST[$external_rss_title]).")')"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes_def (file, note)"; + $sql.= " VALUES ('box_external_rss.php','".addslashes($_POST["norss"].' ('.$_POST[$external_rss_title]).")')"; if (! $db->query($sql)) { + dolibarr_print_error($db); $err++; } } @@ -166,6 +166,7 @@ if ($_POST["delete"]) $db->commit(); //$mesg='
'.$langs->trans("Success").'
'; header("Location: external_rss.php"); + exit; } else { @@ -220,9 +221,11 @@ print ''; query($sql); if ($resql) { @@ -248,7 +251,7 @@ if ($resql) print "
"; print ""; - print "Syndication du flux num�ro " . ($i+1) . ""; + print "".$langs->trans("RSS")." ".($i+1).""; print ""; $var=!$var; @@ -304,6 +307,10 @@ if ($resql) $i++; } } +else +{ + dolibarr_print_error($db); +} ?>