Following r100264, update usages in core
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index 4bf404f..1163a96 100644 (file)
@@ -643,11 +643,8 @@ class SpecialUndelete extends SpecialPage {
        }
 
        function execute( $par ) {
+               $this->checkPermissions();
                $user = $this->getUser();
-               if ( !$this->userCanExecute( $user ) ) {
-                       $this->displayRestrictionError();
-                       return;
-               }
 
                $this->setHeaders();
                $this->outputHeader();
@@ -865,7 +862,7 @@ class SpecialUndelete extends SpecialPage {
                        Xml::element( 'input', array(
                                'type' => 'hidden',
                                'name' => 'wpEditToken',
-                               'value' => $user->editToken() ) ) .
+                               'value' => $user->getEditToken() ) ) .
                        Xml::element( 'input', array(
                                'type' => 'submit',
                                'name' => 'preview',
@@ -971,7 +968,7 @@ class SpecialUndelete extends SpecialPage {
                                'action' => $this->getTitle()->getLocalURL(
                                        'target=' . urlencode( $this->mTarget ) .
                                        '&file=' . urlencode( $key ) .
-                                       '&token=' . urlencode( $this->getUser()->editToken( $key ) ) )
+                                       '&token=' . urlencode( $this->getUser()->getEditToken( $key ) ) )
                                )
                        ) .
                        Xml::submitButton( wfMsg( 'undelete-show-file-submit' ) ) .
@@ -1146,7 +1143,7 @@ class SpecialUndelete extends SpecialPage {
                if ( $this->mAllowed ) {
                        # Slip in the hidden controls here
                        $misc  = Html::hidden( 'target', $this->mTarget );
-                       $misc .= Html::hidden( 'wpEditToken', $this->getUser()->editToken() );
+                       $misc .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() );
                        $misc .= Xml::closeElement( 'form' );
                        $out->addHTML( $misc );
                }
@@ -1304,7 +1301,7 @@ class SpecialUndelete extends SpecialPage {
                                array(
                                        'target' => $this->mTargetObj->getPrefixedText(),
                                        'file' => $key,
-                                       'token' => $this->getUser()->editToken( $key )
+                                       'token' => $this->getUser()->getEditToken( $key )
                                )
                        );
                        if( $file->isDeleted( File::DELETED_FILE ) ) {