Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php |
— | — | @@ -53,6 +53,7 @@ |
54 | 54 | array( $newRow->mOriginalRow, $newRow->mOriginalActions ) |
55 | 55 | ); |
56 | 56 | |
| 57 | + $origActions = $newRow->mOriginalActions; |
57 | 58 | unset( $newRow->mOriginalRow ); |
58 | 59 | unset( $newRow->mOriginalActions ); |
59 | 60 | |
— | — | @@ -64,12 +65,18 @@ |
65 | 66 | |
66 | 67 | // Check for restricted actions |
67 | 68 | global $wgAbuseFilterRestrictedActions; |
| 69 | + $allActions = array_keys( array_merge( |
| 70 | + array_filter( $actions ), |
| 71 | + array_filter( $origActions ) |
| 72 | + ) ); |
| 73 | + |
68 | 74 | if ( |
69 | | - array_intersect( |
70 | | - $wgAbuseFilterRestrictedActions, |
71 | | - array_keys( array_filter( $actions ) ) ) |
72 | | - && !$user->isAllowed( 'abusefilter-modify-restricted' ) ) |
73 | | - { |
| 75 | + count( array_intersect( |
| 76 | + $wgAbuseFilterRestrictedActions, |
| 77 | + $allActions |
| 78 | + ) ) |
| 79 | + && !$user->isAllowed( 'abusefilter-modify-restricted' ) |
| 80 | + ) { |
74 | 81 | $out->addHTML( |
75 | 82 | $this->buildFilterEditor( |
76 | 83 | wfMsgExt( 'abusefilter-edit-restricted', 'parse' ), |