2010.
[platal.git] / plugins / function.select_db_table.php
index edea562..94379a9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -19,8 +19,6 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once 'platal.inc.php';
-
 function select_options($table,$valeur,$champ="text",$pad=false,
                         $where="",$join="",$group="")
 {
@@ -49,7 +47,7 @@ function select_options($table,$valeur,$champ="text",$pad=false,
             $optgrp = $my_grp;
         }
         $html .= sprintf("<option value=\"%s\" %s>%s</option>\n",
-                         $my_id, ($valeur==$my_id?$sel:""), $my_text);
+                         $my_id, $valeur==$my_id ? $sel : "", pl_entities($my_text));
     }
     if (!is_null($optgrp)) {
         $html .= '</optgroup>';