[ewiki] Re: _DB_F_PART, Interwiki links

Andy,

I've already changed the InterMap code again, and it is working now I'd
say (there were two more bugs in it).  The $href_i wasn't ever necessary
(and besides that a problem) here, because ewiki_arry() lowercases the hash
key automatically, and the second strtok() would receive a lowercased
PageName from $href_i.
The additional strtolower() here was evil from the beginning ;)

The new code being:

   #-- interwiki links
   if (strpos($href, ":") and !strpos($href, "//")
   and ($p1 = strtok($href, ":")) and ($page = strtok("\000"))
   and (($p1 = ewiki_array($ewiki_config["interwiki"], $p1)) !== NULL)  ) {
      $type = array("interwiki", $uu);
      while ($p1_alias = $ewiki_config["interwiki"][$p1]) {
      ...
      $href = str_replace("%s", $page, $p1);
      $str = "<a href=\"$href\">$title</a>";
   }

And this seems to work for _CASE_INSENSITIVE and not. Making it always
insensitive isn't probably worth the effort (nd side effects).


mario

Other related posts: