Index: trunk/phase3/includes/Title.php |
— | — | @@ -1522,7 +1522,7 @@ |
1523 | 1523 | */ |
1524 | 1524 | private function checkActionPermissions( $action, $user, $errors, $doExpensiveQueries, $short ) { |
1525 | 1525 | if ( $action == 'protect' ) { |
1526 | | - if ( $this->getUserPermissionsErrors( 'edit', $user ) != array() ) { |
| 1526 | + if ( count( $this->getUserPermissionsErrorsInternal( 'edit', $user, $doExpensiveQueries, true ) ) ) { |
1527 | 1527 | // If they can't edit, they shouldn't protect. |
1528 | 1528 | $errors[] = array( 'protect-cantedit' ); |
1529 | 1529 | } |