mgd_walk_topic_tree

Name

mgd_walk_topic_tree -- Walk a topic tree

Synopsis

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

Description

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 successfull. Returns false on failure.