|
From: Arno H. <aho...@us...> - 2000-10-24 10:32:40
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6716/lib Modified Files: transform.php Log Message: killed the !WikiName,!WikiName,!WikiNameSameStem bug for good. -- added examples to TestPage Index: transform.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/transform.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** transform.php 2000/10/23 16:52:05 1.3 --- transform.php 2000/10/24 10:32:37 1.4 *************** *** 160,165 **** unset($hash); for ($i = 0; $link[0][$i]; $i++) { ! // $realfile = $link[0][$i]; ! $hash[$link[0][$i]]++; } --- 160,169 ---- unset($hash); for ($i = 0; $link[0][$i]; $i++) { ! if(strstr($link[0][$i], '!')) // hashval sports a value ! $hashval = "0000:".$link[0][$i]; // in front that guarantees ! else // correct sorting ! $hashval = sprintf("%04d:%s", 9876-strlen($link[0][$i]) ! , $link[0][$i]); ! $hash[$hashval] = 1; } *************** *** 167,172 **** --- 171,178 ---- ksort($hash); while (list($realfile, $val) = each($hash)) { + $realfile = substr($realfile, 5); // get rid of sort value $token = $FieldSeparator . $FieldSeparator . ++$ntokens . $FieldSeparator; $tmpline = str_replace($realfile, $token, $tmpline); + $tokens[] = $token; if (strstr($realfile, '!')) { |