Update of /home/spip-cvs/spip
In directory alan:/tmp/cvs-serv31212
Modified Files:
inc-arg-squel.php3
Log Message:
inversion du critère IN : {id_xxx !in 1,2,3}
Index: inc-arg-squel.php3
RCS file: /home/spip-cvs/spip/inc-arg-squel.php3,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- inc-arg-squel.php3 17 Aug 2004 01:59:38 -0000 1.22
+++ inc-arg-squel.php3 17 Aug 2004 07:24:01 -0000 1.23
@@ -294,11 +294,17 @@
$val3[] = "'$v'";
}
$val = join(',', $val3);
- $boucle->where[] = "$col IN ($val)";
- $boucle->select[] = "FIND_IN_SET($col, \\\"$val\\\")
- AS rang";
- if (!$boucle->order)
- $boucle->order = 'rang';
+ $where = "$col IN ($val)";
+ if ($match[4] == '!') {
+ $where = "NOT ($where)";
+ } else {
+ if (!$boucle->order) {
+ $boucle->order = 'rang';
+ $boucle->select[] =
+ "FIND_IN_SET($col, \\\"$val\\\") AS rang";
+ }
+ }
+ $boucle->where[] = $where;
$op = '';
}