From f4678d99229d68da28b12b38d9f9020cd9c38d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Ra=C3=B1a?= Date: Wed, 2 Jun 2010 17:54:28 +0200 Subject: [PATCH] fix duplication into wanted pages and fix initial and end blank spaces for what link here ? --- main/wiki/index.php | 7 +------ main/wiki/wiki.inc.php | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/main/wiki/index.php b/main/wiki/index.php index a20d4d7638..114490eeb9 100755 --- a/main/wiki/index.php +++ b/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 diff --git a/main/wiki/wiki.inc.php b/main/wiki/wiki.inc.php index 6399c0b3bb..379ed4d65b 100755 --- a/main/wiki/wiki.inc.php +++ b/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]);