Index: trunk/phase3/includes/WikiPage.php |
— | — | @@ -1250,7 +1250,7 @@ |
1251 | 1251 | return false; |
1252 | 1252 | } |
1253 | 1253 | |
1254 | | - if ( !$this->mTitle->userCan( 'protect' ) ) { |
| 1254 | + if ( count( $this->mTitle->getUserPermissionsErrors( 'protect', $user ) ) ) { |
1255 | 1255 | wfDebug( "updateRestrictions failed: insufficient permissions\n" ); |
1256 | 1256 | return false; |
1257 | 1257 | } |