public function execute($par)
 {
     $this->useTransactionalTimeLimit();
     $this->checkPermissions();
     $this->checkReadOnly();
     $output = $this->getOutput();
     $user = $this->getUser();
     $this->setHeaders();
     $this->outputHeader();
     $request = $this->getRequest();
     $this->submitClicked = $request->wasPosted() && $request->getBool('wpSubmit');
     # Handle our many different possible input types.
     $ids = $request->getVal('ids');
     if (!is_null($ids)) {
         # Allow CSV, for backwards compatibility, or a single ID for show/hide links
         $this->ids = explode(',', $ids);
     } else {
         # Array input
         $this->ids = array_keys($request->getArray('ids', array()));
     }
     // $this->ids = array_map( 'intval', $this->ids );
     $this->ids = array_unique(array_filter($this->ids));
     $this->typeName = $request->getVal('type');
     $this->targetObj = Title::newFromText($request->getText('target'));
     # For reviewing deleted files...
     $this->archiveName = $request->getVal('file');
     $this->token = $request->getVal('token');
     if ($this->archiveName && $this->targetObj) {
         $this->tryShowFile($this->archiveName);
         return;
     }
     $this->typeName = RevisionDeleter::getCanonicalTypeName($this->typeName);
     # No targets?
     if (!$this->typeName || count($this->ids) == 0) {
         throw new ErrorPageError('revdelete-nooldid-title', 'revdelete-nooldid-text');
     }
     # Allow the list type to adjust the passed target
     $this->targetObj = RevisionDeleter::suggestTarget($this->typeName, $this->targetObj, $this->ids);
     # We need a target page!
     if ($this->targetObj === null) {
         $output->addWikiMsg('undelete-header');
         return;
     }
     $this->typeLabels = self::$UILabels[$this->typeName];
     $list = $this->getList();
     $list->reset();
     $bitfield = $list->current()->getBits();
     $this->mIsAllowed = $user->isAllowed(RevisionDeleter::getRestriction($this->typeName));
     $canViewSuppressedOnly = $this->getUser()->isAllowed('viewsuppressed') && !$this->getUser()->isAllowed('suppressrevision');
     $pageIsSuppressed = $bitfield & Revision::DELETED_RESTRICTED;
     $this->mIsAllowed = $this->mIsAllowed && !($canViewSuppressedOnly && $pageIsSuppressed);
     $this->otherReason = $request->getVal('wpReason');
     # Give a link to the logs/hist for this page
     $this->showConvenienceLinks();
     # Initialise checkboxes
     $this->checks = array(array($this->typeLabels['check-label'], 'wpHidePrimary', RevisionDeleter::getRevdelConstant($this->typeName)), array('revdelete-hide-comment', 'wpHideComment', Revision::DELETED_COMMENT), array('revdelete-hide-user', 'wpHideUser', Revision::DELETED_USER));
     if ($user->isAllowed('suppressrevision')) {
         $this->checks[] = array('revdelete-hide-restricted', 'wpHideRestricted', Revision::DELETED_RESTRICTED);
     }
     # Either submit or create our form
     if ($this->mIsAllowed && $this->submitClicked) {
         $this->submit($request);
     } else {
         $this->showForm();
     }
     $qc = $this->getLogQueryCond();
     # Show relevant lines from the deletion log
     $deleteLogPage = new LogPage('delete');
     $output->addHTML("<h2>" . $deleteLogPage->getName()->escaped() . "</h2>\n");
     LogEventsList::showLogExtract($output, 'delete', $this->targetObj, '', array('lim' => 25, 'conds' => $qc, 'useMaster' => $this->wasSaved));
     # Show relevant lines from the suppression log
     if ($user->isAllowed('suppressionlog')) {
         $suppressLogPage = new LogPage('suppress');
         $output->addHTML("<h2>" . $suppressLogPage->getName()->escaped() . "</h2>\n");
         LogEventsList::showLogExtract($output, 'suppress', $this->targetObj, '', array('lim' => 25, 'conds' => $qc, 'useMaster' => $this->wasSaved));
     }
 }