Пример #1
0
 function DoEditComment()
 {
     $commentid = JRequest::getVar('commentid', 0, '', 'int');
     if (!$this->_permissions['mod_kb']) {
         return;
     }
     if (!$commentid) {
         return;
     }
     $this->comment = $this->GetComment($commentid);
     foreach ($this->comment as $field => $value) {
         if (substr($field, 0, 7) == "custom_") {
             JRequest::setVar($field, $value);
         }
     }
     $this->commentid = $commentid;
     $this->can_add = true;
     $ident = $this->comment['ident'];
     $this->customfields = FSTCF::Comm_GetCustomFields($ident);
     // need to return the edit form with this comment filled in
     include $this->tmplpath . DS . 'editcomment.php';
     exit;
 }