From 38906af0e87c7fcebfdb77fa5a2b73c5594def71 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 16 Sep 2005 16:35:36 +0000 Subject: [PATCH] * Making the paramater a title object --- includes/SpecialLicensesearch.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/SpecialLicensesearch.php b/includes/SpecialLicensesearch.php index cf2361a669..4e0ce370fc 100644 --- a/includes/SpecialLicensesearch.php +++ b/includes/SpecialLicensesearch.php @@ -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 ); -- 2.20.1