As Brion points out, Linker::linkUrl() duplicates wfArrayToCGI. Fix that, and also...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 30 Jul 2008 21:52:15 +0000 (21:52 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 30 Jul 2008 21:52:15 +0000 (21:52 +0000)
includes/Linker.php
includes/Title.php

index 5cdc486..ad9e060 100644 (file)
@@ -219,16 +219,7 @@ class Linker {
                        $query['redlink'] = '1';
                }
 
-               $queryString = array();
-               foreach( $query as $key => $val ) {
-                       $queryString []= urlencode( $key ) . '=' . urlencode( $val );
-               }
-               $queryString = implode( '&', $queryString );
-
-               if( $target->isExternal() ) {
-                       return $target->getFullURL( $queryString );
-               }
-               return $target->getLocalURL( $queryString );
+               return $target->getLocalURL( wfArrayToCGI( $query ) );
        }
 
        private function linkAttribs( $target, $attribs, $options ) {
index 448db9b..77ac78d 100644 (file)
@@ -2140,9 +2140,9 @@ class Title {
                }
 
                /**
-                * Pages with "/./" or "/../" appearing in the URLs will
-                * often be unreachable due to the way web browsers deal
-                * with 'relative' URLs. Forbid them explicitly.
+                * Pages with "/./" or "/../" appearing in the URLs will often be un-
+                * reachable due to the way web browsers deal with 'relative' URLs.
+                * Also, they conflict with subpage syntax.  Forbid them explicitly.
                 */
                if ( strpos( $dbkey, '.' ) !== false &&
                     ( $dbkey === '.' || $dbkey === '..' ||