r38261 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38260‎ | r38261 | r38262 >
Date:21:52, 30 July 2008
Author:simetrical
Status:old
Tags:
Comment:
As Brion points out, Linker::linkUrl() duplicates wfArrayToCGI. Fix that, and also respace/expand a comment in Title.php.
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -219,16 +219,7 @@
220220 $query['redlink'] = '1';
221221 }
222222
223 - $queryString = array();
224 - foreach( $query as $key => $val ) {
225 - $queryString []= urlencode( $key ) . '=' . urlencode( $val );
226 - }
227 - $queryString = implode( '&', $queryString );
228 -
229 - if( $target->isExternal() ) {
230 - return $target->getFullURL( $queryString );
231 - }
232 - return $target->getLocalURL( $queryString );
 223+ return $target->getLocalURL( wfArrayToCGI( $query ) );
233224 }
234225
235226 private function linkAttribs( $target, $attribs, $options ) {
Index: trunk/phase3/includes/Title.php
@@ -2140,9 +2140,9 @@
21412141 }
21422142
21432143 /**
2144 - * Pages with "/./" or "/../" appearing in the URLs will
2145 - * often be unreachable due to the way web browsers deal
2146 - * with 'relative' URLs. Forbid them explicitly.
 2144+ * Pages with "/./" or "/../" appearing in the URLs will often be un-
 2145+ * reachable due to the way web browsers deal with 'relative' URLs.
 2146+ * Also, they conflict with subpage syntax. Forbid them explicitly.
21472147 */
21482148 if ( strpos( $dbkey, '.' ) !== false &&
21492149 ( $dbkey === '.' || $dbkey === '..' ||

Status & tagging log