function execute($options = array()) { $options = array_merge($this->getOptions(), $options); if (!isset($options['_userid'])) { return false; } $uid = $options['_userid']; require_once 'AMP/Content/Article/Comment/List_Basic.inc.php'; $comment_list = new AMP_Content_Article_Comment_List_Basic($this->dbcon, array('userdata_id' => $uid)); $comment_list->setEditLinkTarget('blank'); $comment_list->appendAddLinkVar('userdata_id=' . $uid); $comment_list_output = $comment_list->execute(); $this->udm->fields[$this->addPrefix('comments_list')]['values'] = $this->inForm($comment_list_output); }
function &_getCommentList($id) { $empty_value = AMP_TEXT_SEARCH_NO_MATCHES; if (isset($this->_commentList)) { return $this->_commentList; } if (!$id) { return $empty_value; } require_once 'AMP/Content/Article/Comment/List_Basic.inc.php'; $commentList = new AMP_Content_Article_Comment_List_Basic(AMP_Registry::getDbcon(), array('article' => $id)); $commentList->setEditLinkTarget('blank'); $commentList->appendAddLinkVar('article_id=' . $id); $this->_commentList =& $commentList; return $commentList; }