return false;
case self::AS_PARSE_ERROR:
- $wgOut->addWikiText( '<div class="error">' . $status->getWikiText() . '</div>');
+ $wgOut->addWikiText( '<div class="error">' . $status->getWikiText() . '</div>' );
return true;
case self::AS_SUCCESS_NEW_ARTICLE:
} catch ( MWContentSerializationException $ex ) {
// this can't really happen, but be nice if it does.
$msg = wfMessage( 'content-failed-to-parse', $this->contentModel, $this->contentFormat, $ex->getMessage() );
- $wgOut->addWikiText( '<div class="error">' . $msg->text() . '</div>');
+ $wgOut->addWikiText( '<div class="error">' . $msg->text() . '</div>' );
}
}
$this->showDiff();
} catch ( MWContentSerializationException $ex ) {
$msg = wfMessage( 'content-failed-to-parse', $this->contentModel, $this->contentFormat, $ex->getMessage() );
- $wgOut->addWikiText( '<div class="error">' . $msg->text() . '</div>');
+ $wgOut->addWikiText( '<div class="error">' . $msg->text() . '</div>' );
}
}
}
$row->rc_last_oldid, $row->rc_this_oldid,
$timestamp,
($row->rc_deleted & Revision::DELETED_COMMENT)
- ? wfMessage('rev-deleted-comment')->escaped()
+ ? wfMessage( 'rev-deleted-comment' )->escaped()
: $row->rc_comment,
$actiontext
);
$icon = $wgStylePath.'/common/images/'.$icon;
}
- $s = Html::openElement( 'div', array( 'class' => "mw-infobox $class") );
+ $s = Html::openElement( 'div', array( 'class' => "mw-infobox $class" ) );
$s .= Html::openElement( 'div', array( 'class' => 'mw-infobox-left' ) ).
Html::element( 'img',
* @param $alt String: Alt text for the image
* @param $link String: Override image link (optional)
*/
- function add( $title, $html = '', $alt = '', $link = '') {
+ function add( $title, $html = '', $alt = '', $link = '' ) {
if ( $title instanceof File ) {
// Old calling convention
$title = $title->getTitle();
$wrap = "<div class=\"sharedUploadNotice\">\n$1\n</div>\n";
$repo = $this->mPage->getFile()->getRepo()->getDisplayName();
- if ( $descUrl && $descText && wfMessage( 'sharedupload-desc-here' )->plain() !== '-' ) {
+ if ( $descUrl && $descText && wfMessage( 'sharedupload-desc-here' )->plain() !== '-' ) {
$out->wrapWikiMsg( $wrap, array( 'sharedupload-desc-here', $repo, $descUrl ) );
} elseif ( $descUrl && wfMessage( 'sharedupload-desc-there' )->plain() !== '-' ) {
$out->wrapWikiMsg( $wrap, array( 'sharedupload-desc-there', $repo, $descUrl ) );
$ul = Html::rawElement(
'ul',
- array( 'class' => 'mw-imagepage-redirectstofile'),
+ array( 'class' => 'mw-imagepage-redirectstofile' ),
$li
) . "\n";
$liContents = wfMessage( 'linkstoimage-redirect' )->rawParams(
while ( $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
- $this->reader->name == 'logitem') {
+ $this->reader->name == 'logitem' ) {
break;
}
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
- $this->reader->name == 'page') {
+ $this->reader->name == 'page' ) {
break;
}
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
- $this->reader->name == 'revision') {
+ $this->reader->name == 'revision' ) {
break;
}
while ( $skip ? $this->reader->next() : $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
- $this->reader->name == 'upload') {
+ $this->reader->name == 'upload' ) {
break;
}
while ( $this->reader->read() ) {
if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
- $this->reader->name == 'contributor') {
+ $this->reader->name == 'contributor' ) {
break;
}
}
if ( $script_type ) {
- if ( $script_type !== "UTF-8" && $script_type !== "ASCII") {
+ if ( $script_type !== "UTF-8" && $script_type !== "ASCII" ) {
// Quick and dirty fold down to ASCII!
$pack = array( 'UTF-16BE' => 'n*', 'UTF-16LE' => 'v*' );
$chars = unpack( $pack[$script_type], substr( $head, 2 ) );
wfDebug( __METHOD__ . ": proxy caching with ESI; {$this->mLastModified} **\n", false );
# start with a shorter timeout for initial testing
# header( 'Surrogate-Control: max-age=2678400+2678400, content="ESI/1.0"');
- $response->header( 'Surrogate-Control: max-age=' . $wgSquidMaxage . '+' . $this->mSquidMaxage . ', content="ESI/1.0"');
+ $response->header( 'Surrogate-Control: max-age=' . $wgSquidMaxage . '+' . $this->mSquidMaxage . ', content="ESI/1.0"' );
$response->header( 'Cache-Control: s-maxage=0, must-revalidate, max-age=0' );
} else {
# We'll purge the proxy cache for anons explicitly, but require end user agents
*/
static function escapeClass( $class ) {
// Convert ugly stuff to underscores and kill underscores in ugly places
- return rtrim(preg_replace(
- array('/(^[0-9\\-])|[\\x00-\\x20!"#$%&\'()*+,.\\/:;<=>?@[\\]^`{|}~]|\\xC2\\xA0/','/_+/'),
+ return rtrim( preg_replace(
+ array( '/(^[0-9\\-])|[\\x00-\\x20!"#$%&\'()*+,.\\/:;<=>?@[\\]^`{|}~]|\\xC2\\xA0/', '/_+/' ),
'_',
- $class ), '_');
+ $class ), '_' );
}
/**
$ret = Sanitizer::normalizeEntity( $matches[1] );
} elseif( $matches[2] != '' ) {
$ret = Sanitizer::decCharReference( $matches[2] );
- } elseif( $matches[3] != '' ) {
+ } elseif( $matches[3] != '' ) {
$ret = Sanitizer::hexCharReference( $matches[3] );
}
if( is_null( $ret ) ) {
return Sanitizer::decodeEntity( $matches[1] );
} elseif( $matches[2] != '' ) {
return Sanitizer::decodeChar( intval( $matches[2] ) );
- } elseif( $matches[3] != '' ) {
+ } elseif( $matches[3] != '' ) {
return Sanitizer::decodeChar( hexdec( $matches[3] ) );
}
# Last case should be an ampersand by itself
// NOTE: nested transactions are not supported, only start a transaction if none is open
if ( $this->mDb->trxLevel() === 0 ) {
- $this->mDb->begin( get_class( $this ) . '::beginTransaction' );
+ $this->mDb->begin( get_class( $this ) . '::beginTransaction' );
$this->mHasTransaction = true;
}
}
global $wgVariantArticlePath, $wgContLang;
if( $wgVariantArticlePath ) {
$router->add( $wgVariantArticlePath,
- array( 'variant' => '$2'),
+ array( 'variant' => '$2' ),
array( '$2' => $wgContLang->getVariants() )
);
}
// Also reported when ini_get('cgi.fix_pathinfo')==false
$matches['title'] = substr( $_SERVER['ORIG_PATH_INFO'], 1 );
- } elseif ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != '') ) {
+ } elseif ( isset( $_SERVER['PATH_INFO'] ) && $_SERVER['PATH_INFO'] != '' ) {
// Regular old PATH_INFO yay
$matches['title'] = substr( $_SERVER['PATH_INFO'], 1 );
}
# This must be done before any globals are set by the code
if ( ini_get( 'register_globals' ) ) {
if ( isset( $_REQUEST['GLOBALS'] ) || isset( $_FILES['GLOBALS'] ) ) {
- die( '<a href="http://www.hardened-php.net/globals-problem">$GLOBALS overwrite vulnerability</a>');
+ die( '<a href="http://www.hardened-php.net/globals-problem">$GLOBALS overwrite vulnerability</a>' );
}
$verboten = array(
'GLOBALS',
* @param $contents String: NULL to make an open tag only; '' for a contentless closed tag (default)
* @return string
*/
- public static function elementClean( $element, $attribs = array(), $contents = '') {
+ public static function elementClean( $element, $attribs = array(), $contents = '' ) {
global $wgContLang;
if( $attribs ) {
$attribs = array_map( array( 'UtfNormal', 'cleanUp' ), $attribs );
foreach( $fields as $labelmsg => $input ) {
$id = "mw-$labelmsg";
$form .= Xml::openElement( 'tr', array( 'id' => $id ) );
- $form .= Xml::tags( 'td', array( 'class' => 'mw-label'), wfMessage( $labelmsg )->parse() );
+ $form .= Xml::tags( 'td', array( 'class' => 'mw-label' ), wfMessage( $labelmsg )->parse() );
$form .= Xml::openElement( 'td', array( 'class' => 'mw-input' ) ) . $input . Xml::closeElement( 'td' );
$form .= Xml::closeElement( 'tr' );
}
$this->addFields( LocalFile::selectFields() );
$ascendingOrder = true;
- if ( $params['dir'] == 'descending' || $params['dir'] == 'older') {
+ if ( $params['dir'] == 'descending' || $params['dir'] == 'older' ) {
$ascendingOrder = false;
}
$lang = $langObj->getCode();
$customisedMessages = AllmessagesTablePager::getCustomisedStatuses(
- array_map( array( $langObj, 'ucfirst'), $messages_target ), $lang, $lang != $wgContLang->getCode() );
+ array_map( array( $langObj, 'ucfirst' ), $messages_target ), $lang, $lang != $wgContLang->getCode() );
$customised = $params['customised'] === 'modified';
}
// Ignore namespace and unique due to inability to know whether they were purposely set
foreach( array( 'from', 'to', 'prefix', /*'namespace',*/ 'continue', /*'unique'*/ ) as $p ) {
if ( !is_null( $params[$p] ) ) {
- $this->dieUsage( "The '{$p}' parameter cannot be used in modes 1 or 2", 'badparams');
+ $this->dieUsage( "The '{$p}' parameter cannot be used in modes 1 or 2", 'badparams' );
}
}
} else {
foreach( array( 'start', 'end' ) as $p ) {
if ( !is_null( $params[$p] ) ) {
- $this->dieUsage( "The {$p} parameter cannot be used in mode 3", 'badparams');
+ $this->dieUsage( "The {$p} parameter cannot be used in mode 3", 'badparams' );
}
}
}
'unblock' => array( 'ApiQueryInfo', 'getUnblockToken' ),
'email' => array( 'ApiQueryInfo', 'getEmailToken' ),
'import' => array( 'ApiQueryInfo', 'getImportToken' ),
- 'watch' => array( 'ApiQueryInfo', 'getWatchToken'),
+ 'watch' => array( 'ApiQueryInfo', 'getWatchToken' ),
);
wfRunHooks( 'APIQueryInfoTokens', array( &$this->tokenFunctions ) );
return $this->tokenFunctions;
public function appendExtensionTags( $property ) {
global $wgParser;
$wgParser->firstCallInit();
- $tags = array_map( array( $this, 'formatParserTags'), $wgParser->getTags() );
+ $tags = array_map( array( $this, 'formatParserTags' ), $wgParser->getTags() );
$this->getResult()->setIndexedTagName( $tags, 't' );
return $this->getResult()->addValue( 'query', $property, $tags );
}
$result = $this->getResult();
if ( !$params['filekey'] && !$params['sessionkey'] ) {
- $this->dieUsage( "One of filekey or sessionkey must be supplied", 'nofilekey');
+ $this->dieUsage( "One of filekey or sessionkey must be supplied", 'nofilekey' );
}
// Alias sessionkey to filekey, but give an existing filekey precedence.
$fileKey = $stashFile->getFileKey();
} catch ( MWException $e ) {
$message = 'Stashing temporary file failed: ' . get_class( $e ) . ' ' . $e->getMessage();
- wfDebug( __METHOD__ . ' ' . $message . "\n");
+ wfDebug( __METHOD__ . ' ' . $message . "\n" );
throw new MWException( $message );
}
return $fileKey;
protected function checkAsyncDownloadEnabled() {
global $wgAllowAsyncCopyUploads;
if ( !$wgAllowAsyncCopyUploads ) {
- $this->dieUsage( 'Asynchronous copy uploads disabled', 'asynccopyuploaddisabled');
+ $this->dieUsage( 'Asynchronous copy uploads disabled', 'asynccopyuploaddisabled' );
}
}
$this->checkCacheDirs(); // build parent dir
if ( !file_put_contents( $this->cachePath(), $text, LOCK_EX ) ) {
- wfDebug( __METHOD__ . "() failed saving ". $this->cachePath() . "\n");
+ wfDebug( __METHOD__ . "() failed saving ". $this->cachePath() . "\n" );
$this->mCached = null;
return false;
}
public function loadFromFileCache( IContextSource $context ) {
global $wgMimeType, $wgLanguageCode;
- wfDebug( __METHOD__ . "()\n");
+ wfDebug( __METHOD__ . "()\n" );
$filename = $this->cachePath();
$context->getOutput()->sendCacheControl();
// Also delete cached sidebar... just in case it is affected
$codes = array( $code );
- if ( $code === 'en' ) {
+ if ( $code === 'en' ) {
// Delete all sidebars, like for example on action=purge on the
// sidebar messages
$codes = array_keys( Language::fetchLanguageNames() );
*
* @since 1.21
*/
- public function replaceSection( $section, Content $with, $sectionTitle = '' ) {
+ public function replaceSection( $section, Content $with, $sectionTitle = '' ) {
return null;
}
* @param $sectionTitle String: new section's subject, only if $section is 'new'
* @return string Complete article text, or null if error
*/
- public function replaceSection( $section, Content $with, $sectionTitle = '' );
+ public function replaceSection( $section, Content $with, $sectionTitle = '' );
/**
* Returns a Content object with pre-save transformations applied (or this
} else {
if( isset( $knownThumbUrls[$sizekey] ) ) {
wfDebug( __METHOD__ . ': Got thumburl from local cache: ' .
- "{$knownThumbUrls[$sizekey]} \n");
+ "{$knownThumbUrls[$sizekey]} \n" );
return $knownThumbUrls[$sizekey];
}
/* This size is not yet known */
'fa_sha1' ),
$conds,
__METHOD__,
- array( 'ORDER BY' => 'fa_timestamp DESC')
+ array( 'ORDER BY' => 'fa_timestamp DESC' )
);
if ( !$row ) {
// this revision does not exist?
$text = preg_replace( '/^\t\t/m', '::', $text );
$text = preg_replace( '/^\t/m', ':', $text );
// turn (bug nnnn) into links
- $text = preg_replace_callback('/bug (\d+)/', array( $this, 'replaceBugLinks' ), $text );
+ $text = preg_replace_callback( '/bug (\d+)/', array( $this, 'replaceBugLinks' ), $text );
// add links to manual to every global variable mentioned
- $text = preg_replace_callback('/(\$wg[a-z0-9_]+)/i', array( $this, 'replaceConfigLinks' ), $text );
+ $text = preg_replace_callback( '/(\$wg[a-z0-9_]+)/i', array( $this, 'replaceConfigLinks' ), $text );
return $text;
}
$this->startForm();
$this->addHTML( "<ul>" );
$results = $this->parent->performInstallation(
- array( $this, 'startStage'),
+ array( $this, 'startStage' ),
array( $this, 'endStage' )
);
$this->addHTML( "</ul>" );
}
public function startStage( $step ) {
- $this->addHTML( "<li>" . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis')->escaped() );
+ $this->addHTML( "<li>" . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis' )->escaped() );
if ( $step == 'extension-tables' ) {
$this->startLiveBox();
}
} elseif ( $page != '' ) {
$urlParam['page'] = $page;
}
- if ( $user != '')
+ if ( $user != '' )
$urlParam['user'] = $user;
if ( !is_array( $types ) ) # Make it an array, if it isn't
$types = array( $types );
$this->exifPropToOrd( 'SceneType' );
$this->charCodeString( 'UserComment' );
- $this->charCodeString( 'GPSProcessingMethod');
+ $this->charCodeString( 'GPSProcessingMethod' );
$this->charCodeString( 'GPSAreaInformation' );
//ComponentsConfiguration should really be an array instead of a string...
}
if ( $action === true ) {
- wfDebugLog( $this->log, "$class::$fname: accepted: '$in' (type: $type)\n");
+ wfDebugLog( $this->log, "$class::$fname: accepted: '$in' (type: $type)\n" );
} elseif ( $action === false ) {
- wfDebugLog( $this->log, "$class::$fname: rejected: '$in' (type: $type)\n");
+ wfDebugLog( $this->log, "$class::$fname: rejected: '$in' (type: $type)\n" );
} elseif ( $action === null ) {
- wfDebugLog( $this->log, "$class::$fname: input was: '$in' (type: $type)\n");
+ wfDebugLog( $this->log, "$class::$fname: input was: '$in' (type: $type)\n" );
} else {
- wfDebugLog( $this->log, "$class::$fname: $action (type: $type; content: '$in')\n");
+ wfDebugLog( $this->log, "$class::$fname: $action (type: $type; content: '$in')\n" );
}
}
if ( $metadata === self::OLD_BROKEN_FILE ) {
# Old special value indicating that there is no EXIF data in the file.
# or that there was an error well extracting the metadata.
- wfDebug( __METHOD__ . ": back-compat version\n");
+ wfDebug( __METHOD__ . ": back-compat version\n" );
return self::METADATA_COMPATIBLE;
}
if ( $metadata === self::BROKEN_FILE ) {
$dateOnly = true;
}
- if ( !( preg_match('/\d\d\d\d\d\d[-+]\d\d\d\d/', $time)
- && preg_match('/\d\d\d\d\d\d\d\d/', $date)
+ if ( !( preg_match( '/\d\d\d\d\d\d[-+]\d\d\d\d/', $time )
+ && preg_match( '/\d\d\d\d\d\d\d\d/', $date )
&& substr( $date, 0, 4 ) !== '0000'
&& substr( $date, 4, 2 ) !== '00'
&& substr( $date, 6, 2 ) !== '00'
// for example: the date 00000400 means the photo was taken in
// April, but the year and day is unknown. We don't process these
// types of incomplete dates atm.
- wfDebugLog( 'iptc', "IPTC: invalid time ( $time ) or date ( $date )");
+ wfDebugLog( 'iptc', "IPTC: invalid time ( $time ) or date ( $date )" );
return null;
}
static function getHandler( $type ) {
global $wgMediaHandlers;
if ( !isset( $wgMediaHandlers[$type] ) ) {
- wfDebug( __METHOD__ . ": no handler found for $type.\n");
+ wfDebug( __METHOD__ . ": no handler found for $type.\n" );
return false;
}
$class = $wgMediaHandlers[$type];
if ( $elm === self::NS_RDF . ' RDF'
|| $elm === 'adobe:ns:meta/ xmpmeta'
- || $elm === 'adobe:ns:meta/ xapmeta')
+ || $elm === 'adobe:ns:meta/ xapmeta' )
{
/* ignore. */
return;
if ( count( $this->mode ) === 0 ) {
// This should not happen.
- throw new MWException('Error extracting XMP, '
+ throw new MWException( 'Error extracting XMP, '
. "encountered <$elm> with no mode" );
}
// We do < 0 here instead of < -1 here, since
// the values between 0 and -1 are also illegal
// as -1 is meant as a special reject rating.
- wfDebugLog( 'XMP', __METHOD__ . " Rating too low, setting to -1 (Rejected)");
+ wfDebugLog( 'XMP', __METHOD__ . " Rating too low, setting to -1 (Rejected)" );
$val = '-1';
return;
}
if ( $nVal > 5 ) {
- wfDebugLog( 'XMP', __METHOD__ . " Rating too high, setting to 5");
+ wfDebugLog( 'XMP', __METHOD__ . " Rating too high, setting to 5" );
$val = '5';
return;
}
}
fclose( $in );
-$out = fopen("Utf8Case.php", "wt");
+$out = fopen( "Utf8Case.php", "wt" );
if( $out ) {
$outUpperChars = escapeArray( $wikiUpperChars );
$outLowerChars = escapeArray( $wikiLowerChars );
* @return ObjectCache
*/
static function newAccelerator( $params ) {
- if ( function_exists( 'apc_fetch') ) {
+ if ( function_exists( 'apc_fetch' ) ) {
$id = 'apc';
} elseif( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) {
$id = 'xcache';
* @param $prefix String [optional]
* @return string
*/
- function makeHolder( $nt, $text = '', $query = array(), $trail = '', $prefix = '' ) {
+ function makeHolder( $nt, $text = '', $query = array(), $trail = '', $prefix = '' ) {
wfProfileIn( __METHOD__ );
if ( !is_object( $nt ) ) {
# Fail gracefully
if ( $firstspace == -1 ) {
$firstspace = $i;
}
- } elseif ( $x2 === ' ') {
+ } elseif ( $x2 === ' ' ) {
if ( $firstsingleletterword == -1 ) {
$firstsingleletterword = $i;
}
$output .= $this->nextItem( substr( $prefix, -1 ) );
$paragraphStack = false;
- if ( substr( $prefix, -1 ) === ';') {
+ if ( substr( $prefix, -1 ) === ';' ) {
# The one nasty exception: definition lists work like this:
# ; title : definition text
# So we check for : in the remainder text to split up the
wfProfileIn( __METHOD__ . "-paragraph" );
# No prefix (not in list)--go to paragraph mode
# XXX: use a stack for nestable elements like span, table and div
- $openmatch = preg_match('/(?:<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<dl|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
+ $openmatch = preg_match( '/(?:<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<dl|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
$closematch = preg_match(
'/(?:<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|'.
'<td|<th|<\\/?div|<hr|<\\/pre|<\\/p|'.$this->mUniqPrefix . '-pre|<\\/li|<\\/ul|<\\/ol|<\\/dl|<\\/?center)/iS', $t );
$sectionIndex = false;
$numbering = '';
$markerMatches = array();
- if ( preg_match("/^$markerRegex/", $headline, $markerMatches ) ) {
+ if ( preg_match( "/^$markerRegex/", $headline, $markerMatches ) ) {
$serial = $markerMatches[1];
list( $titleText, $sectionIndex ) = $this->mHeadings[$serial];
$isTemplate = ( $titleText != $baseTitleText );
} else { # Inline image
if ( !isset( $params['frame']['alt'] ) ) {
# No alt text, use the "caption" for the alt text
- if ( $caption !== '') {
+ if ( $caption !== '' ) {
$params['frame']['alt'] = $this->stripAltText( $caption, $holders );
} else {
# No caption, fall back to using the filename for the
$page = $request->getText( 'pages' );
$nsindex = $request->getText( 'nsindex', '' );
- if ( strval( $nsindex ) !== '' ) {
+ if ( strval( $nsindex ) !== '' ) {
/**
* Same implementation as above, so same @todo
*/
$options['GROUP BY'] = $this->creationSort ? 'user_id' : 'user_name';
$query = array(
- 'tables' => array( 'user', 'user_groups', 'ipblocks'),
+ 'tables' => array( 'user', 'user_groups', 'ipblocks' ),
'fields' => array(
'user_name' => $this->creationSort ? 'MAX(user_name)' : 'user_name',
'user_id' => $this->creationSort ? 'user_id' : 'MAX(user_id)',
'tables' => array( 'page' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
- 'value' => 'page_counter'),
+ 'value' => 'page_counter' ),
'conds' => array( 'page_is_redirect' => 0,
'page_namespace' => MWNamespace::getContentNamespaces() ) );
}
'hideredirects' => $hideredirects,
);
- if( $namespace || ($prefix == '')) {
+ if( $namespace || $prefix == '' ) {
// Keep the namespace even if it's 0 for empty prefixes.
// This tells us we're not just a holdover from old links.
$query['namespace'] = $namespace;
# Should advanced UI be used?
$this->searchAdvanced = ($this->profile === 'advanced');
$out = $this->getOutput();
- if( strval( $term ) !== '' ) {
+ if( strval( $term ) !== '' ) {
$out->setPageTitle( $this->msg( 'searchresults' ) );
$out->setHTMLTitle( $this->msg( 'pagetitle' )->rawParams(
$this->msg( 'searchresults-title' )->rawParams( $term )->text()
global $wgVerifyMimeType;
wfProfileIn( __METHOD__ );
if ( $wgVerifyMimeType ) {
- wfDebug ( "\n\nmime: <$mime> extension: <{$this->mFinalExtension}>\n\n");
+ wfDebug ( "\n\nmime: <$mime> extension: <{$this->mFinalExtension}>\n\n" );
global $wgMimeTypeBlacklist;
if ( $this->checkFileExtension( $mime, $wgMimeTypeBlacklist ) ) {
wfProfileOut( __METHOD__ );