mgd_walk_topic_tree

(Midgard 1.4.2 'Bifrost')

mgd_walk_topic_tree -- Walk a topic tree

Description

bool mgd_walk_topic_tree (string func, int root, int maxlevel, mixed &xparam, bool [order])

Minimum version: Midgard 1.4 (Bifrost)

Walks the topic tree starting at the topic record with id root to a level of maxlevel deep. for each topic the user defined function func is called. Parameters to this function will be: id, the id of the topic currently being walked, level , the level of descendance from the root level, &xparam, a variable passed through by the user. If order is FALSE, each topic will be process after all its children. If set to TRUE, each topic will be processed before its children.

Returns TRUE if successful. Returns FALSE on failure.