<?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
* @ 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;
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');
$boucle->where[]= array("'?'",$_quoi,$op,"''");
}
}
-
-
-?>