Improved get_comment_box
This commit is contained in:
parent
9f57afe160
commit
4e4774ff4f
|
@ -36,9 +36,11 @@ class Item extends BaseObject {
|
||||||
$this->redirect_url = $a->get_baseurl($ssl_state) . '/redir/' . $this->get_data_value('cid') ;
|
$this->redirect_url = $a->get_baseurl($ssl_state) . '/redir/' . $this->get_data_value('cid') ;
|
||||||
|
|
||||||
// Prepare the children
|
// Prepare the children
|
||||||
foreach($data['children'] as $item) {
|
if(count($data['children'])) {
|
||||||
$child = new Item($item);
|
foreach($data['children'] as $item) {
|
||||||
$this->add_child($child);
|
$child = new Item($item);
|
||||||
|
$this->add_child($child);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,9 +282,6 @@ class Item extends BaseObject {
|
||||||
else {
|
else {
|
||||||
$item_result['flatten'] = true;
|
$item_result['flatten'] = true;
|
||||||
$item_result['threaded'] = false;
|
$item_result['threaded'] = false;
|
||||||
if(!$htis->is_toplevel()) {
|
|
||||||
$item_result['comment'] = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $item_result;
|
$result = $item_result;
|
||||||
|
@ -479,6 +478,10 @@ class Item extends BaseObject {
|
||||||
* _ false on failure
|
* _ false on failure
|
||||||
*/
|
*/
|
||||||
private function get_comment_box($ww) {
|
private function get_comment_box($ww) {
|
||||||
|
if(!$this->is_toplevel() && !get_config('system','thread_allow')) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
$comment_box = '';
|
$comment_box = '';
|
||||||
$conv = $this->get_conversation();
|
$conv = $this->get_conversation();
|
||||||
$template = get_markup_template($this->get_comment_box_template());
|
$template = get_markup_template($this->get_comment_box_template());
|
||||||
|
|
Loading…
Reference in a new issue