[SPIP][PLUGINS] v3.0-->v3.2
[lhc/web/www.git] / www / plugins-dist / sites / formulaires / editer_site_fonctions.php
index 0f995d8..95cb3e4 100644 (file)
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
 \***************************************************************************/
 
-if (!defined('_ECRIRE_INC_VERSION')) return;
+if (!defined('_ECRIRE_INC_VERSION')) {
+       return;
+}
 
-function saisie_url_syndic($url_syndic,$name='url_syndic',$id='url_syndic'){
+function saisie_url_syndic($url_syndic, $name = 'url_syndic', $id = 'url_syndic') {
        $res = "";
-       if (strlen($url_syndic) < 8) $url_syndic = "http://";
+       if (strlen($url_syndic) < 8) {
+               $url_syndic = "http://";
+       }
 
        // cas d'une liste de flux detectee par feedfinder : menu
        if (preg_match(',^select: (.+),', $url_syndic, $regs)) {
-               $feeds = explode(' ',$regs[1]);
+               $feeds = explode(' ', $regs[1]);
                $res .= "<select name='$name' id='$id'>\n";
                foreach ($feeds as $feed) {
-                       $res .= '<option value="'.entites_html($feed).'">'.$feed."</option>\n";
+                       $res .= '<option value="' . entites_html($feed) . '">' . $feed . "</option>\n";
                }
                $res .= "</select>\n";
        } else {
                $res .= "<input type='text' class='text' name='$name' id='$id' value=\"$url_syndic\" size='40' />\n";
        }
+
        return $res;
 }
-
-?>