match spam against this-\>textbox1
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 80178b6..8989b60 100644 (file)
@@ -93,8 +93,8 @@ function wfLocalUrl( $a, $q = "" )
                $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;
 }
@@ -174,7 +174,8 @@ function wfMungeToUtf8($string) {
 }
 
 # 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 ) {