$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 ) {
}
/**
- * 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 === '..' ||