parent_id !== NULL){ $a = "parent post"; $page->add_block(new Block(null, "This post belongs to a $a.", "main", 5)); } if(bool_escape($image->has_children)){ $ids = $database->get_col("SELECT id FROM images WHERE parent_id = :iid", array("iid"=>$image->id)); $html = "This post has id.'/1')."'>".(count($ids) > 1 ? "child posts" : "a child post").""; $html .= " (post "; foreach($ids as $id){ $html .= "#{$id}, "; } $html = rtrim($html, ", ").")."; $page->add_block(new Block(null, $html, "main", 6)); } } public function get_parent_editor_html(Image $image) { global $user; $h_parent_id = $image->parent_id; $s_parent_id = $h_parent_id ?: "None."; $html = "