- WHERE Articles.article_publication_state_id =
- ArticlePublicationStates.article_publication_state_id
- AND ArticlePublicationStates.publication_state_id=5 ";
+ WHERE Articles.article_publication_state_id =
+ ArticlePublicationStates.article_publication_state_id
+ AND ArticlePublicationStates.publication_state_id=5 ";
+ if(!is_null($grupo_secciones))
+ {
+ $gs = new AI_GrupoSecciones($grupo_secciones);
+ $gs->cargar($db2);
+ if(count($gs->secciones) > 0)
+ $query .= ' AND Articles.section_id IN('.implode(',', $gs->secciones).') ';
+ }
+ else{
+ $censuradas = $db2->getCol('SELECT seccion FROM secciones_censuradas');
+ $query .= ' AND Articles.section_id NOT IN('.implode(',', $censuradas).') ';
+
+ }
+