r178 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r177‎ | r178 | r179 >
Date:18:35, 20 February 2002
Author:vibber
Status:old
Tags:
Comment:
Small encoding URL fix
Modified paths:
  • /trunk/phpwiki/fpw/wikiPage.php (modified) (history)

Diff [purge]

Index: trunk/phpwiki/fpw/wikiPage.php
@@ -1004,8 +1004,9 @@
10051005 if(count($wikiEncodingNames) > 1) { # Shortcut for switching character encodings
10061006 global $THESCRIPT;
10071007 $u = $THESCRIPT . "?" . getenv("QUERY_STRING");
 1008+ $u = getenv ( "REQUEST_URI" ) ;
10081009 $u = preg_replace("/[\?\&]encoding=[0-9]+/", "", $u);
1009 - $u .= (strchr($u, "?") ? "&" : "?");
 1010+ $u .= ((!strchr($u, "?") && strstr($THESCRIPT,$u)) ? "?" : "&");
10101011 foreach ( $wikiEncodingNames as $i => $enc ) {
10111012 if($i > 0) $ret .= " | ";
10121013 if($i == $user->options["encoding"]) $ret .= "<b>";

Status & tagging log