From acb292d7332ea9b18ce91ad9ccb4af259f01c6d7 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 11 Apr 2013 07:29:05 +0200 Subject: [PATCH] phpcs: Fix Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore violations ERROR: Closing brace must be on a line by itself Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore - For non-empty scopes it means the closing brace must be on a separate line. This is already the case in most classes in some cases the "lazy closing" is still used. array( 'x' ); // Moved } to next line function () { return 'x'; } // Moved } to next line case 1: stuff; break; // Moved break to next line - For empty function it serves as a visual distinction between there not being a scope block / function body and there being an empty function body. function foo(); // No body function foo() {} // Empty body - violation function bar() { // Empty body corrected } Change-Id: I0310ec379c6d41cc7d483671994d027a49f32164 --- includes/Action.php | 11 +- includes/Block.php | 6 +- includes/Category.php | 3 +- includes/Exception.php | 6 +- includes/db/Database.php | 39 +++++--- includes/db/DatabaseMssql.php | 128 ++++++++++++++++++------ includes/db/DatabasePostgres.php | 3 +- includes/db/DatabaseUtility.php | 3 +- includes/db/LBFactory.php | 13 ++- includes/installer/WebInstallerPage.php | 12 ++- includes/templates/Usercreate.php | 89 +++++++++++----- includes/templates/Userlogin.php | 82 +++++++++------ includes/upload/UploadBase.php | 4 +- includes/upload/UploadFromChunks.php | 6 +- includes/upload/UploadFromUrl.php | 4 +- 15 files changed, 285 insertions(+), 124 deletions(-) diff --git a/includes/Action.php b/includes/Action.php index 2e0c88ba9a..dff3803348 100644 --- a/includes/Action.php +++ b/includes/Action.php @@ -374,18 +374,23 @@ abstract class FormAction extends Action { * 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 4da0f8f7e6..1d98a29a65 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -801,7 +801,8 @@ class Block { 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 @@ class Block { 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 868d6c4628..126b8fee40 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -40,7 +40,8 @@ class Category { /** 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 21952bbf5b..661d03dce8 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -721,8 +721,10 @@ class MWExceptionHandler { // 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 9db2ada392..21422326a6 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1094,17 +1094,22 @@ abstract class DatabaseBase implements DatabaseType { * @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 @@ abstract class DatabaseBase implements DatabaseType { * * @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 @@ abstract class DatabaseBase implements DatabaseType { * @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 @@ abstract class DatabaseBase implements DatabaseType { $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 @@ abstract class DatabaseBase implements DatabaseType { // 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 @@ abstract class DatabaseBase implements DatabaseType { * @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 @@ abstract class DatabaseBase implements DatabaseType { * @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 dde3af51e3..82b0e5a4d2 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -37,24 +37,31 @@ class DatabaseMssql extends DatabaseBase { 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 @@ class MssqlResult { $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 55e0f88fb5..52fab138f6 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -1408,7 +1408,8 @@ SQL; 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 9a1c8bdeb0..de58bab64a 100644 --- a/includes/db/DatabaseUtility.php +++ b/includes/db/DatabaseUtility.php @@ -253,7 +253,8 @@ class FakeResultWrapper extends ResultWrapper { $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 85e7775dbd..23af35d392 100644 --- a/includes/db/LBFactory.php +++ b/includes/db/LBFactory.php @@ -134,7 +134,8 @@ abstract class LBFactory { * Prepare all tracked load balancers for shutdown * STUB */ - function shutdown() {} + function shutdown() { + } /** * Call a method of each tracked load balancer @@ -292,21 +293,27 @@ class LBFactory_Simple extends LBFactory { * 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 593509e5fe..8aec28916d 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -1311,7 +1311,9 @@ abstract class WebInstaller_Document extends WebInstallerPage { } 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_ReleaseNotes extends WebInstaller_Document { } 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 541d9e40dc..dff9ada0e7 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 @@ class UsercreateTemplate extends QuickTemplate { } function execute() { - if( $this->data['message'] ) { + if ( $this->data['message'] ) { ?>
- data['messagetype'] == 'error' ) { ?> - msg( 'loginerror' )?>
- - html('message') ?> +data['messagetype'] == 'error' ) { + ?>msg( 'loginerror' ) ?>
html('message'); +?>
- +
msgWiki( 'signupstart' ); ?>
@@ -60,7 +66,11 @@ class UsercreateTemplate extends QuickTemplate {

msg('createaccount') ?>

html('header'); /* pre-table point for form plugins... */ ?> - haveData( 'languages' ) ) { ?> +haveData( 'languages' ) ) { + ?> @@ -79,7 +89,8 @@ class UsercreateTemplate extends QuickTemplate { @@ -102,12 +114,13 @@ class UsercreateTemplate extends QuickTemplate { ) + User::passwordChangeInputAttribs() ); ?> - data['usedomain'] ) { +data['usedomain'] ) { $doms = ""; - foreach( $this->data['domainnames'] as $dom ) { + foreach ( $this->data['domainnames'] as $dom ) { $doms .= ""; } - ?> +?> - + - data['useemail'] ) { ?> +data['useemail'] ) { +?> - - data['userealname'] ) { ?> +data['userealname'] ) { +?> @@ -166,8 +186,11 @@ class UsercreateTemplate extends QuickTemplate { msgWiki('prefs-help-realname'); ?> - - data['usereason'] ) { ?> +data['usereason'] ) { +?> @@ -176,9 +199,13 @@ class UsercreateTemplate extends QuickTemplate { tabindex="8" value="text('reason') ?>" size='20' /> - + - data['canremember'] ) { ?> +data['canremember'] ) { +?> -data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) { @@ -230,12 +258,13 @@ class UsercreateTemplate extends QuickTemplate {
msgWiki( $inputItem['helptext'] ); ?> -
- +
- data['createemail'] ) { +data['createemail'] ) { echo Xml::checkLabel( wfMessage( 'createaccountmail' )->text(), 'wpCreateaccountMail', @@ -87,7 +98,8 @@ class UsercreateTemplate extends QuickTemplate { $this->data['createemailset'], array( 'tabindex' => '2' ) ); - } ?> + } +?>
msg( 'yourdomainname' ) ?> @@ -117,7 +130,9 @@ class UsercreateTemplate extends QuickTemplate {
@@ -131,7 +146,9 @@ class UsercreateTemplate extends QuickTemplate {
@@ -195,7 +222,8 @@ class UsercreateTemplate extends QuickTemplate { ?>
-haveData( 'uselang' ) ) { ?> -haveData( 'token' ) ) { ?> +haveData( 'uselang' ) ) { + ?>haveData( 'token' ) ) { + ?>
html( 'signupend' ); ?>
diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 7bc0241a35..0b4b8e54b7 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'] ) { ?>
- data['messagetype'] == 'error' ) { ?> - msg( 'loginerror' )?>
- + data['messagetype'] == 'error' ) { + ?>msg( 'loginerror' ) ?>
html('message') ?>
-
- +
msgWiki( 'loginstart' ); ?>
@@ -49,7 +52,11 @@ class UserloginTemplate extends QuickTemplate { html('header'); /* pre-table point for form plugins... */ ?>
msgWiki('loginprompt') ?>
- haveData( 'languages' ) ) { ?> +haveData( 'languages' ) ) { + ?> @@ -80,12 +87,13 @@ class UserloginTemplate extends QuickTemplate { - data['usedomain'] ) && $this->data['usedomain'] ) { +data['usedomain'] ) && $this->data['usedomain'] ) { $doms = ""; - foreach( $this->data['domainnames'] as $dom ) { + foreach ( $this->data['domainnames'] as $dom ) { $doms .= ""; } - ?> +?> - haveData( 'extrafields' ) ) { - echo $this->data['extrafields']; - } + if ( $this->haveData( 'extrafields' ) ) { + echo $this->data['extrafields']; + } - if( $this->data['canremember'] ) { ?> + if ( $this->data['canremember'] ) { +?> - -data['cansecurelogin'] ) { ?> +data['cansecurelogin'] ) { +?> - +
msg( 'yourdomainname' ) ?> @@ -95,13 +103,15 @@ class UserloginTemplate extends QuickTemplate {
@@ -118,8 +128,11 @@ class UserloginTemplate extends QuickTemplate { ?>
@@ -131,26 +144,28 @@ class UserloginTemplate extends QuickTemplate { $this->data['stickHTTPS'], array( 'tabindex' => '9' ) ); - ?> +?>
- text(), 'submit', array( - 'id' => 'wpLoginAttempt', - 'tabindex' => '9' - ) ); + 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 @@ class UserloginTemplate extends QuickTemplate { ) ); } - } ?> - + } +?>
-haveData( 'uselang' ) ) { ?> -haveData( 'token' ) ) { ?> +haveData( 'uselang' ) ) { + ?>haveData( 'token' ) ) { + ?>
html( 'loginend' ); ?>
diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 34af8ca275..bf809a13b3 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -187,7 +187,9 @@ abstract class UploadBase { * @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 8144c341d6..7e0751668b 100644 --- a/includes/upload/UploadFromChunks.php +++ b/includes/upload/UploadFromChunks.php @@ -31,7 +31,7 @@ class UploadFromChunks extends UploadFromFile { 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 @@ class UploadFromChunks extends UploadFromFile { $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 @@ class UploadFromChunks extends UploadFromFile { } 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 70b6903458..150e5166a3 100644 --- a/includes/upload/UploadFromUrl.php +++ b/includes/upload/UploadFromUrl.php @@ -160,7 +160,9 @@ class UploadFromUrl extends UploadBase { /** * @return string */ - public function getSourceType() { return 'url'; } + public function getSourceType() { + return 'url'; + } /** * @return Status -- 2.20.1