Example #1
0
 function trash_contents($section_id)
 {
     require_once 'AMP/Content/Article.inc.php';
     $article = new Article($this->dbcon);
     $article_source = $article->getSearchSource();
     $article_count = $article_source->updateData(array('publish=' . AMP_CONTENT_STATUS_DRAFT), $article->makeCriteriaPrimarySection($section_id));
     $article_set = AMP_lookup('articlesByPrimarySection', $section_id);
     foreach ($article_set as $id => $title) {
         $relations_count = Article::drop_all_relations($id);
     }
 }