[PLUGINS] ~maj globale
[lhc/web/www.git] / www / plugins / formidable / public / formidable_criteres.php
index 38d7d96..1754344 100644 (file)
@@ -1,18 +1,20 @@
 <?php
 
-if (!defined("_ECRIRE_INC_VERSION")) return;
+if (!defined('_ECRIRE_INC_VERSION')) {
+       return;
+}
 
        // {tri_donnee champ}
 /**
  * Depuis la boucle FORMULAIRES_REPONSES, trier les résulats en fonction d'un champ
  * de la table FORMULAIRES_REPONSES_CHAMPS
- * {tri_selon_donnee} 
+ * {tri_selon_donnee}
  *
  * @global array $exceptions_des_tables
  * @param string $idb
  * @param array $boucles
  * @param <type> $crit
- * 
+ *
  * Auteurs :
  * Antoine Pitrou
  * Cedric Morin
@@ -20,15 +22,16 @@ if (!defined("_ECRIRE_INC_VERSION")) return;
  * @ 2005,2006 - Distribue sous licence GNU/GPL
  */
 
-function critere_tri_selon_donnee_dist($idb, &$boucles, $crit) { // Garder cette fontion pour compatibilité
+function critere_tri_selon_donnee_dist($idb, &$boucles, $crit) {
+       // Garder cette fontion pour compatibilité
        critere_tri_selon_reponse_dist($idb, $boucles, $crit) ;
 }
 function critere_tri_selon_reponse_dist($idb, &$boucles, $crit) {
 
        $boucle = &$boucles[$idb];
        $t = $boucle->id_table;
-       
-       if ($t=='formulaires_reponses'){
+
+       if ($t=='formulaires_reponses') {
                $not = $crit->not;
                $_quoi = calculer_liste($crit->param[0], array(), $boucles, $boucles[$idb]->id_parent);
                $k = count($boucle->join)+1;
@@ -46,11 +49,12 @@ function critere_recherche_reponse_dist($idb, &$boucles, $crit) {
        global $table_des_tables;
        $boucle = &$boucles[$idb];
        $t = $boucle->id_table;
-       if ($t=='formulaires_reponses'){
-               if (isset($crit->param[0]))
+       if ($t=='formulaires_reponses') {
+               if (isset($crit->param[0])) {
                        $_quoi = calculer_liste($crit->param[0], array(), $boucles, $boucles[$idb]->id_parent);
-               else
+               } else {
                        $_quoi = '@$Pile[0]["recherche"]';
+               }
 
                $k = count($boucle->join)+1;
                $boucle->join[$k]= array($t,'id_formulaires_reponse');
@@ -59,6 +63,3 @@ function critere_recherche_reponse_dist($idb, &$boucles, $crit) {
                $boucle->where[]= array("'?'",$_quoi,$op,"''");
        }
 }
-
-
-?>