utiliser sql_in uniquement avec un array

v3.15
cedric@yterium.com 4 years ago
parent ee12495ef4
commit 2556571e8c

@ -1,7 +1,7 @@
<paquet
prefix="accesrestreint"
categorie="auteur"
version="3.15.17"
version="3.15.18"
etat="test"
compatibilite="[3.0.0;3.2.*]"
logo="prive/themes/spip/images/zone-32.png"

@ -253,7 +253,7 @@ function accesrestreint_forums_accessibles_where($primary, $_publique = '') {
$where = "array('OR',$where,"
."array('AND','zzzf.objet=\'breve\'',".accesrestreint_breves_accessibles_where('zzzf.id_objet', $_publique).")"
.")";
$where = "array('OR',$where,sql_in('zzzf.objet',\"'rubrique','article','breve'\",'NOT',\$connect))";
$where = "array('OR',$where,sql_in('zzzf.objet',array('rubrique','article','breve'),'NOT',\$connect))";
// Permettre aux plugins de modifier la condition
$where = pipeline('accesrestreint_objets_accessibles_where',
@ -286,7 +286,7 @@ function accesrestreint_documents_accessibles_where($primary, $_publique = '') {
$where = "array('OR',$where,array('AND','zzzd.objet=\'article\'',".accesrestreint_articles_accessibles_where('zzzd.id_objet', $_publique)."))";
$where = "array('OR',$where,array('AND','zzzd.objet=\'breve\'',".accesrestreint_breves_accessibles_where('zzzd.id_objet', $_publique)."))";
$where = "array('OR',$where,array('AND','zzzd.objet=\'forum\'',".accesrestreint_forums_accessibles_where('zzzd.id_objet', $_publique)."))";
$where = "array('OR',$where,sql_in('zzzd.objet',\"'rubrique','article','breve','forum'\",'NOT',\$connect))";
$where = "array('OR',$where,sql_in('zzzd.objet',array('rubrique','article','breve','forum'),'NOT',\$connect))";
$where = "array('OR',
array('IN','$primary','(SELECT * FROM('.sql_get_select('zzzd.id_document','spip_documents_liens as zzzd',array($where),'','','','',\$connect).') AS subquery)'),

Loading…
Cancel
Save