私は class_post.php に次のコードを書きます:
$this->post_message = stripslashes($obj->message);
$this->post_date = intval($obj->date);
$this->comments_disabled = intval($obj->dis_comment);
$this->post_mentioned = array();
$this->post_attached = array();
$this->post_posttags = array();
$this->post_comments = array();
$this->post_commentsnum = 0;
$this->post_commentsnum = 0;
および class_post.php のこの関数:
public function disable_comment($num)
{
if( $this->error ) {
return FALSE;
}
if( $this->is_system_post ) {
return FALSE;
}
if( ! $this->user->is_logged ) {
return FALSE;
}
if( $this->user->id != $this->post_user->id && $this->user->info->is_network_admin != 1) {
return FALSE;
}
$n = intval($num);
$this->db2->query('UPDATE posts SET dis_comment="'.$n.'" WHERE id="'.$this->post_id.'" LIMIT 1');
return TRUE;
}
コメントページに行くと、このエラーが表示されます:
Notice: 未定義のプロパティ: stdClass::$dis_comment in \classes\class_post.php 行 154
154 = $this->comments_disabled = intval($obj->dis_comment);
できれば助けてください。