Index: trunk/phase3/includes/Linker.php |
— | — | @@ -219,16 +219,7 @@ |
220 | 220 | $query['redlink'] = '1'; |
221 | 221 | } |
222 | 222 | |
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 ) ); |
233 | 224 | } |
234 | 225 | |
235 | 226 | private function linkAttribs( $target, $attribs, $options ) { |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -2140,9 +2140,9 @@ |
2141 | 2141 | } |
2142 | 2142 | |
2143 | 2143 | /** |
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. |
2147 | 2147 | */ |
2148 | 2148 | if ( strpos( $dbkey, '.' ) !== false && |
2149 | 2149 | ( $dbkey === '.' || $dbkey === '..' || |