mgd_is_in_topic_tree

(Midgard 1.4.2 'Bifrost')

mgd_is_in_topic_tree -- Check location within a topic tree

Description

bool mgd_is_in_topic_tree (int root, int topic)

Minimum version: Midgard 1.1.1

Check whether the topic with id topic is located in the topic tree that starts at topic with id root.

Returns TRUE if the record is within the tree. Returns FALSE if the record is not within the tree.


<?php
 $root  = 13;
 $topic = 17;
 $yesno = "";
 if(! mgd_is_in_topic_tree($root,$topic) $yesno = "not ";
   echo "<p>$topic is $yesno in topic tree below $root</p>";