示例#1
0
 function relate($section_id)
 {
     if (!$section_id) {
         return false;
     }
     $db_related = $this->_getSectionsRelatedDB();
     if ($db_related && array_search($section_id, $db_related) !== FALSE) {
         return false;
     }
     require_once 'AMP/Content/Section/RelatedSet.inc.php';
     $related_section_set = new SectionRelatedSet($this->dbcon);
     $insert_values = array('typeid' => $section_id, 'articleid' => $this->id);
     return $related_section_set->insertData($insert_values);
 }