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
Use varargs for MessageLocalizer::msg and similar
[lhc/web/wiklou.git]
/
includes
/
actions
/
Action.php
diff --git
a/includes/actions/Action.php
b/includes/actions/Action.php
index
f288a5c
..
6497cab
100644
(file)
--- a/
includes/actions/Action.php
+++ b/
includes/actions/Action.php
@@
-22,7
+22,7
@@
use MediaWiki\MediaWikiServices;
/**
use MediaWiki\MediaWikiServices;
/**
- * @defgroup Actions Action
done on page
s
+ * @defgroup Actions Actions
*/
/**
*/
/**
@@
-101,8
+101,7
@@
abstract class Action implements MessageLocalizer {
if ( !class_exists( $classOrCallable ) ) {
return false;
}
if ( !class_exists( $classOrCallable ) ) {
return false;
}
- $obj = new $classOrCallable( $page, $context );
- return $obj;
+ return new $classOrCallable( $page, $context );
}
if ( is_callable( $classOrCallable ) ) {
}
if ( is_callable( $classOrCallable ) ) {
@@
-142,7
+141,7
@@
abstract class Action implements MessageLocalizer {
} else {
$actionName = 'view';
}
} else {
$actionName = 'view';
}
- } elseif ( $actionName == 'editredlink' ) {
+ } elseif ( $actionName ==
=
'editredlink' ) {
$actionName = 'edit';
}
$actionName = 'edit';
}
@@
-253,11
+252,12
@@
abstract class Action implements MessageLocalizer {
* Get a Message object with context set
* Parameters are the same as wfMessage()
*
* Get a Message object with context set
* Parameters are the same as wfMessage()
*
+ * @param string|string[]|MessageSpecifier $key
+ * @param mixed ...$params
* @return Message
*/
* @return Message
*/
- final public function msg( $key ) {
- $params = func_get_args();
- return $this->getContext()->msg( ...$params );
+ final public function msg( $key, ...$params ) {
+ return $this->getContext()->msg( $key, ...$params );
}
/**
}
/**
@@
-359,7
+359,7
@@
abstract class Action implements MessageLocalizer {
*/
protected function setHeaders() {
$out = $this->getOutput();
*/
protected function setHeaders() {
$out = $this->getOutput();
- $out->setRobotPolicy(
"noindex,nofollow"
);
+ $out->setRobotPolicy(
'noindex,nofollow'
);
$out->setPageTitle( $this->getPageTitle() );
$out->setSubtitle( $this->getDescription() );
$out->setArticleRelated( true );
$out->setPageTitle( $this->getPageTitle() );
$out->setSubtitle( $this->getDescription() );
$out->setArticleRelated( true );