Changeset 94722 in spip-zone for _plugins_/acces_restreint
- Timestamp:
- Jan 23, 2016, 2:57:58 PM (5 years ago)
- Location:
- _plugins_/acces_restreint/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/acces_restreint/trunk/paquet.xml
r93547 r94722 2 2 prefix="accesrestreint" 3 3 categorie="auteur" 4 version="3.1 3.6"4 version="3.14.0" 5 5 etat="dev" 6 6 compatibilite="[3.0.0;3.1.*]" -
_plugins_/acces_restreint/trunk/public/accesrestreint.php
r87182 r94722 139 139 function accesrestreint_articles_accessibles_where($primary, $_publique=''){ 140 140 # hack : on utilise zzz pour eviter que l'optimiseur ne confonde avec un morceau de la requete principale 141 $where = "array('NOT IN','$primary','( '.sql_get_select('zzza.id_article','spip_articles as zzza',".accesrestreint_rubriques_accessibles_where('zzza.id_rubrique','',$_publique).",'','','','',\$connect).')')";141 $where = "array('NOT IN','$primary','(SELECT * FROM('.sql_get_select('zzza.id_article','spip_articles as zzza',".accesrestreint_rubriques_accessibles_where('zzza.id_rubrique','',$_publique).",'','','','',\$connect).') AS subquery)')"; 142 142 $where = "array('AND', $where, ".accesrestreint_objets_accessibles_where('articles', $primary, 'not', $_publique).")"; 143 143 return $where; … … 153 153 function accesrestreint_breves_accessibles_where($primary, $_publique=''){ 154 154 # hack : on utilise zzz pour eviter que l'optimiseur ne confonde avec un morceau de la requete principale 155 $where = "array('NOT IN','$primary','( '.sql_get_select('zzzb.id_breve','spip_breves as zzzb',".accesrestreint_rubriques_accessibles_where('zzzb.id_rubrique','',$_publique).",'','','','',\$connect).')')";155 $where = "array('NOT IN','$primary','(SELECT * FROM('.sql_get_select('zzzb.id_breve','spip_breves as zzzb',".accesrestreint_rubriques_accessibles_where('zzzb.id_rubrique','',$_publique).",'','','','',\$connect).') AS subquery)')"; 156 156 $where = "array('AND', $where, ".accesrestreint_objets_accessibles_where('breves', $primary, 'not', $_publique).")"; 157 157 return $where; … … 167 167 function accesrestreint_syndic_articles_accessibles_where($primary, $_publique=''){ 168 168 # hack : on utilise zzz pour eviter que l'optimiseur ne confonde avec un morceau de la requete principale 169 $where = "array('NOT IN','$primary','( '.sql_get_select('zzzs.id_syndic','spip_syndic as zzzs',".accesrestreint_rubriques_accessibles_where('zzzs.id_rubrique','',$_publique).",'','','','',\$connect).')')";169 $where = "array('NOT IN','$primary','(SELECT * FROM('.sql_get_select('zzzs.id_syndic','spip_syndic as zzzs',".accesrestreint_rubriques_accessibles_where('zzzs.id_rubrique','',$_publique).",'','','','',\$connect).') AS subquery)')"; 170 170 $where = "array('AND', $where, ".accesrestreint_objets_accessibles_where('syndic', $primary, 'not', $_publique).")"; 171 171 return $where; … … 192 192 $where = "array('OR',$where,sql_in('zzzf.objet',\"'rubrique','article','breve'\",'NOT',\$connect))"; 193 193 194 return "array('IN','$primary','( '.sql_get_select('zzzf.id_forum','spip_forum as zzzf',array($where),'','','','',\$connect).')')";194 return "array('IN','$primary','(SELECT * FROM('.sql_get_select('zzzf.id_forum','spip_forum as zzzf',array($where),'','','','',\$connect).') AS subquery)')"; 195 195 } 196 196 … … 212 212 213 213 $where = "array('OR', 214 array('IN','$primary','( '.sql_get_select('zzzd.id_document','spip_documents_liens as zzzd',array($where),'','','','',\$connect).')'),215 array('NOT IN','$primary','( '.sql_get_select('zzzd.id_document','spip_documents_liens as zzzd','','','','','',\$connect).')')214 array('IN','$primary','(SELECT * FROM('.sql_get_select('zzzd.id_document','spip_documents_liens as zzzd',array($where),'','','','',\$connect).') AS subquery)'), 215 array('NOT IN','$primary','(SELECT * FROM('.sql_get_select('zzzd.id_document','spip_documents_liens as zzzd','','','','','',\$connect).') AS subquery)') 216 216 )"; 217 217
Note: See TracChangeset
for help on using the changeset viewer.