GalleryComment * @g2 GalleryChildEntity * @g2 * @g2 1 * @g2 3 * @g2 * @g2 * * @package Comment * @subpackage Classes * @author Bharat Mediratta * @version $Revision: 17580 $ */ class GalleryComment extends GalleryChildEntity { /** * Id of the commenter * * @g2 * @g2 commenterId * @g2 INTEGER * @g2 LARGE * @g2 * @g2 * * @var int $commenterId * @access public */ var $commenterId; /** * Commenter's host name or address * * @g2 * @g2 host * @g2 STRING * @g2 MEDIUM * @g2 * @g2 * * @var string $host * @access public */ var $host; /** * Subject of the comment * * @g2 * @g2 subject * @g2 STRING * @g2 MEDIUM * @g2 FULL * @g2 * * @var string $subject * @access public */ var $subject; /** * Text of the comment * * @g2 * @g2 comment * @g2 TEXT * @g2 SMALL * @g2 FULL * @g2 * * @var string $comment * @access public */ var $comment; /** * Date of the comment * * @g2 * @g2 date * @g2 INTEGER * @g2 * @g2 * @g2 READ * @g2 * * @var int $date * @access public */ var $date; /** * Author of the comment. Only used for guest comments. * * @g2 * @g2 author * @g2 STRING * @g2 MEDIUM * @g2 FULL * @g2 * * @var string $author * @access public */ var $author; /** * Publication status of this comment. * @see modules/comment/module.inc for possible status values. * * @g2 * @g2 publishStatus * @g2 INTEGER * @g2 * @g2 * @g2 0 * @g2 FULL * @g2 * * @var string $publishStatus * @access public */ var $publishStatus; /** * @see GalleryEntity::getClassName */ function getClassName() { return 'GalleryComment'; } /** * @see GalleryEntity::create */ function create($parentId) { $ret = parent::create($parentId); if ($ret) { return $ret; } $this->setCommenterId(null); $this->setHost(null); $this->setSubject(null); $this->setComment(null); $this->setDate(time()); $this->setAuthor(null); list ($ret, $moderate) = GalleryCoreApi::getPluginParameter ('module', 'comment', 'comments.moderate'); if ($ret) { return $ret; } if ($moderate) { $this->setPublishStatus(COMMENT_PUBLISH_STATUS_UNPUBLISHED); } else { $this->setPublishStatus(COMMENT_PUBLISH_STATUS_PUBLISHED); } } function getCommenterId() { return $this->commenterId; } function setCommenterId($commenterId) { $this->commenterId = $commenterId; } function getHost() { return $this->host; } function setHost($host) { $this->host = $host; } function getSubject() { return $this->subject; } function setSubject($subject) { $this->subject = $subject; } function getComment() { return $this->comment; } function setComment($comment) { $this->comment = $comment; } function getDate() { return $this->date; } function setDate($date) { $this->date = $date; } function setAuthor($author) { $this->author = $author; } function getAuthor() { return $this->author; } function setPublishStatus($publishStatus) { $this->publishStatus = $publishStatus; } function getPublishStatus() { return $this->publishStatus; } } ?>