$current_cat_id = $categories[$cat_id]['cat_parent'];\r
$exclude = true; /* exclude the children */\r
\r
+ //remove the current cat_id and it's sub cats from list, don't want to print them out.\r
+ foreach ($categories[$current_cat_id]['children'] as $id=>$child) {\r
+ if ($child == $cat_id) {\r
+ unset($categories[$current_cat_id]['children'][$id]);\r
+ }\r
+ }\r
+ unset($categories[$cat_id]);\r
+\r
$auth = manage_links();\r
if ($auth == LINK_CAT_AUTH_ALL) {\r
echo '<option value="0-'.LINK_CAT_COURSE.'-'.$_SESSION['course_id'].'"> [ '._AT('cats_none').' ] </option>';\r
echo '<option value="0-'.LINK_CAT_COURSE.'-'.$_SESSION['course_id'].'"></option>';\r
}\r
-\r
select_link_categories($categories, 0, $current_cat_id, $exclude, 0, TRUE);\r
?></select>\r
</div>\r
-\r
<div class="row buttons">\r
<input type="submit" name="submit" value="<?php echo _AT('save'); ?>" accesskey="s" />\r
<input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />\r