Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/58662
Change subject: phpcs: Fix Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore
violations
......................................................................
phpcs: Fix Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore violations
ERROR: Closing brace must be on a line by itself
Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore
For empty function is serves also as a visual distinction
between there not being a scope block / function body and there
being an empty function body.
function foo();
function bar() {
}
Change-Id: I0310ec379c6d41cc7d483671994d027a49f32164
---
M includes/Action.php
M includes/Block.php
M includes/Category.php
M includes/Exception.php
M includes/db/Database.php
M includes/db/DatabaseMssql.php
M includes/db/DatabasePostgres.php
M includes/db/DatabaseUtility.php
M includes/db/LBFactory.php
M includes/installer/WebInstallerPage.php
M includes/templates/Usercreate.php
M includes/templates/Userlogin.php
M includes/upload/UploadBase.php
M includes/upload/UploadFromChunks.php
M includes/upload/UploadFromUrl.php
15 files changed, 285 insertions(+), 124 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/62/58662/1
diff --git a/includes/Action.php b/includes/Action.php
index 2e0c88b..dff3803 100644
--- a/includes/Action.php
+++ b/includes/Action.php
@@ -374,18 +374,23 @@
* Add pre- or post-text to the form
* @return String HTML which will be sent to $form->addPreText()
*/
- protected function preText() { return ''; }
+ protected function preText() {
+ return '';
+ }
/**
* @return string
*/
- protected function postText() { return ''; }
+ protected function postText() {
+ return '';
+ }
/**
* Play with the HTMLForm if you need to more substantially
* @param $form HTMLForm
*/
- protected function alterForm( HTMLForm $form ) {}
+ protected function alterForm( HTMLForm $form ) {
+ }
/**
* Get the HTMLForm to control behavior
diff --git a/includes/Block.php b/includes/Block.php
index 4da0f8f..1d98a29 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -801,7 +801,8 @@
case self::TYPE_RANGE:
list( $start, /*...*/ ) = IP::parseRange(
$this->target );
return $start;
- default: throw new MWException( "Block with invalid
type" );
+ default:
+ throw new MWException( "Block with invalid
type" );
}
}
@@ -819,7 +820,8 @@
case self::TYPE_RANGE:
list( /*...*/, $end ) = IP::parseRange(
$this->target );
return $end;
- default: throw new MWException( "Block with invalid
type" );
+ default:
+ throw new MWException( "Block with invalid
type" );
}
}
diff --git a/includes/Category.php b/includes/Category.php
index 868d6c4..126b8fe 100644
--- a/includes/Category.php
+++ b/includes/Category.php
@@ -40,7 +40,8 @@
/** Counts of membership (cat_pages, cat_subcats, cat_files) */
private $mPages = null, $mSubcats = null, $mFiles = null;
- private function __construct() { }
+ private function __construct() {
+ }
/**
* Set up all member variables using a database query.
diff --git a/includes/Exception.php b/includes/Exception.php
index 21952bb..661d03d 100644
--- a/includes/Exception.php
+++ b/includes/Exception.php
@@ -721,8 +721,10 @@
// Final cleanup
if ( $wgFullyInitialised ) {
try {
- wfLogProfilingData(); // uses $wgRequest, hence
the $wgFullyInitialised condition
- } catch ( Exception $e ) {}
+ // uses $wgRequest, hence the
$wgFullyInitialised condition
+ wfLogProfilingData();
+ } catch ( Exception $e ) {
+ }
}
// Exit value should be nonzero for the benefit of shell jobs
diff --git a/includes/db/Database.php b/includes/db/Database.php
index 9db2ada..2142232 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -1094,17 +1094,22 @@
* @return String
*/
protected function fillPreparedArg( $matches ) {
- switch( $matches[1] ) {
- case '\\?': return '?';
- case '\\!': return '!';
- case '\\&': return '&';
+ switch ( $matches[1] ) {
+ case '\\?':
+ return '?';
+ case '\\!':
+ return '!';
+ case '\\&':
+ return '&';
}
list( /* $n */, $arg ) = each( $this->preparedArgs );
- switch( $matches[1] ) {
- case '?': return $this->addQuotes( $arg );
- case '!': return $arg;
+ switch ( $matches[1] ) {
+ case '?':
+ return $this->addQuotes( $arg );
+ case '!':
+ return $arg;
case '&':
# return $this->addQuotes( file_get_contents(
$arg ) );
throw new DBUnexpectedError( $this, '& mode is
not implemented. If it\'s really needed, uncomment the line above.' );
@@ -1120,7 +1125,8 @@
*
* @param $res Mixed: A SQL result
*/
- public function freeResult( $res ) {}
+ public function freeResult( $res ) {
+ }
/**
* A SELECT wrapper which returns a single field from a single result
row.
@@ -1140,8 +1146,8 @@
* @return bool|mixed The value from the field, or false on failure.
*/
public function selectField( $table, $var, $cond = '', $fname =
'DatabaseBase::selectField',
- $options = array() )
- {
+ $options = array()
+ ) {
if ( !is_array( $options ) ) {
$options = array( $options );
}
@@ -2991,7 +2997,8 @@
$this->clearFlag( DBO_TRX ); // make
each query its own transaction
$callback();
$this->setFlag( $autoTrx ? DBO_TRX : 0
); // restore automatic begin()
- } catch ( Exception $e ) {}
+ } catch ( Exception $e ) {
+ }
}
} while ( count( $this->mTrxIdleCallbacks ) );
@@ -3028,7 +3035,8 @@
// log it if $wgDebugDBTransactions is enabled.
if ( $this->mTrxDoneWrites &&
$wgDebugDBTransactions ) {
wfDebug( "$fname: Automatic transaction
with writes in progress" .
- " (from {$this->mTrxFname}),
performing implicit commit!\n" );
+ " (from {$this->mTrxFname}),
performing implicit commit!\n"
+ );
}
}
@@ -3142,8 +3150,8 @@
* @return Boolean: true if operation was successful
*/
public function duplicateTableStructure( $oldName, $newName, $temporary
= false,
- $fname = 'DatabaseBase::duplicateTableStructure' )
- {
+ $fname = 'DatabaseBase::duplicateTableStructure'
+ ) {
throw new MWException(
'DatabaseBase::duplicateTableStructure is not
implemented in descendant class' );
}
@@ -3288,7 +3296,8 @@
* @param $options Array
* @return void
*/
- public function setSessionOptions( array $options ) {}
+ public function setSessionOptions( array $options ) {
+ }
/**
* Read and execute SQL commands from a file.
diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php
index dde3af5..82b0e5a 100644
--- a/includes/db/DatabaseMssql.php
+++ b/includes/db/DatabaseMssql.php
@@ -37,24 +37,31 @@
function cascadingDeletes() {
return true;
}
+
function cleanupTriggers() {
return true;
}
+
function strictIPs() {
return true;
}
+
function realTimestamps() {
return true;
}
+
function implicitGroupby() {
return false;
}
+
function implicitOrderby() {
return false;
}
+
function functionalIndexes() {
return true;
}
+
function unionSupportsOrderAndLimit() {
return false;
}
@@ -1093,37 +1100,96 @@
$i++;
}
// http://msdn.microsoft.com/en-us/library/cc296183.aspx
contains type table
- switch( $intType ) {
- case SQLSRV_SQLTYPE_BIGINT: $strType =
'bigint'; break;
- case SQLSRV_SQLTYPE_BINARY: $strType =
'binary'; break;
- case SQLSRV_SQLTYPE_BIT:
$strType = 'bit'; break;
- case SQLSRV_SQLTYPE_CHAR:
$strType = 'char'; break;
- case SQLSRV_SQLTYPE_DATETIME: $strType =
'datetime'; break;
- case SQLSRV_SQLTYPE_DECIMAL/*($precision, $scale)*/:
$strType = 'decimal'; break;
- case SQLSRV_SQLTYPE_FLOAT:
$strType = 'float'; break;
- case SQLSRV_SQLTYPE_IMAGE:
$strType = 'image'; break;
- case SQLSRV_SQLTYPE_INT:
$strType = 'int'; break;
- case SQLSRV_SQLTYPE_MONEY:
$strType = 'money'; break;
- case SQLSRV_SQLTYPE_NCHAR/*($charCount)*/: $strType =
'nchar'; break;
- case SQLSRV_SQLTYPE_NUMERIC/*($precision, $scale)*/:
$strType = 'numeric'; break;
- case SQLSRV_SQLTYPE_NVARCHAR/*($charCount)*/: $strType
= 'nvarchar'; break;
- // case SQLSRV_SQLTYPE_NVARCHAR('max'): $strType =
'nvarchar(MAX)'; break;
- case SQLSRV_SQLTYPE_NTEXT:
$strType = 'ntext'; break;
- case SQLSRV_SQLTYPE_REAL:
$strType = 'real'; break;
- case SQLSRV_SQLTYPE_SMALLDATETIME: $strType =
'smalldatetime'; break;
- case SQLSRV_SQLTYPE_SMALLINT: $strType =
'smallint'; break;
- case SQLSRV_SQLTYPE_SMALLMONEY: $strType =
'smallmoney'; break;
- case SQLSRV_SQLTYPE_TEXT:
$strType = 'text'; break;
- case SQLSRV_SQLTYPE_TIMESTAMP: $strType =
'timestamp'; break;
- case SQLSRV_SQLTYPE_TINYINT: $strType =
'tinyint'; break;
- case SQLSRV_SQLTYPE_UNIQUEIDENTIFIER: $strType =
'uniqueidentifier'; break;
- case SQLSRV_SQLTYPE_UDT:
$strType = 'UDT'; break;
- case SQLSRV_SQLTYPE_VARBINARY/*($byteCount)*/: $strType
= 'varbinary'; break;
- // case SQLSRV_SQLTYPE_VARBINARY('max'): $strType =
'varbinary(MAX)'; break;
- case SQLSRV_SQLTYPE_VARCHAR/*($charCount)*/: $strType =
'varchar'; break;
- // case SQLSRV_SQLTYPE_VARCHAR('max'): $strType =
'varchar(MAX)'; break;
- case SQLSRV_SQLTYPE_XML:
$strType = 'xml'; break;
- default: $strType = $intType;
+ switch ( $intType ) {
+ case SQLSRV_SQLTYPE_BIGINT:
+ $strType = 'bigint';
+ break;
+ case SQLSRV_SQLTYPE_BINARY:
+ $strType = 'binary';
+ break;
+ case SQLSRV_SQLTYPE_BIT:
+ $strType = 'bit';
+ break;
+ case SQLSRV_SQLTYPE_CHAR:
+ $strType = 'char';
+ break;
+ case SQLSRV_SQLTYPE_DATETIME:
+ $strType = 'datetime';
+ break;
+ case SQLSRV_SQLTYPE_DECIMAL: // ($precision, $scale)
+ $strType = 'decimal';
+ break;
+ case SQLSRV_SQLTYPE_FLOAT:
+ $strType = 'float';
+ break;
+ case SQLSRV_SQLTYPE_IMAGE:
+ $strType = 'image';
+ break;
+ case SQLSRV_SQLTYPE_INT:
+ $strType = 'int';
+ break;
+ case SQLSRV_SQLTYPE_MONEY:
+ $strType = 'money';
+ break;
+ case SQLSRV_SQLTYPE_NCHAR: // ($charCount):
+ $strType = 'nchar';
+ break;
+ case SQLSRV_SQLTYPE_NUMERIC: // ($precision, $scale):
+ $strType = 'numeric';
+ break;
+ case SQLSRV_SQLTYPE_NVARCHAR: // ($charCount)
+ $strType = 'nvarchar';
+ break;
+ // case SQLSRV_SQLTYPE_NVARCHAR('max'):
+ // $strType = 'nvarchar(MAX)';
+ // break;
+ case SQLSRV_SQLTYPE_NTEXT:
+ $strType = 'ntext';
+ break;
+ case SQLSRV_SQLTYPE_REAL:
+ $strType = 'real';
+ break;
+ case SQLSRV_SQLTYPE_SMALLDATETIME:
+ $strType = 'smalldatetime';
+ break;
+ case SQLSRV_SQLTYPE_SMALLINT:
+ $strType = 'smallint';
+ break;
+ case SQLSRV_SQLTYPE_SMALLMONEY:
+ $strType = 'smallmoney';
+ break;
+ case SQLSRV_SQLTYPE_TEXT:
+ $strType = 'text';
+ break;
+ case SQLSRV_SQLTYPE_TIMESTAMP:
+ $strType = 'timestamp';
+ break;
+ case SQLSRV_SQLTYPE_TINYINT:
+ $strType = 'tinyint';
+ break;
+ case SQLSRV_SQLTYPE_UNIQUEIDENTIFIER:
+ $strType = 'uniqueidentifier';
+ break;
+ case SQLSRV_SQLTYPE_UDT:
+ $strType = 'UDT';
+ break;
+ case SQLSRV_SQLTYPE_VARBINARY: // ($byteCount)
+ $strType = 'varbinary';
+ break;
+ // case SQLSRV_SQLTYPE_VARBINARY('max'):
+ // $strType = 'varbinary(MAX)';
+ // break;
+ case SQLSRV_SQLTYPE_VARCHAR: // ($charCount)
+ $strType = 'varchar';
+ break;
+ // case SQLSRV_SQLTYPE_VARCHAR('max'):
+ // $strType = 'varchar(MAX)';
+ // break;
+ case SQLSRV_SQLTYPE_XML:
+ $strType = 'xml';
+ break;
+ default:
+ $strType = $intType;
}
return $strType;
}
diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php
index 55e0f88..52fab13 100644
--- a/includes/db/DatabasePostgres.php
+++ b/includes/db/DatabasePostgres.php
@@ -1408,7 +1408,8 @@
return array( $startOpts, $useIndex, $preLimitTail,
$postLimitTail );
}
- function setFakeMaster( $enabled = true ) {}
+ function setFakeMaster( $enabled = true ) {
+ }
function getDBname() {
return $this->mDBname;
diff --git a/includes/db/DatabaseUtility.php b/includes/db/DatabaseUtility.php
index 9a1c8bd..de58bab 100644
--- a/includes/db/DatabaseUtility.php
+++ b/includes/db/DatabaseUtility.php
@@ -253,7 +253,8 @@
$this->pos = $row;
}
- function free() {}
+ function free() {
+ }
// Callers want to be able to access fields with $this->fieldName
function fetchObject() {
diff --git a/includes/db/LBFactory.php b/includes/db/LBFactory.php
index 85e7775..23af35d 100644
--- a/includes/db/LBFactory.php
+++ b/includes/db/LBFactory.php
@@ -134,7 +134,8 @@
* Prepare all tracked load balancers for shutdown
* STUB
*/
- function shutdown() {}
+ function shutdown() {
+ }
/**
* Call a method of each tracked load balancer
@@ -292,21 +293,27 @@
* LBFactory::enableBackend() to return to normal behavior
*/
class LBFactory_Fake extends LBFactory {
- function __construct( $conf ) {}
+ function __construct( $conf ) {
+ }
function newMainLB( $wiki = false) {
throw new DBAccessError;
}
+
function getMainLB( $wiki = false ) {
throw new DBAccessError;
}
+
function newExternalLB( $cluster, $wiki = false ) {
throw new DBAccessError;
}
+
function &getExternalLB( $cluster, $wiki = false ) {
throw new DBAccessError;
}
- function forEachLB( $callback, $params = array() ) {}
+
+ function forEachLB( $callback, $params = array() ) {
+ }
}
/**
diff --git a/includes/installer/WebInstallerPage.php
b/includes/installer/WebInstallerPage.php
index 593509e..8aec289 100644
--- a/includes/installer/WebInstallerPage.php
+++ b/includes/installer/WebInstallerPage.php
@@ -1311,7 +1311,9 @@
}
class WebInstaller_Readme extends WebInstaller_Document {
- protected function getFileName() { return 'README'; }
+ protected function getFileName() {
+ return 'README';
+ }
}
class WebInstaller_ReleaseNotes extends WebInstaller_Document {
@@ -1327,9 +1329,13 @@
}
class WebInstaller_UpgradeDoc extends WebInstaller_Document {
- protected function getFileName() { return 'UPGRADE'; }
+ protected function getFileName() {
+ return 'UPGRADE';
+ }
}
class WebInstaller_Copying extends WebInstaller_Document {
- protected function getFileName() { return 'COPYING'; }
+ protected function getFileName() {
+ return 'COPYING';
+ }
}
diff --git a/includes/templates/Usercreate.php
b/includes/templates/Usercreate.php
index 541d9e4..dff9ada 100644
--- a/includes/templates/Usercreate.php
+++ b/includes/templates/Usercreate.php
@@ -25,7 +25,9 @@
* @defgroup Templates Templates
*/
-if( !defined( 'MEDIAWIKI' ) ) die( -1 );
+if ( !defined( 'MEDIAWIKI' ) ) {
+ die( -1 );
+}
/**
* @ingroup Templates
@@ -42,16 +44,20 @@
}
function execute() {
- if( $this->data['message'] ) {
+ if ( $this->data['message'] ) {
?>
<div class="<?php $this->text('messagetype') ?>box">
- <?php if ( $this->data['messagetype'] == 'error' ) { ?>
- <strong><?php $this->msg( 'loginerror' )?></strong><br
/>
- <?php } ?>
- <?php $this->html('message') ?>
+<?php
+ if ( $this->data['messagetype'] == 'error' ) {
+ ?><strong><?php $this->msg( 'loginerror' )
?></strong><br /><?php
+ }
+ $this->html('message');
+?>
</div>
<div class="visualClear"></div>
-<?php } ?>
+<?php
+ }
+?>
<div id="signupstart"><?php $this->msgWiki( 'signupstart' ); ?></div>
<div id="userlogin">
@@ -60,7 +66,11 @@
<h2><?php $this->msg('createaccount') ?></h2>
<p id="userloginlink"><?php $this->html('link') ?></p>
<?php $this->html('header'); /* pre-table point for form plugins... */
?>
- <?php if( $this->haveData( 'languages' ) ) { ?><div
id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
+<?php
+ if ( $this->haveData( 'languages' ) ) {
+ ?><div id="languagelinks"><p><?php $this->html( 'languages' );
?></p></div><?php
+ }
+?>
<table>
<tr>
<td class="mw-label"><label for='wpName2'><?php
$this->msg('yourname') ?></label></td>
@@ -79,7 +89,8 @@
<tr>
<td></td>
<td class="mw-input">
- <?php if( $this->data['createemail'] ) {
+<?php
+ if ( $this->data['createemail'] ) {
echo Xml::checkLabel(
wfMessage( 'createaccountmail'
)->text(),
'wpCreateaccountMail',
@@ -87,7 +98,8 @@
$this->data['createemailset'],
array( 'tabindex' => '2' )
);
- } ?>
+ }
+?>
</td>
</tr>
<tr class="mw-row-password">
@@ -102,12 +114,13 @@
) + User::passwordChangeInputAttribs() ); ?>
</td>
</tr>
- <?php if( $this->data['usedomain'] ) {
+<?php
+ if ( $this->data['usedomain'] ) {
$doms = "";
- foreach( $this->data['domainnames'] as $dom ) {
+ foreach ( $this->data['domainnames'] as $dom ) {
$doms .= "<option>" . htmlspecialchars( $dom ) .
"</option>";
}
- ?>
+?>
<tr id="mw-user-domain-section">
<td class="mw-label"><?php $this->msg( 'yourdomainname'
) ?></td>
<td class="mw-input">
@@ -117,7 +130,9 @@
</select>
</td>
</tr>
- <?php } ?>
+<?php
+ }
+?>
<tr class="mw-row-password">
<td class="mw-label"><label for='wpRetype'><?php
$this->msg('yourpasswordagain') ?></label></td>
<td class="mw-input">
@@ -131,7 +146,9 @@
</td>
</tr>
<tr>
- <?php if( $this->data['useemail'] ) { ?>
+<?php
+ if ( $this->data['useemail'] ) {
+?>
<td class="mw-label"><label for='wpEmail'><?php
$this->msg('youremail') ?></label></td>
<td class="mw-input">
<?php
@@ -153,8 +170,11 @@
} ?>
</div>
</td>
- <?php } ?>
- <?php if( $this->data['userealname'] ) { ?>
+<?php
+ }
+
+ if ( $this->data['userealname'] ) {
+?>
</tr>
<tr>
<td class="mw-label"><label
for='wpRealName'><?php $this->msg('yourrealname') ?></label></td>
@@ -166,8 +186,11 @@
<?php
$this->msgWiki('prefs-help-realname'); ?>
</div>
</td>
- <?php } ?>
- <?php if( $this->data['usereason'] ) { ?>
+<?php
+ }
+
+ if ( $this->data['usereason'] ) {
+?>
</tr>
<tr>
<td class="mw-label"><label
for='wpReason'><?php $this->msg('createaccountreason') ?></label></td>
@@ -176,9 +199,13 @@
tabindex="8"
value="<?php
$this->text('reason') ?>" size='20' />
</td>
- <?php } ?>
+<?php
+ }
+?>
</tr>
- <?php if( $this->data['canremember'] ) { ?>
+<?php
+ if ( $this->data['canremember'] ) {
+?>
<tr>
<td></td>
<td class="mw-input">
@@ -195,7 +222,8 @@
?>
</td>
</tr>
-<?php }
+<?php
+ }
$tabIndex = 10;
if ( isset( $this->data['extraInput'] ) && is_array(
$this->data['extraInput'] ) ) {
@@ -230,12 +258,13 @@
<label for="<?php echo htmlspecialchars(
$inputItem['name'] ); ?>"><?php
$this->msgHtml( $inputItem['msg'] )
?></label><?php
}
- if( $inputItem['helptext'] !== false ) {
+ if ( $inputItem['helptext'] !== false ) {
?>
<div class="prefsectiontip">
<?php $this->msgWiki(
$inputItem['helptext'] ); ?>
- </div>
- <?php } ?>
+ </div><?php
+ }
+ ?>
</td>
</tr>
<?php
@@ -251,8 +280,14 @@
</td>
</tr>
</table>
-<?php if( $this->haveData( 'uselang' ) ) { ?><input type="hidden"
name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
-<?php if( $this->haveData( 'token' ) ) { ?><input type="hidden"
name="wpCreateaccountToken" value="<?php $this->text( 'token' ); ?>" /><?php }
?>
+<?php
+ if ( $this->haveData( 'uselang' ) ) {
+ ?><input type="hidden" name="uselang" value="<?php $this->text(
'uselang' ); ?>" /><?php
+ }
+ if ( $this->haveData( 'token' ) ) {
+ ?><input type="hidden" name="wpCreateaccountToken" value="<?php
$this->text( 'token' ); ?>" /><?php
+ }
+?>
</form>
</div>
<div id="signupend"><?php $this->html( 'signupend' ); ?></div>
diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php
index 7bc0241..0b4b8e5 100644
--- a/includes/templates/Userlogin.php
+++ b/includes/templates/Userlogin.php
@@ -31,17 +31,20 @@
*/
class UserloginTemplate extends QuickTemplate {
function execute() {
- if( $this->data['message'] ) {
+ if ( $this->data['message'] ) {
?>
<div class="<?php $this->text('messagetype') ?>box">
- <?php if ( $this->data['messagetype'] == 'error' ) { ?>
- <strong><?php $this->msg( 'loginerror' )?></strong><br
/>
- <?php } ?>
+ <?php
+ if ( $this->data['messagetype'] == 'error' ) {
+ ?><strong><?php $this->msg( 'loginerror' )
?></strong><br /><?php
+ }
+ ?>
<?php $this->html('message') ?>
</div>
- <div class="visualClear"></div>
-<?php } ?>
+ <div class="visualClear"></div><?php
+ }
+?>
<div id="loginstart"><?php $this->msgWiki( 'loginstart' ); ?></div>
<div id="userloginForm">
<form name="userlogin" method="post" action="<?php $this->text('action') ?>">
@@ -49,7 +52,11 @@
<p id="userloginlink"><?php $this->html('link') ?></p>
<?php $this->html('header'); /* pre-table point for form plugins... */
?>
<div id="userloginprompt"><?php $this->msgWiki('loginprompt') ?></div>
- <?php if( $this->haveData( 'languages' ) ) { ?><div
id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
+<?php
+ if ( $this->haveData( 'languages' ) ) {
+ ?><div id="languagelinks"><p><?php $this->html(
'languages' ); ?></p></div><?php
+ }
+?>
<table>
<tr>
<td class="mw-label"><label for='wpName1'><?php
$this->msg('yourname') ?></label></td>
@@ -80,12 +87,13 @@
</td>
</tr>
- <?php if( isset( $this->data['usedomain'] ) && $this->data['usedomain']
) {
+<?php
+ if ( isset( $this->data['usedomain'] ) &&
$this->data['usedomain'] ) {
$doms = "";
- foreach( $this->data['domainnames'] as $dom ) {
+ foreach ( $this->data['domainnames'] as $dom ) {
$doms .= "<option>" . htmlspecialchars( $dom ) .
"</option>";
}
- ?>
+?>
<tr id="mw-user-domain-section">
<td class="mw-label"><?php $this->msg( 'yourdomainname'
) ?></td>
<td class="mw-input">
@@ -95,13 +103,15 @@
</select>
</td>
</tr>
- <?php }
+<?php
+ }
- if( $this->haveData( 'extrafields' ) ) {
- echo $this->data['extrafields'];
- }
+ if ( $this->haveData( 'extrafields' ) ) {
+ echo $this->data['extrafields'];
+ }
- if( $this->data['canremember'] ) { ?>
+ if ( $this->data['canremember'] ) {
+?>
<tr>
<td></td>
<td class="mw-input">
@@ -118,8 +128,11 @@
?>
</td>
</tr>
-<?php } ?>
-<?php if( $this->data['cansecurelogin'] ) { ?>
+<?php
+ }
+
+ if ( $this->data['cansecurelogin'] ) {
+?>
<tr>
<td></td>
<td class="mw-input">
@@ -131,26 +144,28 @@
$this->data['stickHTTPS'],
array( 'tabindex' => '9' )
);
- ?>
+?>
</td>
</tr>
-<?php } ?>
+<?php
+ }
+?>
<tr>
<td></td>
<td class="mw-submit">
- <?php
- echo Html::input( 'wpLoginAttempt', wfMessage( 'login'
)->text(), 'submit', array(
- 'id' => 'wpLoginAttempt',
- 'tabindex' => '9'
- ) );
+ <?php
+ echo Html::input( 'wpLoginAttempt', wfMessage( 'login'
)->text(), 'submit', array(
+ 'id' => 'wpLoginAttempt',
+ 'tabindex' => '9'
+ ) );
if ( $this->data['useemail'] && $this->data['canreset'] ) {
- if( $this->data['resetlink'] === true ) {
+ if ( $this->data['resetlink'] === true ) {
echo ' ';
echo Linker::link(
SpecialPage::getTitleFor(
'PasswordReset' ),
wfMessage( 'userlogin-resetlink' )
);
- } elseif( $this->data['resetlink'] === null ) {
+ } elseif ( $this->data['resetlink'] === null ) {
echo ' ';
echo Html::input(
'wpMailmypassword',
@@ -161,13 +176,20 @@
)
);
}
- } ?>
-
+ }
+?>
</td>
</tr>
</table>
-<?php if( $this->haveData( 'uselang' ) ) { ?><input type="hidden"
name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
-<?php if( $this->haveData( 'token' ) ) { ?><input type="hidden"
name="wpLoginToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?>
+<?php
+ if ( $this->haveData( 'uselang' ) ) {
+ ?><input type="hidden" name="uselang" value="<?php $this->text(
'uselang' ); ?>" /><?php
+ }
+
+ if ( $this->haveData( 'token' ) ) {
+ ?><input type="hidden" name="wpLoginToken" value="<?php
$this->text( 'token' ); ?>" /><?php
+ }
+?>
</form>
</div>
<div id="loginend"><?php $this->html( 'loginend' ); ?></div>
diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index 34af8ca..bf809a1 100644
--- a/includes/upload/UploadBase.php
+++ b/includes/upload/UploadBase.php
@@ -187,7 +187,9 @@
* @since 1.18
* @return string
*/
- public function getSourceType() { return null; }
+ public function getSourceType() {
+ return null;
+ }
/**
* Initialize the path information
diff --git a/includes/upload/UploadFromChunks.php
b/includes/upload/UploadFromChunks.php
index 8144c34..7e07516 100644
--- a/includes/upload/UploadFromChunks.php
+++ b/includes/upload/UploadFromChunks.php
@@ -31,7 +31,7 @@
protected $mOffset, $mChunkIndex, $mFileKey, $mVirtualTempPath;
/**
- * Setup local pointers to stash, repo and user ( similar to
UploadFromStash )
+ * Setup local pointers to stash, repo and user (similar to
UploadFromStash)
*
* @param $user User
* @param $stash UploadStash
@@ -72,7 +72,7 @@
$this->mOffset = 0;
// Create a local stash target
$this->mLocalFile = parent::stashFile();
- // Update the initial file offset ( based on file size )
+ // Update the initial file offset (based on file size)
$this->mOffset = $this->mLocalFile->getSize();
$this->mFileKey = $this->mLocalFile->getFileKey();
@@ -132,7 +132,7 @@
}
wfDebugLog( 'fileconcatenate', "Combined $i chunks in $tAmount
seconds.\n" );
// Update the mTempPath and mLocalFile
- // ( for FileUpload or normal Stash to take over )
+ // (for FileUpload or normal Stash to take over)
$this->mTempPath = $tmpPath; // file system path
$tStart = microtime( true );
$this->mLocalFile = parent::stashFile( $this->user );
diff --git a/includes/upload/UploadFromUrl.php
b/includes/upload/UploadFromUrl.php
index 70b6903..150e516 100644
--- a/includes/upload/UploadFromUrl.php
+++ b/includes/upload/UploadFromUrl.php
@@ -160,7 +160,9 @@
/**
* @return string
*/
- public function getSourceType() { return 'url'; }
+ public function getSourceType() {
+ return 'url';
+ }
/**
* @return Status
--
To view, visit https://gerrit.wikimedia.org/r/58662
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0310ec379c6d41cc7d483671994d027a49f32164
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits