[SPIP] ~v3.0.17-->v3.0.19
[ptitvelo/web/www.git] / www / plugins-dist / vertebres / public / vertebrer.php
old mode 100755 (executable)
new mode 100644 (file)
index 66a3d77..fc713cc
@@ -3,7 +3,7 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2013                                                *
+ *  Copyright (c) 2001-2014                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
@@ -26,7 +26,7 @@ if (!defined("_ECRIRE_INC_VERSION")) return;
 // qui sert de lien vers la meme page, avec la table triee selon ce champ
 // distingue champ numerique et non numerique
 
-// http://doc.spip.org/@vertebrer_sort
+// http://code.spip.net/@vertebrer_sort
 function vertebrer_sort($fields, $direction)
 {
        $res = '';
@@ -37,7 +37,7 @@ function vertebrer_sort($fields, $direction)
 }
 
 // Autant de formulaire que de champs (pour les criteres conditionnels) 
-// http://doc.spip.org/@vertebrer_form
+// http://code.spip.net/@vertebrer_form
 function vertebrer_form($fields)
 {
        $res = '';
@@ -68,12 +68,12 @@ function vertebrer_form($fields)
 
 // Autant de criteres conditionnels que de champs
 
-// http://doc.spip.org/@vertebrer_crit
+// http://code.spip.net/@vertebrer_crit
 function vertebrer_crit($v)
 {
        $res = "";
        foreach($v as $n => $t) {
-               if (!in_array($n, array('date', 'date_redac', 'lang')))
+               if (!in_array($n, array('date', 'date_redac', 'lang', 'recherche','logo')))
                        $res .= "\n\t\t{" . $n .  " ?}";
        }
        return $res;
@@ -86,12 +86,12 @@ function vertebrer_crit($v)
 // Si une colonne reference une table, ajoute un href sur sa page dynamique
 // (il faudrait aller chercher sa def pour ilustrer les jointures en SPIP)
 
-// http://doc.spip.org/@vertebrer_cell
+// http://code.spip.net/@vertebrer_cell
 function vertebrer_cell($fields)
 {
        $res = "";
        foreach($fields as $n => $t) {
-               $texte = "#" . strtoupper($n);
+               $texte = "#CHAMP_SQL{".$n."}";
                if (preg_match('/\s+references\s+([\w_]+)/' , $t, $r)) {
                        $url = "[(#SELF|parametre_url{page,'" . $r[1] . "'})]";
                        $texte = "<a href='$url'>" . $texte . "</a>";
@@ -108,7 +108,7 @@ function vertebrer_cell($fields)
        return $res;
 }
 
-// http://doc.spip.org/@public_vertebrer_dist
+// http://code.spip.net/@public_vertebrer_dist
 function public_vertebrer_dist($desc)
 {
        $nom = $desc['table'];