From Meta, a Wikimedia project coordination wiki
? config/LocalSettings.php
Index: includes/Article.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/Article.php,v
retrieving revision 1.130
diff -w -B -r1.130 Article.php
717c717
< global $wgUser, $wgOut;
---
> global $wgUser, $wgOut, $wgRequest;
731a733,738
>
> $confirm = $wgRequest->getBool( 'wpConfirmProtect' ) && $wgRequest->wasPosted();
> $reason = $wgRequest->getText( 'wpReasonProtect' );
>
> if ( $confirm ) {
>
738c746
< $log->addEntry( wfMsg( "unprotectedarticle", $this->mTitle->getPrefixedText() ), "" );
---
> $log->addEntry( wfMsg( "unprotectedarticle", $this->mTitle->getPrefixedText() ), $reason );
740c748
< $log->addEntry( wfMsg( "protectedarticle", $this->mTitle->getPrefixedText() ), "" );
---
> $log->addEntry( wfMsg( "protectedarticle", $this->mTitle->getPrefixedText() ), $reason );
742a751,818
> return;
> } else {
> $reason = htmlspecialchars( wfMsg( "protectreason" ) );
> return $this->confirmProtect( "", $reason, $limit );
> }
> }
>
> # Output protection confirmation dialog
> function confirmProtect( $par, $reason, $limit = "sysop" )
> {
> global $wgOut;
>
> wfDebug( "Article::confirmProtect\n" );
>
> $sub = htmlspecialchars( $this->mTitle->getPrefixedText() );
> $wgOut->setRobotpolicy( "noindex,nofollow" );
>
> $check = "";
> $protcom = "";
>
> if ( $limit === "" ) {
> $wgOut->setSubtitle( wfMsg( "unprotectsub", $sub ) );
> $wgOut->addWikiText( wfMsg( "confirmunprotecttext" ) );
> $check = htmlspecialchars( wfMsg( "confirmunprotect" ) );
> $protcom = htmlspecialchars( wfMsg( "unprotectcomment" ) );
> $formaction = $this->mTitle->escapeLocalURL( "action=unprotect" . $par );
> } else {
> $wgOut->setSubtitle( wfMsg( "protectsub", $sub ) );
> $wgOut->addWikiText( wfMsg( "confirmprotecttext" ) );
> $check = htmlspecialchars( wfMsg( "confirmprotect" ) );
> $protcom = htmlspecialchars( wfMsg( "protectcomment" ) );
> $formaction = $this->mTitle->escapeLocalURL( "action=protect" . $par );
> }
>
> $confirm = htmlspecialchars( wfMsg( "confirm" ) );
>
> $wgOut->addHTML( "
> <form id='protectconfirm' method='post' action=\"{$formaction}\">
> <table border='0'>
> <tr>
> <td align='right'>
> <label for='wpReasonProtect'>{$protcom}:</label>
> </td>
> <td align='left'>
> <input type='text' size='60' name='wpReasonProtect' id='wpReasonProtect' value=\"" . htmlspecialchars( $reason ) . "\" />
> </td>
> </tr>
> <tr>
> <td> </td>
> </tr>
> <tr>
> <td align='right'>
> <input type='checkbox' name='wpConfirmProtect' value='1' id='wpConfirmProtect' />
> </td>
> <td>
> <label for='wpConfirmProtect'>{$check}</label>
> </td>
> </tr>
> <tr>
> <td> </td>
> <td>
> <input type='submit' name='wpConfirmProtectB' value=\"{$confirm}\" />
> </td>
> </tr>
> </table>
> </form>\n" );
>
> $wgOut->returnToMain( false );
Index: languages/Language.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/languages/Language.php,v
retrieving revision 1.174
diff -w -B -r1.174 Language.php
1240a1241,1249
> "protectsub" =>"(Protecting \"$1\")",
> "confirmprotecttext" => "Do you really want to protect this page?",
> "confirmprotect" => "Confirm protection",
> "protectcomment" => "Reason for protecting",
> "unprotectsub" =>"(Unprotecting \"$1\")",
> "confirmunprotecttext" => "Do you really want to unprotect this page?",
> "confirmunprotect" => "Confirm unprotection",
> "unprotectcomment" => "Reason for unprotecting",
> "protectreason" => "(give a reason)",