jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404083 )

Change subject: Fix extension to support latest mediawiki master branch
......................................................................


Fix extension to support latest mediawiki master branch

Change-Id: Ie05b83f84235cfc493cd91330ec2a57e4db80d29
---
M ActionDeletePagePermanently.php
1 file changed, 10 insertions(+), 12 deletions(-)

Approvals:
  Paladox: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ActionDeletePagePermanently.php b/ActionDeletePagePermanently.php
index 0ad913a..2de3850 100644
--- a/ActionDeletePagePermanently.php
+++ b/ActionDeletePagePermanently.php
@@ -3,19 +3,17 @@
 class ActionDeletePagePermanently extends FormAction {
 
        public static function AddSkinHook( SkinTemplate &$sktemplate, array 
&$links ) {
-               if ( !$sktemplate->getUser()->isAllowed( 'deleteperm' ) ) {
-                       return false;
-               }
+               if ( $sktemplate->getUser()->isAllowed( 'deleteperm' ) ) {
+                       $title = $sktemplate->getRelevantTitle();
+                       $action = self::getActionName( $sktemplate );
 
-               $title = $sktemplate->getRelevantTitle();
-               $action = self::getActionName( $sktemplate );
-
-               if ( self::canDeleteTitle( $title ) ) {
-                       $links['actions']['delete_page_permanently'] = [
-                               'class' => ( $action === 
'delete_page_permanently' ) ? 'selected' : false,
-                               'text' => $sktemplate->msg( 
'deletepagesforgood-delete_permanently' )->text(),
-                               'href' => $title->getLocalUrl( 
'action=delete_page_permanently' )
-                       ];
+                       if ( self::canDeleteTitle( $title ) ) {
+                               $links['actions']['delete_page_permanently'] = [
+                                       'class' => ( $action === 
'delete_page_permanently' ) ? 'selected' : false,
+                                       'text' => $sktemplate->msg( 
'deletepagesforgood-delete_permanently' )->text(),
+                                       'href' => $title->getLocalUrl( 
'action=delete_page_permanently' )
+                               ];
+                       }
                }
 
                return true;

-- 
To view, visit https://gerrit.wikimedia.org/r/404083
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie05b83f84235cfc493cd91330ec2a57e4db80d29
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DeletePagesForGood
Gerrit-Branch: master
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to