function hj_forum_1359738428() { $subtypes[] = get_subtype_id('object', 'hjforum'); $subtypes[] = get_subtype_id('object', 'hjforumtopic'); $subtypes[] = get_subtype_id('object', 'hjforumpost'); $subtypes_in = implode(',', $subtypes); $dbprefix = elgg_get_config('dbprefix'); $query = "SELECT guid\n\t\t\t\tFROM {$dbprefix}entities e\n\t\t\t\tWHERE e.subtype IN ({$subtypes_in})"; $data = get_data($query); foreach ($data as $e) { hj_framework_set_ancestry($e->guid); } }
/** * Update ancestry relationships * @see hj_framework_set_ancestry() * @return array Hierarchy of ancestors */ public function setAncestry() { return hj_framework_set_ancestry($this->guid); }