Changeset 44052 in spip-zone
- Timestamp:
- Jan 31, 2011, 11:43:22 PM (9 years ago)
- Location:
- _plugins_/spip-bonux-2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/spip-bonux-2/plugin.xml
r44046 r44052 32 32 <icon>img_pack/spip-bonux.png</icon> 33 33 <licence>(c) 2008-2010 GPL</licence> 34 <version>2.2.1 6</version>34 <version>2.2.17</version> 35 35 <etat>stable</etat> 36 36 <description>Le plugin qui lave plus SPIP que SPIP, avec des chouettes cadeaux dedans ! Interface douce, boucles POUR et CONDITION, tableaux, compteur, etc.</description> -
_plugins_/spip-bonux-2/public/spip_bonux_criteres.php
r43992 r44052 200 200 }; 201 201 "; 202 $field = serialize(array_keys($boucle->show['field'])); 202 203 $boucle->select[] = "\".tri_champ_select(\$tri).\""; 203 $boucle->order[] = "tri_champ_order(\$tri,'$id_table' ).\$senstri";204 $boucle->order[] = "tri_champ_order(\$tri,'$id_table','$field').\$senstri"; 204 205 } 205 206 -
_plugins_/spip-bonux-2/spip_bonux_fonctions.php
r44046 r44052 193 193 * @return string 194 194 */ 195 function tri_champ_order($t,$table=NULL){ 196 if (!is_null($table)) 197 $table = $table.'.'; 195 function tri_champ_order($t,$table=NULL,$field=NULL){ 198 196 if (strncmp($t,'num ',4)==0){ 199 197 $t = substr($t,4); 200 198 $t = preg_replace(',\s,','',$t); 201 $t = "0+$table$t"; 199 // Lever une ambiguité possible si le champs fait partie de la table (pour compatibilité de la balise tri avec compteur, somme, etc.) 200 if (!is_null($table) && !is_null($field) && in_array($t,unserialize($field))) 201 $t = "0+$table.$t"; 202 else 203 $t = "0+$t"; 202 204 return $t; 203 205 } … … 205 207 return "multi"; 206 208 } 207 return $table.preg_replace(',\s,','',$t); 209 else { 210 $t = preg_replace(',\s,','',$t); 211 // Lever une ambiguité possible si le champs fait partie de la table (pour compatibilité de la balise tri avec compteur, somme, etc.) 212 if (!is_null($table) && !is_null($field) && in_array($t,unserialize($field))) 213 return $table.'.'.$t; 214 else 215 return $t; 216 } 208 217 } 209 218
Note: See TracChangeset
for help on using the changeset viewer.