if ( $outputPage->isPrintable() ) {
$parserOptions->setIsPrintable( true );
$poOptions['enableSectionEditLinks'] = false;
- } elseif ( $this->viewIsRenderAction
- || !$this->isCurrent() || !$this->getTitle()->quickUserCan( 'edit', $user )
+ } elseif ( $this->viewIsRenderAction || !$this->isCurrent() ||
+ !MediaWikiServices::getInstance()->getPermissionManager()
+ ->quickUserCan( 'edit', $user, $this->getTitle() )
) {
$poOptions['enableSectionEditLinks'] = false;
}
$title = $this->getTitle();
$rc = false;
- if ( !$title->quickUserCan( 'patrol', $user )
+ if ( !MediaWikiServices::getInstance()->getPermissionManager()
+ ->quickUserCan( 'patrol', $user, $title )
|| !( $wgUseRCPatrol || $wgUseNPPatrol
|| ( $wgUseFilePatrol && $title->inNamespace( NS_FILE ) ) )
) {
# Show error message
$oldid = $this->getOldID();
+ $pm = MediaWikiServices::getInstance()->getPermissionManager();
if ( !$oldid && $title->getNamespace() === NS_MEDIAWIKI && $title->hasSourceText() ) {
// use fake Content object for system message
$parserOptions = ParserOptions::newCanonical( 'canonical' );
} else {
if ( $oldid ) {
$text = wfMessage( 'missing-revision', $oldid )->plain();
- } elseif ( $title->quickUserCan( 'create', $this->getContext()->getUser() )
- && $title->quickUserCan( 'edit', $this->getContext()->getUser() )
+ } elseif ( $pm->quickUserCan( 'create', $this->getContext()->getUser(), $title ) &&
+ $pm->quickUserCan( 'edit', $this->getContext()->getUser(), $title )
) {
$message = $this->getContext()->getUser()->isLoggedIn() ? 'noarticletext' : 'noarticletextanon';
$text = wfMessage( $message )->plain();
$outputPage->enableOOUI();
+ $fields = [];
+
$options = Xml::listDropDownOptions(
$ctx->msg( 'deletereason-dropdown' )->inContentLanguage()->text(),
[ 'other' => $ctx->msg( 'deletereasonotherlist' )->inContentLanguage()->text() ]
return $cacheable;
}
- /**#@-*/
+ /** #@- */
/**
* Lightweight method to get the parser output for a page, checking the parser cache
* Call to WikiPage function for backwards compatibility.
* @see WikiPage::getComment
*/
- public function getComment( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getComment( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
return $this->mPage->getComment( $audience, $user );
}
* Call to WikiPage function for backwards compatibility.
* @see WikiPage::getCreator
*/
- public function getCreator( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getCreator( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
return $this->mPage->getCreator( $audience, $user );
}
* Call to WikiPage function for backwards compatibility.
* @see WikiPage::getUser
*/
- public function getUser( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getUser( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
return $this->mPage->getUser( $audience, $user );
}
* Call to WikiPage function for backwards compatibility.
* @see WikiPage::getUserText
*/
- public function getUserText( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getUserText( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
return $this->mPage->getUserText( $audience, $user );
}