You are here

function _outline_designer_recurse_duplicate_nodes in Outline Designer 5

this only returns the nids that will neeed to be converted during the duplication process, it is a helper function for the duplicate ajax command

2 calls to _outline_designer_recurse_duplicate_nodes()
ajax.php in ./ajax.php
_outline_designer_ajax in ./outline_designer.module
Implementation of the ajax menu hook

File

./outline_designer.module, line 348

Code

function _outline_designer_recurse_duplicate_nodes($nid, $tree = array()) {
  $result = db_query("SELECT n.nid FROM {book} as b JOIN {node} as n ON n.vid=b.vid WHERE b.parent=%d ORDER BY weight", $nid);
  while ($value = db_fetch_array($result)) {
    $tree[$value['nid']] = 0;
    $tree = _outline_designer_recurse_duplicate_nodes($value['nid'], $tree);
  }
  return $tree;
}