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