$user = $this->getContext()->getUser();
# Check permissions
- $permission_errors = $title->getUserPermissionsErrors( 'delete', $user );
- if ( count( $permission_errors ) ) {
- throw new PermissionsError( 'delete', $permission_errors );
+ $permissionErrors = $title->getUserPermissionsErrors( 'delete', $user );
+ if ( count( $permissionErrors ) ) {
+ throw new PermissionsError( 'delete', $permissionErrors );
}
# Read-only check...
public function confirmDelete( $reason ) {
wfDebug( "Article::confirmDelete\n" );
+ $title = $this->getTitle();
$outputPage = $this->getContext()->getOutput();
- $outputPage->setPageTitle( wfMessage( 'delete-confirm', $this->getTitle()->getPrefixedText() ) );
- $outputPage->addBacklinkSubtitle( $this->getTitle() );
+ $outputPage->setPageTitle( wfMessage( 'delete-confirm', $title->getPrefixedText() ) );
+ $outputPage->addBacklinkSubtitle( $title );
$outputPage->setRobotPolicy( 'noindex,nofollow' );
- $backlinkCache = $this->getTitle()->getBacklinkCache();
+ $backlinkCache = $title->getBacklinkCache();
if ( $backlinkCache->hasLinks( 'pagelinks' ) || $backlinkCache->hasLinks( 'templatelinks' ) ) {
$outputPage->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1\n</div>\n",
'deleting-backlinks-warning' );
} else {
$suppress = '';
}
- $checkWatch = $user->getBoolOption( 'watchdeletion' ) || $user->isWatched( $this->getTitle() );
+ $checkWatch = $user->getBoolOption( 'watchdeletion' ) || $user->isWatched( $title );
$form = Xml::openElement( 'form', array( 'method' => 'post',
- 'action' => $this->getTitle()->getLocalURL( 'action=delete' ), 'id' => 'deleteconfirm' ) ) .
+ 'action' => $title->getLocalURL( 'action=delete' ), 'id' => 'deleteconfirm' ) ) .
Xml::openElement( 'fieldset', array( 'id' => 'mw-delete-table' ) ) .
Xml::tags( 'legend', null, wfMessage( 'delete-legend' )->escaped() ) .
Xml::openElement( 'table', array( 'id' => 'mw-deleteconfirm-table' ) ) .
Xml::closeElement( 'fieldset' ) .
Html::hidden(
'wpEditToken',
- $user->getEditToken( array( 'delete', $this->getTitle()->getPrefixedText() ) )
+ $user->getEditToken( array( 'delete', $title->getPrefixedText() ) )
) .
Xml::closeElement( 'form' );
if ( $user->isAllowed( 'editinterface' ) ) {
- $title = Title::makeTitle( NS_MEDIAWIKI, 'Deletereason-dropdown' );
+ $dropdownTitle = Title::makeTitle( NS_MEDIAWIKI, 'Deletereason-dropdown' );
$link = Linker::link(
- $title,
+ $dropdownTitle,
wfMessage( 'delete-edit-reasonlist' )->escaped(),
array(),
array( 'action' => 'edit' )
$deleteLogPage = new LogPage( 'delete' );
$outputPage->addHTML( Xml::element( 'h2', null, $deleteLogPage->getName()->text() ) );
- LogEventsList::showLogExtract( $outputPage, 'delete',
- $this->getTitle()
- );
+ LogEventsList::showLogExtract( $outputPage, 'delete', $title );
}
/**