i write follow code in a 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;
and this function in 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;
}
and when i go to comment page i see this error :
Notice: Undefined property: stdClass::$dis_comment in \classes\class_post.php on line 154
154 = $this->comments_disabled = intval($obj->dis_comment);
please help me if you can.