Merge "Fix use of GenderCache in ApiPageSet::processTitlesArray"
[lhc/web/wiklou.git] / includes / actions / HistoryAction.php
index 958ec06..db874f2 100644 (file)
@@ -95,6 +95,7 @@ class HistoryAction extends FormlessAction {
        private function preCacheMessages() {
                // Precache various messages
                if ( !isset( $this->message ) ) {
+                       $this->message = [];
                        $msgs = [ 'cur', 'last', 'pipe-separator' ];
                        foreach ( $msgs as $msg ) {
                                $this->message[$msg] = $this->msg( $msg )->escaped();
@@ -265,7 +266,8 @@ class HistoryAction extends FormlessAction {
                                'value' => $tagFilter,
                        ]
                ];
-               if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
+               $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+               if ( $permissionManager->userHasRight( $this->getUser(), 'deletedhistory' ) ) {
                        $fields[] = [
                                'type' => 'check',
                                'label' => $this->msg( 'history-show-deleted' )->text(),