Browse Source

[svn r16528] fix a bug when we call Main Page from back links

Juan Carlos Raña 16 years ago
parent
commit
90a839ed25
1 changed files with 10 additions and 3 deletions
  1. 10 3
      main/wiki/index.php

+ 10 - 3
main/wiki/index.php

@@ -925,13 +925,20 @@ if ($_GET['action']=='links')
 					$ShowAssignment='<img src="../img/wiki/trans.gif" />';			
 				}		
 				
-		//fix index to reflink Main page (see linksto)
+		//fix Title to reflink (link Main Page)
+		
+		if ($page==get_lang('DefaultTitle'))
+		{
+			$page='index';
+		}		
+				
+		echo $LinksPagesFrom.': '.$ShowAssignment.'<a href="'.$_SERVER['PHP_SELF'].'?cidReq='.$_course[id].'&action=showpage&title='.$page.'&group_id='.Security::remove_XSS($_GET['group_id']).'">'.$row['title'].'</a>';
+		
+		//fix index to title Main page into linksto
 		if ($page=='index')
 		{	
 			$page=str_replace(' ','_',get_lang('DefaultTitle'));
 		}		
-				
-		echo $LinksPagesFrom.': '.$ShowAssignment.'<a href="'.$_SERVER['PHP_SELF'].'?cidReq='.$_course[id].'&action=showpage&title='.$page.'&group_id='.Security::remove_XSS($_GET['group_id']).'">'.$row['title'].'</a>';
 		
 		//table