Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 1002)
+++ trunk/CHANGELOG	(revision 1003)
@@ -11,6 +11,9 @@
 ! = Update/Change
 
 ------------------------------------- 2.8.0 -------------------------------------
+22-June-2009 Ruud Eisinga
+#	Fixed a bug in Menu_link module that made childpages of the menu_link page 
+	not selectable. (thnx to Luisehahne)
 21-June-2009 Matthias Gallas
 #	Fixed small bug introduced in changeset [999]
 19-June-2009 Matthias Gallas
Index: trunk/wb/modules/menu_link/modify.php
===================================================================
--- trunk/wb/modules/menu_link/modify.php	(revision 1002)
+++ trunk/wb/modules/menu_link/modify.php	(revision 1003)
@@ -45,7 +45,7 @@
 $anchor = $sql_row['anchor'];
 $sel = ' selected';
 
-// Get list of all visible pages, except actual one, and build a page-tree
+// Get list of all visible pages and build a page-tree
 
 // this function will fetch the page_tree, recursive
 if(!function_exists('menulink_make_tree')) {
@@ -55,13 +55,14 @@
 	// get list of page-trails, recursive
 	if($query_page = $database->query("SELECT * FROM `$table_p` WHERE `parent`=$parent ORDER BY `position`")) {
 		while($page = $query_page->fetchRow()) {
-			if($admin->page_is_visible($page) && $page['page_id']!=$link_pid) {
+			if($admin->page_is_visible($page) ) {
 				$pids = explode(',', $page['page_trail']);
 				$entry = '';
-				foreach($pids as $pid)
+				foreach($pids as $pid) {
 					$entry .= $menulink_titles[$pid].' / ';
-				$tree[$page['page_id']] = rtrim($entry, '/ ');
-				$tree = menulink_make_tree($page['page_id'], $link_pid, $tree);
+					$tree[$page['page_id']] = rtrim($entry, '/ ');
+					$tree = menulink_make_tree($page['page_id'], $link_pid, $tree);
+				}
 			}
 		}
 	}
@@ -68,6 +69,7 @@
 	return($tree);
 }
 }
+
 // get list of all page_ids and page_titles
 global $menulink_titles;
 $menulink_titles = array();
@@ -172,7 +174,10 @@
 			<option value="0"<?php echo $target_page_id=='0'?$sel:''?>><?php echo $TEXT['PLEASE_SELECT']; ?></option>
 			<option value="-1"<?php echo $target_page_id=='-1'?$sel:''?>><?php echo $MOD_MENU_LINK['EXTERNAL_LINK']; ?></option>
 			<?php foreach($links AS $pid=>$link) {
-				echo "<option value=\"$pid\" ".($target_page_id==$pid?$sel:'').">$link</option>";
+				if ($pid == $page_id)  // Display current page with selection disabled
+					echo "<option value=\"$pid\" disabled=\"disabled\">$link *</option>";
+				else
+					echo "<option value=\"$pid\" ".($target_page_id==$pid?$sel:'').">$link</option>";
 			} ?>
 		</select>
 		&nbsp;
