Changeset 81450 in spip-zone for _plugins_/acces_restreint
- Timestamp:
- Mar 18, 2014, 12:12:02 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/acces_restreint/trunk/public/accesrestreint.php
r63441 r81450 6 6 */ 7 7 8 if (!defined( "_ECRIRE_INC_VERSION")) return;8 if (!defined('_ECRIRE_INC_VERSION')) return; 9 9 10 10 /** … … 21 21 } 22 22 } 23 24 /* 25 * Filtrage des objets suivant leurs éventuelles restrictions 26 * 27 * @pipeline pre_boucle 28 */ 23 29 function accesrestreint_pre_boucle(&$boucle){ 24 if (!isset($boucle->modificateur['tout_voir'])){ 30 // On ne filtre que s'il n'y a pas le critère {tout_voir} 31 if (!isset($boucle->modificateur['tout_voir'])) { 25 32 $securise = false; 26 switch ($boucle->type_requete){ 33 34 switch ($boucle->type_requete) { 27 35 case 'hierarchie': 28 36 case 'articles': … … 59 67 break; 60 68 } 69 61 70 if ($securise){ 62 71 $boucle->hash .= "if (!defined('_DIR_PLUGIN_ACCESRESTREINT')){ … … 68 77 } 69 78 } 79 70 80 return $boucle; 71 81 } … … 78 88 * @return string 79 89 */ 80 function accesrestreint_rubriques_accessibles_where($primary,$not='NOT', $_publique=''){ 81 if (!$_publique) $_publique = "!test_espace_prive()"; 90 function accesrestreint_rubriques_accessibles_where($primary, $not='NOT', $_publique=''){ 91 if (!$_publique) { 92 $_publique = "!test_espace_prive()"; 93 } 94 82 95 return "sql_in('$primary', accesrestreint_liste_rubriques_exclues($_publique), '$not')"; 83 96 } … … 137 150 .")"; 138 151 $where = "array('OR',$where,sql_in('zzzf.objet',\"'rubrique','article','breve'\",'NOT',\$connect))"; 152 139 153 return "array('IN','$primary','('.sql_get_select('zzzf.id_forum','spip_forum as zzzf',array($where),'','','','',\$connect).')')"; 140 154 } … … 166 180 167 181 /* Champs declares pour la recherche */ 168 function accesrestreint_rechercher_liste_des_champs($tables) 182 function accesrestreint_rechercher_liste_des_champs($tables){ 169 183 $tables['zone']['titre'] = 8; 170 184 $tables['zone']['descriptif'] = 3; 185 171 186 return $tables; 172 187 } 173 ?> 188
Note: See TracChangeset
for help on using the changeset viewer.