Browse Source

fix duplication into wanted pages and fix initial and end blank spaces for what link here ?

Juan Carlos Raña 14 years ago
parent
commit
f4678d9922
2 changed files with 3 additions and 8 deletions
  1. 1 6
      main/wiki/index.php
  2. 2 2
      main/wiki/wiki.inc.php

+ 1 - 6
main/wiki/index.php

@@ -803,12 +803,7 @@ if ($_GET['action']=='wanted')
 	{
 		//$row['linksto']= str_replace("\n".$row["reflink"]."\n", "\n", $row["linksto"]); //remove self reference. TODO: check
 		$rf = explode(" ", trim($row["linksto"]));//wanted pages without /n only blank " "
-		$refs = array_merge($refs, $rf);
-		if ($n++ > 299)
-		{
-			$refs = array_unique($refs);
-			$n=0;
-		} // (clean-up only every 300th loop). Thanks to Erfurt Wiki
+		$refs = array_unique($rf);
 	}
 
 	//sort linksto. Find linksto into reflink. If not found ->page is wanted

+ 2 - 2
main/wiki/wiki.inc.php

@@ -83,8 +83,8 @@ function links_to($input)
 			}
 		    else
 			{
-				$link=$value;
-				$title=$value;
+				$link=trim($value);
+				$title=trim($value);
 	        }
 
 			unset($input_array[$key-1]);