// {va_chercher #TITRE} function critere_va_chercher_dist($idb, &$boucles, $crit) { $boucle = &$boucles[$idb]; $table = $boucle->id_table; $not = $crit->not; // chercher quoi ? if (isset($crit->param[0])) { $quoi = calculer_liste($crit->param[0], array(), $boucles, $boucles[$idb]->id_parent); } else { // rendons obligatoire ce parametre return (array('zbug_critere_necessite_parametre', array('critere' => $crit->op ))); } $c = array("'OR'", array("'LIKE'", "'$table.titre'", "sql_quote('%' . $quoi . '%')"), array("'LIKE'", "'$table.texte'", "sql_quote('%' . $quoi . '%')") ); // Inversion de la condition ? if ($crit->not) { $c = array("'NOT'", $c); } $boucle->where[] = $c; }