Put mails templates cache in spool/mails_c instead of spool/templates_c/mails because...
[platal.git] / plugins / function.select_db_table.php
index 4bb641c..5bc2bcb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
+ *  Copyright (C) 2003-2007 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -31,7 +31,6 @@ function select_options($table,$valeur,$champ="text",$pad=false,
     } 
     $sql = "SELECT $fields FROM $table AS t $join $where ORDER BY $order";
     $res = XDB::iterRow($sql);
-    echo $sql;
     $sel = ' selected="selected"';
 
     // on ajoute une entree vide si $pad est vrai
@@ -45,7 +44,7 @@ function select_options($table,$valeur,$champ="text",$pad=false,
             if (!is_null($optgrp)) {
                 $html .= '</optgroup>';
             }
-            $html .= '<optgroup label="' . addslashes(htmlentities($my_grp)) . '">';
+            $html .= '<optgroup label="' . htmlentities($my_grp, ENT_QUOTES) . '">';
             $optgrp = $my_grp;
         }
         $html .= sprintf("<option value=\"%s\" %s>%s</option>\n",