From: Aryeh Gregor Date: Wed, 30 Jul 2008 21:52:15 +0000 (+0000) Subject: As Brion points out, Linker::linkUrl() duplicates wfArrayToCGI. Fix that, and also... X-Git-Tag: 1.31.0-rc.0~46264 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=76c30983c95f57a827cdc2d71d10a8864ff272c9;p=lhc%2Fweb%2Fwiklou.git As Brion points out, Linker::linkUrl() duplicates wfArrayToCGI. Fix that, and also respace/expand a comment in Title.php. --- diff --git a/includes/Linker.php b/includes/Linker.php index 5cdc4866ce..ad9e0604d9 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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 ) { diff --git a/includes/Title.php b/includes/Title.php index 448db9b499..77ac78d561 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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 === '..' ||