Mark child posts as commentable when parent is set to commentable
This commit is contained in:
parent
7d0569f49b
commit
b520f3547f
@ -296,9 +296,10 @@ class Item extends BaseObject {
|
|||||||
return $this->threaded;
|
return $this->threaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function set_commentable($val) {
|
public function set_commentable($val) {
|
||||||
$this->commentable = $val;
|
$this->commentable = $val;
|
||||||
|
foreach($this->get_children() as $child)
|
||||||
|
$child->set_commentable($val);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function is_commentable() {
|
public function is_commentable() {
|
||||||
|
Reference in New Issue
Block a user