$a = str_replace( "$1", $a, $wgArticlePath );
} else if ($wgScript != '' ) {
$a = "{$wgScript}?title={$a}&{$q}";
- } else { //XXX ugly hack for toplevel wikis
- $a = "/{$a}&{$q}";
+ } else { //XXX hackish solution for toplevel wikis
+ $a = "/{$a}?{$q}";
}
return $a;
}
}
# Converts a single UTF-8 character into the corresponding HTML character entity
-function wfUtf8Entity( $char ) {
+function wfUtf8Entity( $matches ) {
+ $char = $matches[0];
# Find the length
$z = ord( $char{0} );
if ( $z & 0x80 ) {