+ /**
+ * Convert submitted form data to format expected by RevisionDelete and
+ * redirect the request
+ */
+ private function redirectToRevDel() {
+ $archive = new PageArchive( $this->mTargetObj );
+
+ $revisions = array();
+
+ foreach ( $this->getRequest()->getValues() as $key => $val ) {
+ $matches = array();
+ if ( preg_match( "/^ts(\d{14})$/", $key, $matches ) ) {
+ $revisions[ $archive->getRevision( $matches[1] )->getId() ] = 1;
+ }
+ }
+ $query = array(
+ "type" => "revision",
+ "ids" => $revisions,
+ "target" => wfUrlencode( $this->mTargetObj->getPrefixedText() )
+ );
+ $url = SpecialPage::getTitleFor( "RevisionDelete" )->getFullURL( $query );
+ $this->getOutput()->redirect( $url );
+ }
+