* Making the paramater a title object
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Fri, 16 Sep 2005 16:35:36 +0000 (16:35 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Fri, 16 Sep 2005 16:35:36 +0000 (16:35 +0000)
includes/SpecialLicensesearch.php

index cf2361a..4e0ce37 100644 (file)
@@ -70,7 +70,9 @@ function wfSpecialLicensesearch( $par = null ) {
        global $wgRequest, $wgTitle, $wgOut;
 
        $license = isset( $par ) ? $par : $wgRequest->getText( 'license' );
-
+       $license = Title::newFromText( $license );
+       $license = is_object( $license ) ? $license->getText() : '';
+       
        $wgOut->addHTML(
                wfElement( 'form',
                        array(
@@ -101,8 +103,7 @@ function wfSpecialLicensesearch( $par = null ) {
                wfCloseElement( 'form' )
        );
 
-       $license =  trim( $license, ' ' );
-       if ($license == '')
+       if ( $license == '' )
                return;
 
        $license = wfSpecialLicensesearchLicense( $license );