*/
function wfSpecialRevisiondelete( $par = null ) {
- global $wgOut, $wgRequest, $wgUser;
+ global $wgOut, $wgRequest;
$target = $wgRequest->getVal( 'target' );
$oldid = $wgRequest->getIntArray( 'oldid' );
- $sk = $wgUser->getSkin();
$page = Title::newFromUrl( $target );
if( is_null( $page ) ) {
}
}
+/**
+ * Implements the GUI for Revision Deletion.
+ * @addtogroup SpecialPage
+ */
class RevisionDeleteForm {
/**
* @param Title $page
$hidden[] = wfHidden( 'oldid[]', $revid );
}
- $special = Title::makeTitle( NS_SPECIAL, 'Revisiondelete' );
+ $special = SpecialPage::getTitleFor( 'Revisiondelete' );
$wgOut->addHtml( wfElement( 'form', array(
'method' => 'post',
'action' => $special->getLocalUrl( 'action=submit' ) ),
function extractBitfield( $request ) {
$bitfield = 0;
foreach( $this->checks as $item ) {
- list( $message, $name, $field ) = $item;
+ list( /* message */ , $name, $field ) = $item;
if( $request->getCheck( $name ) ) {
$bitfield |= $field;
}
function save( $bitfield, $reason ) {
$dbw = wfGetDB( DB_MASTER );
$deleter = new RevisionDeleter( $dbw );
- $ok = $deleter->setVisibility( $this->revisions, $bitfield, $reason );
+ $deleter->setVisibility( $this->revisions, $bitfield, $reason );
}
}
-
+/**
+ * Implements the actions for Revision Deletion.
+ * @addtogroup SpecialPage
+ */
class RevisionDeleter {
function __construct( $db ) {
$this->db = $db;
}
}
-?>
+