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 "Parser: Add Title type hints"
[lhc/web/wiklou.git]
/
includes
/
logging
/
BlockLogFormatter.php
diff --git
a/includes/logging/BlockLogFormatter.php
b/includes/logging/BlockLogFormatter.php
index
ead290f
..
d49e3c5
100644
(file)
--- a/
includes/logging/BlockLogFormatter.php
+++ b/
includes/logging/BlockLogFormatter.php
@@
-22,6
+22,8
@@
* @since 1.25
*/
* @since 1.25
*/
+use MediaWiki\MediaWikiServices;
+
/**
* This class formats block log entries.
*
/**
* This class formats block log entries.
*
@@
-138,7
+140,9
@@
class BlockLogFormatter extends LogFormatter {
$linkRenderer = $this->getLinkRenderer();
if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden
|| !( $subtype === 'block' || $subtype === 'reblock' )
$linkRenderer = $this->getLinkRenderer();
if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden
|| !( $subtype === 'block' || $subtype === 'reblock' )
- || !$this->context->getUser()->isAllowed( 'block' )
+ || !MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->userHasRight( $this->context->getUser(), 'block' )
) {
return '';
}
) {
return '';
}
@@
-262,6
+266,10
@@
class BlockLogFormatter extends LogFormatter {
return $params;
}
return $params;
}
+ /**
+ * @inheritDoc
+ * @suppress PhanTypeInvalidDimOffset
+ */
public function formatParametersForApi() {
$ret = parent::formatParametersForApi();
if ( isset( $ret['flags'] ) ) {
public function formatParametersForApi() {
$ret = parent::formatParametersForApi();
if ( isset( $ret['flags'] ) ) {