Merge "Normalise inline comment markers to "//" in WikiPage.php"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 5 Jan 2013 22:07:32 +0000 (22:07 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 5 Jan 2013 22:07:32 +0000 (22:07 +0000)
1  2 
includes/WikiPage.php

@@@ -2301,16 -2290,12 +2301,16 @@@ class WikiPage extends Page implements 
                                                ->inContentLanguage()->text();
                                }
  
 -                              $protectDescription .= ') ';
 +                              if ( $protectDescription !== '' ) {
 +                                      $protectDescription .= wfMessage( 'word-separator' )->inContentLanguage()->text();
 +                              }
 +                              $protectDescription .= wfMessage( 'protect-summary-desc' )
 +                                      ->params( $actionText, $restrictionsText, $expiryText )
 +                                      ->inContentLanguage()->text();
                        }
                }
 -              $protectDescription = trim( $protectDescription );
  
-               if ( $id ) { # Protection of existing page
+               if ( $id ) { // Protection of existing page
                        if ( !wfRunHooks( 'ArticleProtect', array( &$this, &$user, $limit, $reason ) ) ) {
                                return Status::newGood();
                        }
                                $editComment .= ": $reason";
                        }
                        if ( $protectDescription ) {
 -                              $editComment .= " ($protectDescription)";
 +                              $editComment .= wfMessage( 'word-separator' )->inContentLanguage()->text();
 +                              $editComment .= wfMessage( 'parentheses' )->params( $protectDescription )->inContentLanguage()->text();
                        }
                        if ( $cascade ) {
 -                              // FIXME: Should use 'brackets' message.
 -                              $editComment .= ' [' . wfMessage( 'protect-summary-cascade' )
 -                                      ->inContentLanguage()->text() . ']';
 +                              $editComment .= wfMessage( 'word-separator' )->inContentLanguage()->text();
 +                              $editComment .= wfMessage( 'brackets' )->params(
 +                                      wfMessage( 'protect-summary-cascade' )->inContentLanguage()->text()
 +                              )->inContentLanguage()->text();
                        }
  
-                       # Insert a null revision
+                       // Insert a null revision
                        $nullRevision = Revision::newNullRevision( $dbw, $id, $editComment, true );
                        $nullRevId = $nullRevision->insertOn( $dbw );