Merge "Replace some occurrences of wfMsg* by alternatives. Undeprecated wfMsgReplaceA...
authorIAlex <ialex.wiki@gmail.com>
Mon, 10 Sep 2012 17:33:37 +0000 (17:33 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 10 Sep 2012 17:33:37 +0000 (17:33 +0000)
1  2 
includes/EditPage.php
includes/GlobalFunctions.php
includes/OutputPage.php

diff --combined includes/EditPage.php
@@@ -2459,7 -2459,7 +2459,7 @@@ HTM
                wfRunHooks( 'EditPageCopyrightWarning', array( $title, &$copywarnMsg ) );
  
                return "<div id=\"editpage-copywarn\">\n" .
-                       call_user_func_array( "wfMsgNoTrans", $copywarnMsg ) . "\n</div>";
+                       call_user_func_array( 'wfMessage', $copywarnMsg )->plain() . "\n</div>";
        }
  
        protected function showStandardInputs( &$tabindex = 2 ) {
                $edithelpurl = Skin::makeInternalOrExternalUrl( wfMessage( 'edithelppage' )->inContentLanguage()->text() );
                $edithelp = '<a target="helpwindow" href="' . $edithelpurl . '">' .
                        wfMessage( 'edithelp' )->escaped() . '</a> ' .
 -                      wfMessage( 'newwindow' )->escaped();
 +                      wfMessage( 'newwindow' )->parse();
                $wgOut->addHTML( "      <span class='cancelLink'>{$cancel}</span>\n" );
                $wgOut->addHTML( "      <span class='editHelp'>{$edithelp}</span>\n" );
                $wgOut->addHTML( "</div><!-- editButtons -->\n</div><!-- editOptions -->\n" );
@@@ -786,9 -786,6 +786,9 @@@ function wfParseUrl( $url ) 
                return false;
        }
  
 +      // parse_url() incorrectly handles schemes case-sensitively. Convert it to lowercase.
 +      $bits['scheme'] = strtolower( $bits['scheme'] );
 +
        // most of the protocols are followed by ://, but mailto: and sometimes news: not, check for it
        if ( in_array( $bits['scheme'] . '://', $wgUrlProtocols ) ) {
                $bits['delimiter'] = '://';
@@@ -1542,8 -1539,6 +1542,6 @@@ function wfMsgGetKey( $key, $useDB = tr
  /**
   * Replace message parameter keys on the given formatted output.
   *
-  * @deprecated since 1.18
-  *
   * @param $message String
   * @param $args Array
   * @return string
@@@ -2404,6 -2399,7 +2402,6 @@@ define( 'TS_ISO_8601_BASIC', 9 )
  /**
   * Get a timestamp string in one of various formats
   *
 - * @deprecated
   * @param $outputtype Mixed: A timestamp in one of the supported formats, the
   *                    function will autodetect which format is supplied and act
   *                    accordingly.
diff --combined includes/OutputPage.php
@@@ -1990,9 -1990,6 +1990,9 @@@ class OutputPage extends ContextSource 
                        wfProfileOut( 'Output-skin' );
                }
  
 +              // This hook allows last minute changes to final overall output by modifying output buffer
 +              wfRunHooks( 'AfterFinalPageOutput', array( $this ) );
 +
                $this->sendCacheControl();
                ob_end_flush();
                wfProfileOut( __METHOD__ );
@@@ -3540,6 -3537,9 +3540,6 @@@ $template
         * message names, or arrays, in which case the first element is the message name,
         * and subsequent elements are the parameters to that message.
         *
 -       * The special named parameter 'options' in a message specification array is passed
 -       * through to the $options parameter of wfMsgExt().
 -       *
         * Don't use this for messages that are not in users interface language.
         *
         * For example:
         *
         * Is equivalent to:
         *
-        *    $wgOut->addWikiText( "<div class='error'>\n" . wfMsgNoTrans( 'some-error' ) . "\n</div>" );
+        *    $wgOut->addWikiText( "<div class='error'>\n" . wfMessage( 'some-error' )->plain() . "\n</div>" );
         *
         * The newline after opening div is needed in some wikitext. See bug 19226.
         *
                                $args = $spec;
                                $name = array_shift( $args );
                                if ( isset( $args['options'] ) ) {
 -                                      $options = $args['options'];
                                        unset( $args['options'] );
 +                                      wfDeprecated(
 +                                              'Adding "options" to ' . __METHOD__ . ' is no longer supported',
 +                                              '1.20'
 +                                      );
                                }
                        }  else {
                                $args = array();
                                $name = $spec;
                        }
 -                      $s = str_replace( '$' . ( $n + 1 ), wfMsgExt( $name, $options, $args ), $s );
 +                      $s = str_replace( '$' . ( $n + 1 ), $this->msg( $name, $args )->plain(), $s );
                }
                $this->addWikiText( $s );
        }