dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
100675a
)
Remove unneeded empty lines at begin of if/else/foreach body
author
umherirrender
<umherirrender_de.wp@web.de>
Fri, 19 Jun 2015 18:05:45 +0000
(20:05 +0200)
committer
umherirrender
<umherirrender_de.wp@web.de>
Fri, 19 Jun 2015 18:05:45 +0000
(20:05 +0200)
An if body must not begin with an empty line
Change-Id: I62b058be337fcc85a120fcd3dadce564db59a271
30 files changed:
includes/EditPage.php
patch
|
blob
|
history
includes/OutputPage.php
patch
|
blob
|
history
includes/Revision.php
patch
|
blob
|
history
includes/Sanitizer.php
patch
|
blob
|
history
includes/actions/UnprotectAction.php
patch
|
blob
|
history
includes/api/ApiBase.php
patch
|
blob
|
history
includes/cache/LinkCache.php
patch
|
blob
|
history
includes/cache/LocalisationCache.php
patch
|
blob
|
history
includes/changes/EnhancedChangesList.php
patch
|
blob
|
history
includes/content/WikitextContent.php
patch
|
blob
|
history
includes/context/RequestContext.php
patch
|
blob
|
history
includes/db/LoadBalancer.php
patch
|
blob
|
history
includes/diff/DifferenceEngine.php
patch
|
blob
|
history
includes/filebackend/FSFile.php
patch
|
blob
|
history
includes/filebackend/TempFSFile.php
patch
|
blob
|
history
includes/htmlform/HTMLSelectAndOtherField.php
patch
|
blob
|
history
includes/jobqueue/JobQueue.php
patch
|
blob
|
history
includes/media/FormatMetadata.php
patch
|
blob
|
history
includes/media/SVGMetadataExtractor.php
patch
|
blob
|
history
includes/media/XMP.php
patch
|
blob
|
history
includes/parser/LinkHolderArray.php
patch
|
blob
|
history
includes/parser/Parser.php
patch
|
blob
|
history
includes/parser/Preprocessor_DOM.php
patch
|
blob
|
history
includes/parser/Preprocessor_Hash.php
patch
|
blob
|
history
includes/resourceloader/ResourceLoaderWikiModule.php
patch
|
blob
|
history
includes/specialpage/SpecialPageFactory.php
patch
|
blob
|
history
includes/specials/SpecialExport.php
patch
|
blob
|
history
includes/specials/SpecialMIMEsearch.php
patch
|
blob
|
history
includes/specials/SpecialProtectedtitles.php
patch
|
blob
|
history
includes/upload/UploadBase.php
patch
|
blob
|
history
diff --git
a/includes/EditPage.php
b/includes/EditPage.php
index
ee67d01
..
b439459
100644
(file)
--- a/
includes/EditPage.php
+++ b/
includes/EditPage.php
@@
-1037,7
+1037,6
@@
class EditPage {
$undo = $wgRequest->getInt( 'undo' );
if ( $undo > 0 && $undoafter > 0 ) {
$undo = $wgRequest->getInt( 'undo' );
if ( $undo > 0 && $undoafter > 0 ) {
-
$undorev = Revision::newFromId( $undo );
$oldrev = Revision::newFromId( $undoafter );
$undorev = Revision::newFromId( $undo );
$oldrev = Revision::newFromId( $undoafter );
@@
-1046,8
+1045,8
@@
class EditPage {
# Otherwise, $content will be left as-is.
if ( !is_null( $undorev ) && !is_null( $oldrev ) &&
!$undorev->isDeleted( Revision::DELETED_TEXT ) &&
# Otherwise, $content will be left as-is.
if ( !is_null( $undorev ) && !is_null( $oldrev ) &&
!$undorev->isDeleted( Revision::DELETED_TEXT ) &&
- !$oldrev->isDeleted( Revision::DELETED_TEXT )
) {
-
+ !$oldrev->isDeleted( Revision::DELETED_TEXT )
+ ) {
$content = $this->mArticle->getUndoContent( $undorev, $oldrev );
if ( $content === false ) {
$content = $this->mArticle->getUndoContent( $undorev, $oldrev );
if ( $content === false ) {
diff --git
a/includes/OutputPage.php
b/includes/OutputPage.php
index
7322404
..
f02f752
100644
(file)
--- a/
includes/OutputPage.php
+++ b/
includes/OutputPage.php
@@
-2282,7
+2282,6
@@
class OutputPage extends ContextSource {
if ( $this->mArticleBodyOnly ) {
echo $this->mBodytext;
} else {
if ( $this->mArticleBodyOnly ) {
echo $this->mBodytext;
} else {
-
$sk = $this->getSkin();
// add skin specific modules
$modules = $sk->getDefaultModules();
$sk = $this->getSkin();
// add skin specific modules
$modules = $sk->getDefaultModules();
diff --git
a/includes/Revision.php
b/includes/Revision.php
index
9bb4d16
..
5939715
100644
(file)
--- a/
includes/Revision.php
+++ b/
includes/Revision.php
@@
-194,8
+194,8
@@
class Revision implements IDBAccessObject {
if ( !isset( $attribs['title'] )
&& isset( $row->ar_namespace )
if ( !isset( $attribs['title'] )
&& isset( $row->ar_namespace )
- && isset( $row->ar_title )
) {
-
+ && isset( $row->ar_title )
+ ) {
$attribs['title'] = Title::makeTitle( $row->ar_namespace, $row->ar_title );
}
$attribs['title'] = Title::makeTitle( $row->ar_namespace, $row->ar_title );
}
diff --git
a/includes/Sanitizer.php
b/includes/Sanitizer.php
index
677d5a4
..
2340cd9
100644
(file)
--- a/
includes/Sanitizer.php
+++ b/
includes/Sanitizer.php
@@
-374,7
+374,6
@@
class Sanitizer {
// are changed (like in the screwed up test system) we will re-initialise the settings.
$globalContext = implode( '-', compact( 'wgAllowMicrodataAttributes', 'wgAllowImageTag' ) );
if ( !$staticInitialised || $staticInitialised != $globalContext ) {
// are changed (like in the screwed up test system) we will re-initialise the settings.
$globalContext = implode( '-', compact( 'wgAllowMicrodataAttributes', 'wgAllowImageTag' ) );
if ( !$staticInitialised || $staticInitialised != $globalContext ) {
-
$htmlpairsStatic = array( # Tags that must be closed
'b', 'bdi', 'del', 'i', 'ins', 'u', 'font', 'big', 'small', 'sub', 'sup', 'h1',
'h2', 'h3', 'h4', 'h5', 'h6', 'cite', 'code', 'em', 's',
$htmlpairsStatic = array( # Tags that must be closed
'b', 'bdi', 'del', 'i', 'ins', 'u', 'font', 'big', 'small', 'sub', 'sup', 'h1',
'h2', 'h3', 'h4', 'h5', 'h6', 'cite', 'code', 'em', 's',
diff --git
a/includes/actions/UnprotectAction.php
b/includes/actions/UnprotectAction.php
index
bc28c8e
..
559cfaf
100644
(file)
--- a/
includes/actions/UnprotectAction.php
+++ b/
includes/actions/UnprotectAction.php
@@
-37,7
+37,6
@@
class UnprotectAction extends ProtectAction {
}
public function show() {
}
public function show() {
-
$this->page->unprotect();
}
}
$this->page->unprotect();
}
}
diff --git
a/includes/api/ApiBase.php
b/includes/api/ApiBase.php
index
55f9677
..
4b76e65
100644
(file)
--- a/
includes/api/ApiBase.php
+++ b/
includes/api/ApiBase.php
@@
-1056,7
+1056,6
@@
abstract class ApiBase extends ContextSource {
*/
protected function validateLimit( $paramName, &$value, $min, $max, $botMax = null, $enforceLimits = false ) {
if ( !is_null( $min ) && $value < $min ) {
*/
protected function validateLimit( $paramName, &$value, $min, $max, $botMax = null, $enforceLimits = false ) {
if ( !is_null( $min ) && $value < $min ) {
-
$msg = $this->encodeParamName( $paramName ) . " may not be less than $min (set to $value)";
$this->warnOrDie( $msg, $enforceLimits );
$value = $min;
$msg = $this->encodeParamName( $paramName ) . " may not be less than $min (set to $value)";
$this->warnOrDie( $msg, $enforceLimits );
$value = $min;
@@
-2646,7
+2645,6
@@
abstract class ApiBase extends ContextSource {
wfDeprecated( __METHOD__, '1.25' );
$params = $this->getFinalParams( ApiBase::GET_VALUES_FOR_HELP );
if ( $params ) {
wfDeprecated( __METHOD__, '1.25' );
$params = $this->getFinalParams( ApiBase::GET_VALUES_FOR_HELP );
if ( $params ) {
-
$paramsDescription = $this->getFinalParamDescription();
$msg = '';
$paramPrefix = "\n" . str_repeat( ' ', 24 );
$paramsDescription = $this->getFinalParamDescription();
$msg = '';
$paramPrefix = "\n" . str_repeat( ' ', 24 );
diff --git
a/includes/cache/LinkCache.php
b/includes/cache/LinkCache.php
index
eace1ee
..
e8cc5e5
100644
(file)
--- a/
includes/cache/LinkCache.php
+++ b/
includes/cache/LinkCache.php
@@
-220,17
+220,14
@@
class LinkCache {
$key = $nt->getPrefixedDBkey();
if ( $this->isBadLink( $key ) || $nt->isExternal() ) {
$key = $nt->getPrefixedDBkey();
if ( $this->isBadLink( $key ) || $nt->isExternal() ) {
-
return 0;
}
$id = $this->getGoodLinkID( $key );
if ( $id != 0 ) {
return 0;
}
$id = $this->getGoodLinkID( $key );
if ( $id != 0 ) {
-
return $id;
}
if ( $key === '' ) {
return $id;
}
if ( $key === '' ) {
-
return 0;
}
return 0;
}
diff --git
a/includes/cache/LocalisationCache.php
b/includes/cache/LocalisationCache.php
index
5b802aa
..
276e84a
100644
(file)
--- a/
includes/cache/LocalisationCache.php
+++ b/
includes/cache/LocalisationCache.php
@@
-539,13
+539,11
@@
class LocalisationCache {
public function readJSONFile( $fileName ) {
if ( !is_readable( $fileName ) ) {
public function readJSONFile( $fileName ) {
if ( !is_readable( $fileName ) ) {
-
return array();
}
$json = file_get_contents( $fileName );
if ( $json === false ) {
return array();
}
$json = file_get_contents( $fileName );
if ( $json === false ) {
-
return array();
}
return array();
}
diff --git
a/includes/changes/EnhancedChangesList.php
b/includes/changes/EnhancedChangesList.php
index
19277f1
..
54cde0d
100644
(file)
--- a/
includes/changes/EnhancedChangesList.php
+++ b/
includes/changes/EnhancedChangesList.php
@@
-330,7
+330,6
@@
class EnhancedChangesList extends ChangesList {
} elseif ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
$link = '<span class="history-deleted">' . $rcObj->timestamp . '</span> ';
} else {
} elseif ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
$link = '<span class="history-deleted">' . $rcObj->timestamp . '</span> ';
} else {
-
$link = Linker::linkKnown(
$rcObj->getTitle(),
$rcObj->timestamp,
$link = Linker::linkKnown(
$rcObj->getTitle(),
$rcObj->timestamp,
diff --git
a/includes/content/WikitextContent.php
b/includes/content/WikitextContent.php
index
3b449b6
..
8beae39
100644
(file)
--- a/
includes/content/WikitextContent.php
+++ b/
includes/content/WikitextContent.php
@@
-82,7
+82,6
@@
class WikitextContent extends TextContent {
$text = $with->getNativeData();
if ( strval( $sectionId ) === '' ) {
$text = $with->getNativeData();
if ( strval( $sectionId ) === '' ) {
-
return $with; # XXX: copy first?
}
return $with; # XXX: copy first?
}
diff --git
a/includes/context/RequestContext.php
b/includes/context/RequestContext.php
index
4e790c0
..
d1bc597
100644
(file)
--- a/
includes/context/RequestContext.php
+++ b/
includes/context/RequestContext.php
@@
-380,7
+380,6
@@
class RequestContext implements IContextSource {
*/
public function getSkin() {
if ( $this->skin === null ) {
*/
public function getSkin() {
if ( $this->skin === null ) {
-
$skin = null;
Hooks::run( 'RequestContextCreateSkin', array( $this, &$skin ) );
$factory = SkinFactory::getDefaultInstance();
$skin = null;
Hooks::run( 'RequestContextCreateSkin', array( $this, &$skin ) );
$factory = SkinFactory::getDefaultInstance();
diff --git
a/includes/db/LoadBalancer.php
b/includes/db/LoadBalancer.php
index
99c9a14
..
069185b
100644
(file)
--- a/
includes/db/LoadBalancer.php
+++ b/
includes/db/LoadBalancer.php
@@
-538,7
+538,6
@@
class LoadBalancer {
# Now we have an explicit index into the servers array
$conn = $this->openConnection( $i, $wiki );
if ( !$conn ) {
# Now we have an explicit index into the servers array
$conn = $this->openConnection( $i, $wiki );
if ( !$conn ) {
-
return $this->reportConnectionError();
}
return $this->reportConnectionError();
}
diff --git
a/includes/diff/DifferenceEngine.php
b/includes/diff/DifferenceEngine.php
index
ac29ae0
..
c138eec
100644
(file)
--- a/
includes/diff/DifferenceEngine.php
+++ b/
includes/diff/DifferenceEngine.php
@@
-685,24
+685,20
@@
class DifferenceEngine extends ContextSource {
$this->mCacheHit = true;
// Check if the diff should be hidden from this user
if ( !$this->loadRevisionData() ) {
$this->mCacheHit = true;
// Check if the diff should be hidden from this user
if ( !$this->loadRevisionData() ) {
-
return false;
} elseif ( $this->mOldRev &&
!$this->mOldRev->userCan( Revision::DELETED_TEXT, $this->getUser() )
) {
return false;
} elseif ( $this->mOldRev &&
!$this->mOldRev->userCan( Revision::DELETED_TEXT, $this->getUser() )
) {
-
return false;
} elseif ( $this->mNewRev &&
!$this->mNewRev->userCan( Revision::DELETED_TEXT, $this->getUser() )
) {
return false;
} elseif ( $this->mNewRev &&
!$this->mNewRev->userCan( Revision::DELETED_TEXT, $this->getUser() )
) {
-
return false;
}
// Short-circuit
if ( $this->mOldRev === false || ( $this->mOldRev && $this->mNewRev
&& $this->mOldRev->getID() == $this->mNewRev->getID() )
) {
return false;
}
// Short-circuit
if ( $this->mOldRev === false || ( $this->mOldRev && $this->mNewRev
&& $this->mOldRev->getID() == $this->mNewRev->getID() )
) {
-
return '';
}
// Cacheable?
return '';
}
// Cacheable?
@@
-726,7
+722,6
@@
class DifferenceEngine extends ContextSource {
// Loadtext is permission safe, this just clears out the diff
if ( !$this->loadText() ) {
// Loadtext is permission safe, this just clears out the diff
if ( !$this->loadText() ) {
-
return false;
}
return false;
}
@@
-859,12
+854,10
@@
class DifferenceEngine extends ContextSource {
$tempFile1 = fopen( $tempName1, "w" );
if ( !$tempFile1 ) {
$tempFile1 = fopen( $tempName1, "w" );
if ( !$tempFile1 ) {
-
return false;
}
$tempFile2 = fopen( $tempName2, "w" );
if ( !$tempFile2 ) {
return false;
}
$tempFile2 = fopen( $tempName2, "w" );
if ( !$tempFile2 ) {
-
return false;
}
fwrite( $tempFile1, $otext );
return false;
}
fwrite( $tempFile1, $otext );
diff --git
a/includes/filebackend/FSFile.php
b/includes/filebackend/FSFile.php
index
a75f328
..
213bb87
100644
(file)
--- a/
includes/filebackend/FSFile.php
+++ b/
includes/filebackend/FSFile.php
@@
-200,7
+200,6
@@
class FSFile {
public function getSha1Base36( $recache = false ) {
if ( $this->sha1Base36 !== null && !$recache ) {
public function getSha1Base36( $recache = false ) {
if ( $this->sha1Base36 !== null && !$recache ) {
-
return $this->sha1Base36;
}
return $this->sha1Base36;
}
diff --git
a/includes/filebackend/TempFSFile.php
b/includes/filebackend/TempFSFile.php
index
312b65c
..
46b5360
100644
(file)
--- a/
includes/filebackend/TempFSFile.php
+++ b/
includes/filebackend/TempFSFile.php
@@
-67,7
+67,6
@@
class TempFSFile extends FSFile {
break; // got it
}
if ( $attempt >= 5 ) {
break; // got it
}
if ( $attempt >= 5 ) {
-
return null; // give up
}
}
return null; // give up
}
}
diff --git
a/includes/htmlform/HTMLSelectAndOtherField.php
b/includes/htmlform/HTMLSelectAndOtherField.php
index
a1c0c95
..
23ca3bf
100644
(file)
--- a/
includes/htmlform/HTMLSelectAndOtherField.php
+++ b/
includes/htmlform/HTMLSelectAndOtherField.php
@@
-71,7
+71,6
@@
class HTMLSelectAndOtherField extends HTMLSelectField {
*/
function loadDataFromRequest( $request ) {
if ( $request->getCheck( $this->mName ) ) {
*/
function loadDataFromRequest( $request ) {
if ( $request->getCheck( $this->mName ) ) {
-
$list = $request->getText( $this->mName );
$text = $request->getText( $this->mName . '-other' );
$list = $request->getText( $this->mName );
$text = $request->getText( $this->mName . '-other' );
diff --git
a/includes/jobqueue/JobQueue.php
b/includes/jobqueue/JobQueue.php
index
b4a2184
..
913aea0
100644
(file)
--- a/
includes/jobqueue/JobQueue.php
+++ b/
includes/jobqueue/JobQueue.php
@@
-637,7
+637,6
@@
abstract class JobQueue {
* @since 1.22
*/
final public function getSiblingQueuesWithJobs( array $types ) {
* @since 1.22
*/
final public function getSiblingQueuesWithJobs( array $types ) {
-
return $this->doGetSiblingQueuesWithJobs( $types );
}
return $this->doGetSiblingQueuesWithJobs( $types );
}
@@
-661,7
+660,6
@@
abstract class JobQueue {
* @since 1.22
*/
final public function getSiblingQueueSizes( array $types ) {
* @since 1.22
*/
final public function getSiblingQueueSizes( array $types ) {
-
return $this->doGetSiblingQueueSizes( $types );
}
return $this->doGetSiblingQueueSizes( $types );
}
diff --git
a/includes/media/FormatMetadata.php
b/includes/media/FormatMetadata.php
index
8127837
..
17e3dda
100644
(file)
--- a/
includes/media/FormatMetadata.php
+++ b/
includes/media/FormatMetadata.php
@@
-1575,7
+1575,6
@@
class FormatMetadata extends ContextSource {
// If revision deleted, exit immediately
if ( $file->isDeleted( File::DELETED_FILE ) ) {
// If revision deleted, exit immediately
if ( $file->isDeleted( File::DELETED_FILE ) ) {
-
return array();
}
return array();
}
diff --git
a/includes/media/SVGMetadataExtractor.php
b/includes/media/SVGMetadataExtractor.php
index
6c53bc5
..
8afa31b
100644
(file)
--- a/
includes/media/SVGMetadataExtractor.php
+++ b/
includes/media/SVGMetadataExtractor.php
@@
-262,7
+262,6
@@
class SVGReader {
} elseif ( $this->reader->namespaceURI == self::NS_SVG
&& $this->reader->nodeType == XMLReader::ELEMENT
) {
} elseif ( $this->reader->namespaceURI == self::NS_SVG
&& $this->reader->nodeType == XMLReader::ELEMENT
) {
-
$sysLang = $this->reader->getAttribute( 'systemLanguage' );
if ( !is_null( $sysLang ) && $sysLang !== '' ) {
// See http://www.w3.org/TR/SVG/struct.html#SystemLanguageAttribute
$sysLang = $this->reader->getAttribute( 'systemLanguage' );
if ( !is_null( $sysLang ) && $sysLang !== '' ) {
// See http://www.w3.org/TR/SVG/struct.html#SystemLanguageAttribute
diff --git
a/includes/media/XMP.php
b/includes/media/XMP.php
index
b9d0ae5
..
a838355
100644
(file)
--- a/
includes/media/XMP.php
+++ b/
includes/media/XMP.php
@@
-638,7
+638,6
@@
class XMPReader implements LoggerAwareInterface {
// Validate structures.
list( $ns, $tag ) = explode( ' ', $elm, 2 );
if ( isset( $this->items[$ns][$tag]['validate'] ) ) {
// Validate structures.
list( $ns, $tag ) = explode( ' ', $elm, 2 );
if ( isset( $this->items[$ns][$tag]['validate'] ) ) {
-
$info =& $this->items[$ns][$tag];
$finalName = isset( $info['map_name'] )
? $info['map_name'] : $tag;
$info =& $this->items[$ns][$tag];
$finalName = isset( $info['map_name'] )
? $info['map_name'] : $tag;
diff --git
a/includes/parser/LinkHolderArray.php
b/includes/parser/LinkHolderArray.php
index
7026c5c
..
b4ca7c8
100644
(file)
--- a/
includes/parser/LinkHolderArray.php
+++ b/
includes/parser/LinkHolderArray.php
@@
-560,7
+560,6
@@
class LinkHolderArray {
// for each found variants, figure out link holders and replace
foreach ( $varRes as $s ) {
// for each found variants, figure out link holders and replace
foreach ( $varRes as $s ) {
-
$variantTitle = Title::makeTitle( $s->page_namespace, $s->page_title );
$varPdbk = $variantTitle->getPrefixedDBkey();
$vardbk = $variantTitle->getDBkey();
$variantTitle = Title::makeTitle( $s->page_namespace, $s->page_title );
$varPdbk = $variantTitle->getPrefixedDBkey();
$vardbk = $variantTitle->getDBkey();
diff --git
a/includes/parser/Parser.php
b/includes/parser/Parser.php
index
432e12a
..
3183689
100644
(file)
--- a/
includes/parser/Parser.php
+++ b/
includes/parser/Parser.php
@@
-3438,7
+3438,6
@@
class Parser {
# SUBST
if ( !$found ) {
# SUBST
if ( !$found ) {
-
$substMatch = $this->mSubstWords->matchStartAndRemove( $part1 );
# Possibilities for substMatch: "subst", "safesubst" or FALSE
$substMatch = $this->mSubstWords->matchStartAndRemove( $part1 );
# Possibilities for substMatch: "subst", "safesubst" or FALSE
@@
-3496,7
+3495,6
@@
class Parser {
# Parser functions
if ( !$found ) {
# Parser functions
if ( !$found ) {
-
$colonPos = strpos( $part1, ':' );
if ( $colonPos !== false ) {
$func = substr( $part1, 0, $colonPos );
$colonPos = strpos( $part1, ':' );
if ( $colonPos !== false ) {
$func = substr( $part1, 0, $colonPos );
diff --git
a/includes/parser/Preprocessor_DOM.php
b/includes/parser/Preprocessor_DOM.php
index
56cddce
..
718ca35
100644
(file)
--- a/
includes/parser/Preprocessor_DOM.php
+++ b/
includes/parser/Preprocessor_DOM.php
@@
-154,7
+154,6
@@
class Preprocessor_DOM implements Preprocessor {
$cacheable = ( $wgPreprocessorCacheThreshold !== false
&& strlen( $text ) > $wgPreprocessorCacheThreshold );
if ( $cacheable ) {
$cacheable = ( $wgPreprocessorCacheThreshold !== false
&& strlen( $text ) > $wgPreprocessorCacheThreshold );
if ( $cacheable ) {
-
$cacheKey = wfMemcKey( 'preprocess-xml', md5( $text ), $flags );
$cacheValue = $wgMemc->get( $cacheKey );
if ( $cacheValue ) {
$cacheKey = wfMemcKey( 'preprocess-xml', md5( $text ), $flags );
$cacheValue = $wgMemc->get( $cacheKey );
if ( $cacheValue ) {
diff --git
a/includes/parser/Preprocessor_Hash.php
b/includes/parser/Preprocessor_Hash.php
index
308ef44
..
d1ad39c
100644
(file)
--- a/
includes/parser/Preprocessor_Hash.php
+++ b/
includes/parser/Preprocessor_Hash.php
@@
-119,7
+119,6
@@
class Preprocessor_Hash implements Preprocessor {
&& strlen( $text ) > $wgPreprocessorCacheThreshold;
if ( $cacheable ) {
&& strlen( $text ) > $wgPreprocessorCacheThreshold;
if ( $cacheable ) {
-
$cacheKey = wfMemcKey( 'preprocess-hash', md5( $text ), $flags );
$cacheValue = $wgMemc->get( $cacheKey );
if ( $cacheValue ) {
$cacheKey = wfMemcKey( 'preprocess-hash', md5( $text ), $flags );
$cacheValue = $wgMemc->get( $cacheKey );
if ( $cacheValue ) {
diff --git
a/includes/resourceloader/ResourceLoaderWikiModule.php
b/includes/resourceloader/ResourceLoaderWikiModule.php
index
1561dae
..
a4d94f8
100644
(file)
--- a/
includes/resourceloader/ResourceLoaderWikiModule.php
+++ b/
includes/resourceloader/ResourceLoaderWikiModule.php
@@
-291,7
+291,6
@@
class ResourceLoaderWikiModule extends ResourceLoaderModule {
$pages = $this->getPages( $context );
$key = implode( '|', array_keys( $pages ) );
if ( !isset( $this->titleInfo[$key] ) ) {
$pages = $this->getPages( $context );
$key = implode( '|', array_keys( $pages ) );
if ( !isset( $this->titleInfo[$key] ) ) {
-
$this->titleInfo[$key] = array();
$batch = new LinkBatch;
foreach ( $pages as $titleText => $options ) {
$this->titleInfo[$key] = array();
$batch = new LinkBatch;
foreach ( $pages as $titleText => $options ) {
diff --git
a/includes/specialpage/SpecialPageFactory.php
b/includes/specialpage/SpecialPageFactory.php
index
dedfcb6
..
3786b36
100644
(file)
--- a/
includes/specialpage/SpecialPageFactory.php
+++ b/
includes/specialpage/SpecialPageFactory.php
@@
-572,7
+572,6
@@
class SpecialPageFactory {
$context->setTitle( $page->getPageTitle( $par ) );
}
} elseif ( !$page->isIncludable() ) {
$context->setTitle( $page->getPageTitle( $par ) );
}
} elseif ( !$page->isIncludable() ) {
-
return false;
}
return false;
}
diff --git
a/includes/specials/SpecialExport.php
b/includes/specials/SpecialExport.php
index
920d34b
..
69b795d
100644
(file)
--- a/
includes/specials/SpecialExport.php
+++ b/
includes/specials/SpecialExport.php
@@
-335,7
+335,6
@@
class SpecialExport extends SpecialPage {
if ( $exportall ) {
$history = WikiExporter::FULL;
} else {
if ( $exportall ) {
$history = WikiExporter::FULL;
} else {
-
$pageSet = array(); // Inverted index of all pages to look up
// Split up and normalize input
$pageSet = array(); // Inverted index of all pages to look up
// Split up and normalize input
diff --git
a/includes/specials/SpecialMIMEsearch.php
b/includes/specials/SpecialMIMEsearch.php
index
60225ea
..
6c7133f
100644
(file)
--- a/
includes/specials/SpecialMIMEsearch.php
+++ b/
includes/specials/SpecialMIMEsearch.php
@@
-109,7
+109,6
@@
class MIMEsearchPage extends QueryPage {
* Return HTML to put just before the results.
*/
function getPageHeader() {
* Return HTML to put just before the results.
*/
function getPageHeader() {
-
return Xml::openElement(
'form',
array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => wfScript() )
return Xml::openElement(
'form',
array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => wfScript() )
diff --git
a/includes/specials/SpecialProtectedtitles.php
b/includes/specials/SpecialProtectedtitles.php
index
0e1ce53
..
85ce78f
100644
(file)
--- a/
includes/specials/SpecialProtectedtitles.php
+++ b/
includes/specials/SpecialProtectedtitles.php
@@
-67,10
+67,8
@@
class SpecialProtectedtitles extends SpecialPage {
* @return string
*/
function formatRow( $row ) {
* @return string
*/
function formatRow( $row ) {
-
$title = Title::makeTitleSafe( $row->pt_namespace, $row->pt_title );
if ( !$title ) {
$title = Title::makeTitleSafe( $row->pt_namespace, $row->pt_title );
if ( !$title ) {
-
return Html::rawElement(
'li',
array(),
return Html::rawElement(
'li',
array(),
diff --git
a/includes/upload/UploadBase.php
b/includes/upload/UploadBase.php
index
f17681c
..
426c752
100644
(file)
--- a/
includes/upload/UploadBase.php
+++ b/
includes/upload/UploadBase.php
@@
-288,7
+288,6
@@
abstract class UploadBase {
* If there was no filename or a zero size given, give up quick.
*/
if ( $this->isEmptyFile() ) {
* If there was no filename or a zero size given, give up quick.
*/
if ( $this->isEmptyFile() ) {
-
return array( 'status' => self::EMPTY_FILE );
}
return array( 'status' => self::EMPTY_FILE );
}
@@
-297,7
+296,6
@@
abstract class UploadBase {
*/
$maxSize = self::getMaxUploadSize( $this->getSourceType() );
if ( $this->mFileSize > $maxSize ) {
*/
$maxSize = self::getMaxUploadSize( $this->getSourceType() );
if ( $this->mFileSize > $maxSize ) {
-
return array(
'status' => self::FILE_TOO_LARGE,
'max' => $maxSize,
return array(
'status' => self::FILE_TOO_LARGE,
'max' => $maxSize,
@@
-311,7
+309,6
@@
abstract class UploadBase {
*/
$verification = $this->verifyFile();
if ( $verification !== true ) {
*/
$verification = $this->verifyFile();
if ( $verification !== true ) {
-
return array(
'status' => self::VERIFICATION_ERROR,
'details' => $verification
return array(
'status' => self::VERIFICATION_ERROR,
'details' => $verification
@@
-323,7
+320,6
@@
abstract class UploadBase {
*/
$result = $this->validateName();
if ( $result !== true ) {
*/
$result = $this->validateName();
if ( $result !== true ) {
-
return $result;
}
return $result;
}
@@
-331,7
+327,6
@@
abstract class UploadBase {
if ( !Hooks::run( 'UploadVerification',
array( $this->mDestName, $this->mTempPath, &$error ) )
) {
if ( !Hooks::run( 'UploadVerification',
array( $this->mDestName, $this->mTempPath, &$error ) )
) {
-
return array( 'status' => self::HOOK_ABORTED, 'error' => $error );
}
return array( 'status' => self::HOOK_ABORTED, 'error' => $error );
}
@@
-380,7
+375,6
@@
abstract class UploadBase {
wfDebug( "mime: <$mime> extension: <{$this->mFinalExtension}>\n" );
global $wgMimeTypeBlacklist;
if ( $this->checkFileExtension( $mime, $wgMimeTypeBlacklist ) ) {
wfDebug( "mime: <$mime> extension: <{$this->mFinalExtension}>\n" );
global $wgMimeTypeBlacklist;
if ( $this->checkFileExtension( $mime, $wgMimeTypeBlacklist ) ) {
-
return array( 'filetype-badmime', $mime );
}
return array( 'filetype-badmime', $mime );
}
@@
-394,7
+388,6
@@
abstract class UploadBase {
$ieTypes = $magic->getIEMimeTypes( $this->mTempPath, $chunk, $extMime );
foreach ( $ieTypes as $ieType ) {
if ( $this->checkFileExtension( $ieType, $wgMimeTypeBlacklist ) ) {
$ieTypes = $magic->getIEMimeTypes( $this->mTempPath, $chunk, $extMime );
foreach ( $ieTypes as $ieType ) {
if ( $this->checkFileExtension( $ieType, $wgMimeTypeBlacklist ) ) {
-
return array( 'filetype-bad-ie-mime', $ieType );
}
}
return array( 'filetype-bad-ie-mime', $ieType );
}
}
@@
-413,7
+406,6
@@
abstract class UploadBase {
$status = $this->verifyPartialFile();
if ( $status !== true ) {
$status = $this->verifyPartialFile();
if ( $status !== true ) {
-
return $status;
}
return $status;
}
@@
-423,7
+415,6
@@
abstract class UploadBase {
if ( $wgVerifyMimeType ) {
# XXX: Missing extension will be caught by validateName() via getTitle()
if ( $this->mFinalExtension != '' && !$this->verifyExtension( $mime, $this->mFinalExtension ) ) {
if ( $wgVerifyMimeType ) {
# XXX: Missing extension will be caught by validateName() via getTitle()
if ( $this->mFinalExtension != '' && !$this->verifyExtension( $mime, $this->mFinalExtension ) ) {
-
return array( 'filetype-mime-mismatch', $this->mFinalExtension, $mime );
}
}
return array( 'filetype-mime-mismatch', $this->mFinalExtension, $mime );
}
}
@@
-433,7
+424,6
@@
abstract class UploadBase {
if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
$svgStatus = $this->detectScriptInSvg( $this->mTempPath, false );
if ( $svgStatus !== false ) {
if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
$svgStatus = $this->detectScriptInSvg( $this->mTempPath, false );
if ( $svgStatus !== false ) {
-
return $svgStatus;
}
}
return $svgStatus;
}
}
@@
-451,7
+441,6
@@
abstract class UploadBase {
Hooks::run( 'UploadVerifyFile', array( $this, $mime, &$status ) );
if ( $status !== true ) {
Hooks::run( 'UploadVerifyFile', array( $this, $mime, &$status ) );
if ( $status !== true ) {
-
return $status;
}
return $status;
}
@@
-480,20
+469,17
@@
abstract class UploadBase {
$mime = $this->mFileProps['file-mime'];
$status = $this->verifyMimeType( $mime );
if ( $status !== true ) {
$mime = $this->mFileProps['file-mime'];
$status = $this->verifyMimeType( $mime );
if ( $status !== true ) {
-
return $status;
}
# check for htmlish code and javascript
if ( !$wgDisableUploadScriptChecks ) {
if ( self::detectScript( $this->mTempPath, $mime, $this->mFinalExtension ) ) {
return $status;
}
# check for htmlish code and javascript
if ( !$wgDisableUploadScriptChecks ) {
if ( self::detectScript( $this->mTempPath, $mime, $this->mFinalExtension ) ) {
-
return array( 'uploadscripted' );
}
if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
$svgStatus = $this->detectScriptInSvg( $this->mTempPath, true );
if ( $svgStatus !== false ) {
return array( 'uploadscripted' );
}
if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
$svgStatus = $this->detectScriptInSvg( $this->mTempPath, true );
if ( $svgStatus !== false ) {
-
return $svgStatus;
}
}
return $svgStatus;
}
}
@@
-509,12
+495,10
@@
abstract class UploadBase {
$errors = $zipStatus->getErrorsArray();
$error = reset( $errors );
if ( $error[0] !== 'zip-wrong-format' ) {
$errors = $zipStatus->getErrorsArray();
$error = reset( $errors );
if ( $error[0] !== 'zip-wrong-format' ) {
-
return $error;
}
}
if ( $this->mJavaDetected ) {
return $error;
}
}
if ( $this->mJavaDetected ) {
-
return array( 'uploadjava' );
}
}
return array( 'uploadjava' );
}
}
@@
-522,7
+506,6
@@
abstract class UploadBase {
# Scan the uploaded file for viruses
$virus = $this->detectVirus( $this->mTempPath );
if ( $virus ) {
# Scan the uploaded file for viruses
$virus = $this->detectVirus( $this->mTempPath );
if ( $virus ) {
-
return array( 'uploadvirus', $virus );
}
return array( 'uploadvirus', $virus );
}
@@
-1076,7
+1059,6
@@
abstract class UploadBase {
$chunk = strtolower( $chunk );
if ( !$chunk ) {
$chunk = strtolower( $chunk );
if ( !$chunk ) {
-
return false;
}
return false;
}
@@
-1100,7
+1082,6
@@
abstract class UploadBase {
# check for HTML doctype
if ( preg_match( "/<!DOCTYPE *X?HTML/i", $chunk ) ) {
# check for HTML doctype
if ( preg_match( "/<!DOCTYPE *X?HTML/i", $chunk ) ) {
-
return true;
}
return true;
}
@@
-1108,7
+1089,6
@@
abstract class UploadBase {
// PHP/expat will interpret the given encoding in the xml declaration (bug 47304)
if ( $extension == 'svg' || strpos( $mime, 'image/svg' ) === 0 ) {
if ( self::checkXMLEncodingMissmatch( $file ) ) {
// PHP/expat will interpret the given encoding in the xml declaration (bug 47304)
if ( $extension == 'svg' || strpos( $mime, 'image/svg' ) === 0 ) {
if ( self::checkXMLEncodingMissmatch( $file ) ) {
-
return true;
}
}
return true;
}
}