dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "ApiUpload: Better handle ApiMessage errors from UploadVerifyFile hook"
[lhc/web/wiklou.git]
/
includes
/
content
/
AbstractContent.php
diff --git
a/includes/content/AbstractContent.php
b/includes/content/AbstractContent.php
index
6542d7d
..
811b241
100644
(file)
--- a/
includes/content/AbstractContent.php
+++ b/
includes/content/AbstractContent.php
@@
-230,11
+230,11
@@
abstract class AbstractContent implements Content {
$parserOutput = $this->getParserOutput( $title, null, null, false );
}
$parserOutput = $this->getParserOutput( $title, null, null, false );
}
- $updates =
array(
+ $updates =
[
new LinksUpdate( $title, $parserOutput, $recursive )
new LinksUpdate( $title, $parserOutput, $recursive )
-
)
;
+
]
;
- Hooks::run( 'SecondaryDataUpdates',
array( $title, $old, $recursive, $parserOutput, &$updates )
);
+ Hooks::run( 'SecondaryDataUpdates',
[ $title, $old, $recursive, $parserOutput, &$updates ]
);
return $updates;
}
return $updates;
}
@@
-254,7
+254,7
@@
abstract class AbstractContent implements Content {
}
// recursive check to follow double redirects
$recurse = $wgMaxRedirects;
}
// recursive check to follow double redirects
$recurse = $wgMaxRedirects;
- $titles =
array( $title )
;
+ $titles =
[ $title ]
;
while ( --$recurse > 0 ) {
if ( $title->isRedirect() ) {
$page = WikiPage::factory( $title );
while ( --$recurse > 0 ) {
if ( $title->isRedirect() ) {
$page = WikiPage::factory( $title );
@@
-281,7
+281,7
@@
abstract class AbstractContent implements Content {
*
* @since 1.21
*
*
* @since 1.21
*
- * @return null
+ * @return
Title|
null
*
* @see Content::getRedirectTarget
*/
*
* @see Content::getRedirectTarget
*/
@@
-382,7
+382,7
@@
abstract class AbstractContent implements Content {
*
* @see Content::preloadTransform
*/
*
* @see Content::preloadTransform
*/
- public function preloadTransform( Title $title, ParserOptions $popts, $params =
array()
) {
+ public function preloadTransform( Title $title, ParserOptions $popts, $params =
[]
) {
return $this;
}
return $this;
}
@@
-412,9
+412,9
@@
abstract class AbstractContent implements Content {
* @see Content::getDeletionUpdates
*/
public function getDeletionUpdates( WikiPage $page, ParserOutput $parserOutput = null ) {
* @see Content::getDeletionUpdates
*/
public function getDeletionUpdates( WikiPage $page, ParserOutput $parserOutput = null ) {
- return
array(
+ return
[
new LinksDeletionUpdate( $page ),
new LinksDeletionUpdate( $page ),
-
)
;
+
]
;
}
/**
}
/**
@@
-446,14
+446,14
@@
abstract class AbstractContent implements Content {
*/
public function convert( $toModel, $lossy = '' ) {
if ( $this->getModel() === $toModel ) {
*/
public function convert( $toModel, $lossy = '' ) {
if ( $this->getModel() === $toModel ) {
- //nothing to do, shorten out.
+ //
nothing to do, shorten out.
return $this;
}
$lossy = ( $lossy === 'lossy' ); // string flag, convert to boolean for convenience
$result = false;
return $this;
}
$lossy = ( $lossy === 'lossy' ); // string flag, convert to boolean for convenience
$result = false;
- Hooks::run( 'ConvertContent',
array( $this, $toModel, $lossy, &$result )
);
+ Hooks::run( 'ConvertContent',
[ $this, $toModel, $lossy, &$result ]
);
return $result;
}
return $result;
}
@@
-488,7
+488,7
@@
abstract class AbstractContent implements Content {
$po = new ParserOutput();
if ( Hooks::run( 'ContentGetParserOutput',
$po = new ParserOutput();
if ( Hooks::run( 'ContentGetParserOutput',
-
array( $this, $title, $revId, $options, $generateHtml, &$po )
) ) {
+
[ $this, $title, $revId, $options, $generateHtml, &$po ]
) ) {
// Save and restore the old value, just in case something is reusing
// the ParserOptions object in some weird way.
// Save and restore the old value, just in case something is reusing
// the ParserOptions object in some weird way.
@@
-498,7
+498,7
@@
abstract class AbstractContent implements Content {
$options->setRedirectTarget( $oldRedir );
}
$options->setRedirectTarget( $oldRedir );
}
- Hooks::run( 'ContentAlterParserOutput',
array( $this, $title, $po )
);
+ Hooks::run( 'ContentAlterParserOutput',
[ $this, $title, $po ]
);
return $po;
}
return $po;
}