function nodesymlinks_get_items_by_nid in NodeSymlinks 6
Same name and namespace in other branches
- 7 nodesymlinks.inc \nodesymlinks_get_items_by_nid()
Load all duplicate menulinks from database for given node nid. Returns array of mlid and link_path.
Parameters
int $nid:
Return value
array
1 call to nodesymlinks_get_items_by_nid()
- _nodesymlinks_nodeapi_insert_update in ./
nodesymlinks.inc - Implementation of hook_nodeapi() OP: Insert & Update.
File
- ./
nodesymlinks.inc, line 26
Code
function nodesymlinks_get_items_by_nid($nid) {
$items = array();
$result = db_query("SELECT mlid,link_path FROM {menu_links} WHERE link_path LIKE 'node/%d/mid/%%' AND module = 'nodesymlinks' ", $nid);
while ($item = db_fetch_array($result)) {
$items[$item['mlid']] = $item;
}
return $items;
}