aaaand one more
[lhc/web/wiklou.git] / includes / ProtectionForm.php
index 011c3ca..788b565 100644 (file)
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
- *
- * @addtogroup SpecialPage
  */
 
 /**
  * @todo document, briefly.
+ * @addtogroup SpecialPage
  */
 class ProtectionForm {
        var $mRestrictions = array();
@@ -100,7 +99,7 @@ class ProtectionForm {
                        return;
                }
 
-               list( $cascadeSources, $restrictions ) = $this->mTitle->getCascadeProtectionSources();
+               list( $cascadeSources, /* $restrictions */ ) = $this->mTitle->getCascadeProtectionSources();
 
                if ( "" != $err ) {
                        $wgOut->setSubtitle( wfMsgHtml( 'formerror' ) );
@@ -114,7 +113,7 @@ class ProtectionForm {
                                $titles .= '* [[:' . $title->getPrefixedText() . "]]\n";
                        }
 
-                       $notice = wfMsg( 'protect-cascadeon' ) . "\r\n$titles";
+                       $notice = wfMsgExt( 'protect-cascadeon', array('parsemag'), count($cascadeSources) ) . "\r\n$titles";
 
                        $wgOut->addWikiText( $notice );
                }
@@ -201,6 +200,7 @@ class ProtectionForm {
                        // The submission needs to reenable the move permission selector
                        // if it's in locked mode, or some browsers won't submit the data.
                        $out .= wfOpenElement( 'form', array(
+                               'id' => 'mw-Protect-Form',
                                'action' => $this->mTitle->getLocalUrl( 'action=protect' ),
                                'method' => 'post',
                                'onsubmit' => 'protectEnable(true)' ) );
@@ -329,6 +329,7 @@ class ProtectionForm {
 
        function buildSubmit() {
                return wfElement( 'input', array(
+                       'id' => 'mw-Protect-submit',
                        'type' => 'submit',
                        'value' => wfMsg( 'confirm' ) ) );
        }
@@ -359,7 +360,7 @@ class ProtectionForm {
         * @access private
         */
        function showLogExtract( &$out ) {
-               # Show relevant lines from the deletion log:
+               # Show relevant lines from the protection log:
                $out->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'protect' ) ) . "</h2>\n" );
                $logViewer = new LogViewer(
                        new LogReader(