# Pre-fill content with error message so that if something
# fails we'll have something telling us what we intended.
//XXX: this isn't page content but a UI message. horrible.
- $this->mContentObject = new MessageContent( 'missing-revision', array( $oldid ), array() ) ;
+ $this->mContentObject = new MessageContent( 'missing-revision', array( $oldid ), array() );
if ( $oldid ) {
# $this->mRevision might already be fetched by getOldIDFromRequest()
'oldid' => $oldid
) + $extraParams
);
- $prev = $this->getTitle()->getPreviousRevisionID( $oldid ) ;
+ $prev = $this->getTitle()->getPreviousRevisionID( $oldid );
$prevlink = $prev
? Linker::linkKnown(
$this->getTitle(),
if ( $this->mTriedSave && !$this->mTokenOk ) {
if ( $this->mTokenOkExceptSuffix ) {
- $note = wfMessage( 'token_suffix_mismatch' )->plain() ;
+ $note = wfMessage( 'token_suffix_mismatch' )->plain();
} else {
- $note = wfMessage( 'session_fail_preview' )->plain() ;
+ $note = wfMessage( 'session_fail_preview' )->plain();
}
} elseif ( $this->incompleteForm ) {
- $note = wfMessage( 'edit_form_incomplete' )->plain() ;
+ $note = wfMessage( 'edit_form_incomplete' )->plain();
} else {
$note = wfMessage( 'previewnote' )->plain() .
' [[#' . self::EDITFORM_ID . '|' . $wgLang->getArrow() . ' ' . wfMessage( 'continue-editing' )->text() . ']]';
* @ingroup SpecialPage Dump
*/
class WikiExporter {
- var $list_authors = false ; # Return distinct author list (when not returning full history)
- var $author_list = "" ;
+ var $list_authors = false; # Return distinct author list (when not returning full history)
+ var $author_list = "";
var $dumpUploads = false;
var $dumpUploadFileContents = false;
protected static function getDiffLink( Title $title, $newid, $oldid = null ) {
$queryParameters = ($oldid == null)
? "diff={$newid}"
- : "diff={$newid}&oldid={$oldid}" ;
+ : "diff={$newid}&oldid={$oldid}";
$diffUrl = $title->getFullUrl( $queryParameters );
$diffLink = Html::element( 'a', array( 'href' => $diffUrl ),
if ( Http::isLocalURL( $this->url ) || $this->noProxy ) {
$this->proxy = '';
} elseif ( $wgHTTPProxy ) {
- $this->proxy = $wgHTTPProxy ;
+ $this->proxy = $wgHTTPProxy;
} elseif ( getenv( "http_proxy" ) ) {
$this->proxy = getenv( "http_proxy" );
}
array(),
array( 'known', 'noclasses' )
) . "<br />\n" :
- '' ;
+ '';
# ATTENTION: The newline after <div class="gallerytext"> is needed to accommodate htmltidy which
# in version 4.8.6 generated crackpot html in its absence, see:
if ( $wgEnableEmail ) {
$helpMessages[] = $wgEmailConfirmToEdit
? 'prefs-help-email-required'
- : 'prefs-help-email' ;
+ : 'prefs-help-email';
if( $wgEnableUserEmail ) {
// additional messages when users can send email to each other
* @var Title
*/
var $mMovedToTitle = false;
- var $numberofWatchingusers = 0 ; # Dummy to prevent error message in SpecialRecentchangeslinked
+ var $numberofWatchingusers = 0; # Dummy to prevent error message in SpecialRecentchangeslinked
var $notificationtimestamp;
# Factory methods
$trail = "curid=" . (int)( $this->mAttribs['rc_cur_id'] ) .
"&oldid=" . (int)( $this->mAttribs['rc_last_oldid'] );
if ( $forceCur ) {
- $trail .= '&diff=0' ;
+ $trail .= '&diff=0';
} else {
$trail .= '&diff=' . (int)( $this->mAttribs['rc_this_oldid'] );
}
if ( $szdiff < -500 ) {
$szdiff = "\002$szdiff\002";
} elseif ( $szdiff >= 0 ) {
- $szdiff = '+' . $szdiff ;
+ $szdiff = '+' . $szdiff;
}
// @todo i18n with parentheses in content language?
- $szdiff = '(' . $szdiff . ')' ;
+ $szdiff = '(' . $szdiff . ')';
} else {
$szdiff = '';
}
// Please note strings below are enclosed in brackets [], this make the
// hyphen "-" a range indicator. Hence it is double backslashed below.
// See bug 26948
- $rfc5322_atext = "a-z0-9!#$%&'*+\\-\/=?^_`{|}~" ;
- $rfc1034_ldh_str = "a-z0-9\\-" ;
+ $rfc5322_atext = "a-z0-9!#$%&'*+\\-\/=?^_`{|}~";
+ $rfc1034_ldh_str = "a-z0-9\\-";
$HTML5_email_regexp = "/
^ # start of string
[$rfc1034_ldh_str]+ # First domain part
(\\.[$rfc1034_ldh_str]+)* # Following part prefixed with a dot
$ # End of string
- /ix" ; // case Insensitive, eXtended
+ /ix"; // case Insensitive, eXtended
return (bool) preg_match( $HTML5_email_regexp, $addr );
}
if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) {
# 'view' is assumed the default action path everywhere in the code
# but is rarely filled in $wgActionPaths
- $wgActionPaths['view'] = $wgArticlePath ;
+ $wgActionPaths['view'] = $wgArticlePath;
}
if ( $wgStylePath === false ) $wgStylePath = "$wgScriptPath/skins";
$t->mDbkeyform = str_replace( ' ', '_', $filteredText );
$t->mDefaultNamespace = $defaultNamespace;
- static $cachedcount = 0 ;
+ static $cachedcount = 0;
if ( $t->secureAndSplit() ) {
if ( $defaultNamespace == NS_MAIN ) {
if ( $cachedcount >= self::CACHE_MAX ) {
$oldid = $this->page->getLatest();
}
$prev = $this->getTitle()->getPreviousRevisionId( $oldid );
- $oldid = $prev ? $prev : -1 ;
+ $oldid = $prev ? $prev : -1;
break;
case 'cur':
$oldid = 0;
if ( $rev->isCurrent() ) {
// May get from/save to parser cache
$p_result = $this->getParsedContent( $pageObj, $popts,
- $pageid, isset( $prop['wikitext'] ) ) ;
+ $pageid, isset( $prop['wikitext'] ) );
} else { // This is an old revision, so get the text differently
$this->content = $rev->getContent( Revision::FOR_THIS_USER, $this->getUser() );
// Potentially cached
$p_result = $this->getParsedContent( $pageObj, $popts, $pageid,
- isset( $prop['wikitext'] ) ) ;
+ isset( $prop['wikitext'] ) );
}
} else { // Not $oldid, $pageid, $page. Hence based on $text
$titleObj = Title::newFromText( $title );
$blurlArr = $title->getSquidURLs();
if ( $res->numRows() <= $wgMaxSquidPurgeTitles ) {
foreach ( $res as $BL ) {
- $tobj = Title::makeTitle( $BL->page_namespace, $BL->page_title ) ;
+ $tobj = Title::makeTitle( $BL->page_namespace, $BL->page_title );
$blurlArr[] = $tobj->getInternalURL();
}
}
// $this->limitResult();
if ( preg_match( '/\bLIMIT\s*/i', $sql ) ) {
// massage LIMIT -> TopN
- $sql = $this->LimitToTopN( $sql ) ;
+ $sql = $this->LimitToTopN( $sql );
}
// MSSQL doesn't have EXTRACT(epoch FROM XXX)
if ( $k == $identity ) {
if( !is_null($v) ) {
// there is a value being passed to us, we need to turn on and off inserted identity
- $sqlPre = "SET IDENTITY_INSERT $table ON;" ;
+ $sqlPre = "SET IDENTITY_INSERT $table ON;";
$sqlPost = ";SET IDENTITY_INSERT $table OFF;";
} else {
function unionQueries( $sqls, $all ) {
$glue = ' UNION ALL ';
- return 'SELECT * ' . ( $all ? '':'/* UNION_UNIQUE */ ' ) . 'FROM (' . implode( $glue, $sqls ) . ')' ;
+ return 'SELECT * ' . ( $all ? '':'/* UNION_UNIQUE */ ' ) . 'FROM (' . implode( $glue, $sqls ) . ')';
}
function wasDeadlock() {
// Directory where file should be
// This happened occasionally due to broken migration code in 1.5
// Rename to broken-*
- for ( $i = 0; $i < 100 ; $i++ ) {
+ for ( $i = 0; $i < 100; $i++ ) {
$broken = $this->repo->getZonePath( 'public' ) . "/broken-$i-$thumbName";
if ( !file_exists( $broken ) ) {
rename( $thumbPath, $broken );
$parameters = $entry->getParameters();
// @see LogPage::actionText()
// Text of title the action is aimed at.
- $target = $entry->getTarget()->getPrefixedText() ;
+ $target = $entry->getTarget()->getPrefixedText();
$text = null;
switch( $entry->getType() ) {
case 'move':
# Text layer
if ( isset( $wgDjvuTxt ) ) {
wfProfileIn( 'djvutxt' );
- $cmd = wfEscapeShellArg( $wgDjvuTxt ) . ' --detail=page ' . wfEscapeShellArg( $this->mFilename ) ;
+ $cmd = wfEscapeShellArg( $wgDjvuTxt ) . ' --detail=page ' . wfEscapeShellArg( $this->mFilename );
wfDebug( __METHOD__ . ": $cmd\n" );
$retval = '';
$txt = wfShellExec( $cmd, $retval, array(), array( 'memory' => self::DJVUTXT_MEMORY_LIMIT ) );
$txt = preg_replace_callback( $reg, array( $this, 'pageTextCallback' ), $txt );
$txt = "<DjVuTxt>\n<HEAD></HEAD>\n<BODY>\n" . $txt . "</BODY>\n</DjVuTxt>\n";
$xml = preg_replace( "/<DjVuXML>/", "<mw-djvu><DjVuXML>", $xml, 1 );
- $xml = $xml . $txt. '</mw-djvu>' ;
+ $xml = $xml . $txt. '</mw-djvu>';
}
}
wfProfileOut( __METHOD__ );
if ( $subTag != 'fired' && $subValue == 0 ) {
continue;
}
- $fullTag = $tag . '-' . $subTag ;
+ $fullTag = $tag . '-' . $subTag;
$flashMsgs[] = self::msg( $fullTag, $subValue );
}
$val = $wgLang->commaList( $flashMsgs );
$out .= "</tr>\n";
}
if ( !array_pop( $has_opened_tr ) ) {
- $out .= "<tr><td></td></tr>\n" ;
+ $out .= "<tr><td></td></tr>\n";
}
$out .= "</table>\n";
# Hook to suspend the parser in this state
if ( !wfRunHooks( 'ParserBeforeInternalParse', array( &$this, &$text, &$this->mStripState ) ) ) {
wfProfileOut( __METHOD__ );
- return $text ;
+ return $text;
}
# if $frame is provided, then use $frame for replacing any variables
wfProfileOut( __METHOD__ . '-setup' );
# Loop for each link
- for ( ; $line !== false && $line !== null ; $a->next(), $line = $a->current() ) {
+ for ( ; $line !== false && $line !== null; $a->next(), $line = $a->current() ) {
# Check for excessive memory usage
if ( $holders->isBig() ) {
# Too big
}
$trail = "";
} else { # Invalid form; output directly
- $s .= $prefix . '[[' . $line ;
+ $s .= $prefix . '[[' . $line;
wfProfileOut( __METHOD__ . "-e1" );
continue;
}
# PROTO: where PROTO is a valid URL protocol; these
# should be external links.
if ( preg_match( '/^(?i:' . $this->mUrlProtocols . ')/', $m[1] ) ) {
- $s .= $prefix . '[[' . $line ;
+ $s .= $prefix . '[[' . $line;
wfProfileOut( __METHOD__ . "-misc" );
continue;
}
if ( in_array( 'stubthreshold', $forOptions ) ) {
$confstr .= '!' . $this->mStubThreshold;
} else {
- $confstr .= '!*' ;
+ $confstr .= '!*';
}
if ( in_array( 'dateformat', $forOptions ) ) {
if ( $pageName !== false ) {
$pageName = $this->toDBKey( trim( $pageName ) );
- $url = str_replace( '$1', wfUrlencode( $pageName ), $url ) ;
+ $url = str_replace( '$1', wfUrlencode( $pageName ), $url );
}
return $url;
}
if ( $pageName !== false ) {
- $url = str_replace( '$1', rawurlencode( $pageName ), $url ) ;
+ $url = str_replace( '$1', rawurlencode( $pageName ), $url );
}
return $url;
( $this->opts['target'] ? array() : array( 'autofocus' )
)
) . ' '
- ) ;
+ );
$namespaceSelection =
Xml::tags( 'td', array( 'class' => 'mw-label' ),
array( 'title' => $this->msg( 'tooltip-namespace_association' )->text(), 'class' => 'mw-input' )
) . ' '
)
- ) ;
+ );
if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
$deletedOnlyCheck = Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
$this->msg( 'sp-contributions-submit' )->text(),
array( 'class' => 'mw-submit' )
)
- ) ;
+ );
$form .=
Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() ) .
$list_authors = $request->getCheck( 'listauthors' );
if ( !$this->curonly || !$wgExportAllowListContributors ) {
- $list_authors = false ;
+ $list_authors = false;
}
if ( $this->doExport ) {
);
}
$out .= Xml::closeElement( 'ul' );
- $out .= Xml::closeElement( 'div' ) ;
+ $out .= Xml::closeElement( 'div' );
// Results-info
if ( $resultsShown > 0 ) {
if( $index === null ) {
$index = $this->getChunkIndex();
}
- return $this->mFileKey . '.' . $index ;
+ return $this->mFileKey . '.' . $index;
}
}