]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/specials/SpecialRemoveRestrictions.php
MediaWiki 1.16.0
[autoinstallsdev/mediawiki.git] / includes / specials / SpecialRemoveRestrictions.php
index ded6cbe3d7e603d6f194da1c0a67ef1857575ecb..a3428a5a5941f72f22ba4c5bc7674b38649c5655 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 function wfSpecialRemoveRestrictions() {
-       global $wgOut, $wgRequest, $wgUser, $wgLang, $wgTitle;
+       global $wgOut, $wgRequest, $wgUser, $wgLang;
        $sk = $wgUser->getSkin();
-
+       $title = SpecialPage::getTitleFor( 'RemoveRestrictions' );
        $id = $wgRequest->getVal( 'id' );
        if( !is_numeric( $id ) ) {
                $wgOut->addWikiMsg( 'removerestrictions-noid' );
@@ -36,17 +36,17 @@ function wfSpecialRemoveRestrictions() {
        if( $result )
                $wgOut->addHTML( '<strong class="success">' . wfMsgExt( 'removerestrictions-success',
                        'parseinline', $r->getSubjectText() ) . '</strong>' );
-       $wgOut->addHTML( Xml::openElement( 'form', array( 'action' => $wgTitle->getLocalUrl( array( 'id' => $id ) ),
+       $wgOut->addHTML( Xml::openElement( 'form', array( 'action' => $title->getLocalUrl( array( 'id' => $id ) ),
                'method' => 'post' ) ) );
        $wgOut->addHTML( Xml::buildForm( $form, 'removerestrictions-submit' ) );
        $wgOut->addHTML( Xml::hidden( 'id', $r->getId() ) );
-       $wgOut->addHTML( Xml::hidden( 'title', $wgTitle->getPrefixedDbKey() ) );
+       $wgOut->addHTML( Xml::hidden( 'title', $title->getPrefixedDbKey() ) );
        $wgOut->addHTML( Xml::hidden( 'edittoken', $wgUser->editToken() ) );
        $wgOut->addHTML( "</form></fieldset>" );
 }
 
 function wfSpecialRemoveRestrictionsProcess( $r ) {
-       global $wgUser, $wgRequest;
+       global $wgRequest;
        $reason = $wgRequest->getVal( 'reason' );
        $result = $r->delete();
        $log = new LogPage( 'restrict' );