Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1534,7 +1534,7 @@ |
1535 | 1535 | protected function showCustomIntro() { |
1536 | 1536 | if ( $this->editintro ) { |
1537 | 1537 | $title = Title::newFromText( $this->editintro ); |
1538 | | - if ( $title instanceof Title && $title->exists() && $title->userCanRead() ) { |
| 1538 | + if ( $title instanceof Title && $title->exists() && $title->userCan( 'read' ) ) { |
1539 | 1539 | global $wgOut; |
1540 | 1540 | // Added using template syntax, to take <noinclude>'s into account. |
1541 | 1541 | $wgOut->addWikiTextTitleTidy( '{{:' . $title->getFullText() . '}}', $this->mTitle ); |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2112,7 +2112,7 @@ |
2113 | 2113 | |
2114 | 2114 | # Don't return to a page the user can't read otherwise |
2115 | 2115 | # we'll end up in a pointless loop |
2116 | | - if ( $displayReturnto && $displayReturnto->userCanRead() ) { |
| 2116 | + if ( $displayReturnto && $displayReturnto->userCan( 'read' ) ) { |
2117 | 2117 | $this->returnToMain( null, $displayReturnto ); |
2118 | 2118 | } |
2119 | 2119 | } else { |
Index: trunk/phase3/includes/api/ApiQuery.php |
— | — | @@ -483,7 +483,7 @@ |
484 | 484 | $titles = $pageSet->getGoodTitles(); |
485 | 485 | if ( count( $titles ) ) { |
486 | 486 | foreach ( $titles as $title ) { |
487 | | - if ( $title->userCanRead() ) { |
| 487 | + if ( $title->userCan( 'read' ) ) { |
488 | 488 | $exportTitles[] = $title; |
489 | 489 | } |
490 | 490 | } |
Index: trunk/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -191,7 +191,7 @@ |
192 | 192 | if ( isset( $prop['content'] ) || !is_null( $this->difftotext ) ) { |
193 | 193 | // For each page we will request, the user must have read rights for that page |
194 | 194 | foreach ( $pageSet->getGoodTitles() as $title ) { |
195 | | - if ( !$title->userCanRead() ) { |
| 195 | + if ( !$title->userCan( 'read' ) ) { |
196 | 196 | $this->dieUsage( |
197 | 197 | 'The current user is not allowed to read ' . $title->getPrefixedText(), |
198 | 198 | 'accessdenied' ); |
Index: trunk/phase3/includes/api/ApiQueryInfo.php |
— | — | @@ -378,7 +378,7 @@ |
379 | 379 | $pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ); |
380 | 380 | $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ), PROTO_CURRENT ); |
381 | 381 | } |
382 | | - if ( $this->fld_readable && $title->userCanRead() ) { |
| 382 | + if ( $this->fld_readable && $title->userCan( 'read' ) ) { |
383 | 383 | $pageInfo['readable'] = ''; |
384 | 384 | } |
385 | 385 | |
Index: trunk/phase3/includes/specials/SpecialExport.php |
— | — | @@ -326,7 +326,7 @@ |
327 | 327 | if( is_null( $title ) ) { |
328 | 328 | continue; #TODO: perhaps output an <error> tag or something. |
329 | 329 | } |
330 | | - if( !$title->userCanRead() ) { |
| 330 | + if( !$title->userCan( 'read' ) ) { |
331 | 331 | continue; #TODO: perhaps output an <error> tag or something. |
332 | 332 | } |
333 | 333 | |
Index: trunk/phase3/img_auth.php |
— | — | @@ -116,8 +116,8 @@ |
117 | 117 | } |
118 | 118 | |
119 | 119 | // Check user authorization for this title |
120 | | - // UserCanRead Checks Whitelist too |
121 | | - if ( !$title->userCanRead() ) { |
| 120 | + // Checks Whitelist too |
| 121 | + if ( !$title->userCan( 'read' ) ) { |
122 | 122 | wfForbidden( 'img-auth-accessdenied', 'img-auth-noread', $name ); |
123 | 123 | return; |
124 | 124 | } |
Index: trunk/phase3/thumb.php |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | |
120 | 120 | // Check permissions if there are read restrictions |
121 | 121 | if ( !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) ) { |
122 | | - if ( !$img->getTitle()->userCanRead() ) { |
| 122 | + if ( !$img->getTitle()->userCan( 'read' ) ) { |
123 | 123 | wfThumbError( 403, 'Access denied. You do not have permission to access ' . |
124 | 124 | 'the source file.' ); |
125 | 125 | wfProfileOut( __METHOD__ ); |