Name
mgd_is_in_topic_tree -- Check location within a topic tree
Synopsis
bool mgd_is_in_topic_tree
(int root, int topic);
Description
Minimum version: Midgard 1.1.1 (Iron River)
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.
Example
<?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>";