Changeset 93640 in spip-zone for _core_/plugins/forum/public/forum.php
- Timestamp:
- Dec 13, 2015, 2:39:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_core_/plugins/forum/public/forum.php
r93612 r93640 27 27 // de meme qu'un critere sur {id_forum} ou {id_parent} 28 28 if (!isset($boucle->modificateur['tout']) 29 AND!isset($boucle->modificateur['plat'])30 AND!isset($boucle->modificateur['criteres']['id_forum'])31 AND!isset($boucle->modificateur['criteres']['id_parent'])29 and !isset($boucle->modificateur['plat']) 30 and !isset($boucle->modificateur['criteres']['id_forum']) 31 and !isset($boucle->modificateur['criteres']['id_parent']) 32 32 ) { 33 33 array_unshift($boucle->where, array("'='", "'$id_table." . "id_parent'", 0)); … … 110 110 // a la boucle mere de reserver son id_primary 111 111 if ($p->id_boucle 112 ANDisset($p->boucles[$p->id_boucle])113 AND$primary = $p->boucles[$p->id_boucle]->primary112 and isset($p->boucles[$p->id_boucle]) 113 and $primary = $p->boucles[$p->id_boucle]->primary 114 114 ) { 115 115 $_type = _q($p->boucles[$p->id_boucle]->type_requete); … … 169 169 if ($id_parent = intval($reponse)) { 170 170 if ($type 171 AND$type != 'forums'172 AND$primary171 and $type != 'forums' 172 and $primary 173 173 ) { 174 174 $forum = array('objet' => $type, 'id_objet' => $primary); … … 186 186 187 187 // Ce n'est pas une reponse, on prend la boucle mere 188 if ($type AND$primary) {188 if ($type and $primary) { 189 189 return id_table_objet($type) . '=' . intval($primary); 190 190 } … … 194 194 foreach ($env as $k => $v) { 195 195 if (preg_match(',^id_([a-z_]+)$,S', $k) 196 AND$id = intval($v)196 and $id = intval($v) 197 197 ) { 198 198 return id_table_objet($k) . '=' . $v; … … 229 229 // http://code.spip.net/@lang_parametres_forum 230 230 function lang_parametres_forum($qs, $lang) { 231 if (is_array($lang) ANDpreg_match(',id_([a-z_]+)=([0-9]+),', $qs, $r)) {231 if (is_array($lang) and preg_match(',id_([a-z_]+)=([0-9]+),', $qs, $r)) { 232 232 $id = 'id_' . $r[1]; 233 233 if ($t = $lang[$id]) { … … 237 237 // Si ce n'est pas la meme que celle du site, l'ajouter aux parametres 238 238 239 if ($lang AND$lang <> $GLOBALS['meta']['langue_site']) {239 if ($lang and $lang <> $GLOBALS['meta']['langue_site']) { 240 240 return $qs . "&lang=" . $lang; 241 241 } … … 251 251 return $code; 252 252 } 253 254 ?>
Note: See TracChangeset
for help on using the changeset viewer.