예제 #1
0
 public function validate_cmts_id($arg, $check_enabled)
 {
     if (false === ($comments = GWF_Comments::getByID($arg))) {
         return $this->lang('err_comments');
     }
     if ($check_enabled && !$comments->isEnabled()) {
         return $this->lang('err_disabled');
     }
     return false;
 }
예제 #2
0
파일: Show.php 프로젝트: sinfocol/gwf3
 public function sanitize($check_enabled = true)
 {
     if ('' === ($cmts_id = Common::getGetString('cmts_id'))) {
         return $this->module->error('err_comments');
     }
     if (false === ($c = GWF_Comments::getByID($cmts_id))) {
         return $this->module->error('err_comments');
     }
     if ($check_enabled) {
         if (!$c->isEnabled()) {
             return $this->module->error('err_disabled');
         }
     }
     $this->comments = $c;
     return false;
 }
예제 #3
0
 /**
  * Get the comments thread for this comment.
  * @return GWF_Comments
  */
 public function getComments()
 {
     return GWF_Comments::getByID($this->getVar('cmt_cid'));
 }