Merge "Update CREDITS file to include new contributors"
[lhc/web/wiklou.git] / includes / OutputPage.php
index aa2afe9..02e13e7 100644 (file)
@@ -2093,11 +2093,12 @@ class OutputPage extends ContextSource {
         * @param Language|null $language Target language object, will override $interface
         * @throws MWException
         * @return string HTML
-        * @deprecated since 1.33, due to untidy output and inconsistent wrapper;
+        * @deprecated since 1.32, due to untidy output and inconsistent wrapper;
         *  use parseAsContent() if $interface is default value or false, or else
         *  parseAsInterface() if $interface is true.
         */
        public function parse( $text, $linestart = true, $interface = false, $language = null ) {
+               wfDeprecated( __METHOD__, '1.33' );
                return $this->parseInternal(
                        $text, $this->getTitle(), $linestart, /*tidy*/false, $interface, $language
                )->getText( [
@@ -2114,7 +2115,7 @@ class OutputPage extends ContextSource {
         * @param bool $linestart Is this the start of a line? (Defaults to true)
         * @throws MWException
         * @return string HTML
-        * @since 1.33
+        * @since 1.32
         */
        public function parseAsContent( $text, $linestart = true ) {
                return $this->parseInternal(
@@ -2135,7 +2136,7 @@ class OutputPage extends ContextSource {
         * @param bool $linestart Is this the start of a line? (Defaults to true)
         * @throws MWException
         * @return string HTML
-        * @since 1.33
+        * @since 1.32
         */
        public function parseAsInterface( $text, $linestart = true ) {
                return $this->parseInternal(
@@ -2158,7 +2159,7 @@ class OutputPage extends ContextSource {
         * @param bool $linestart Is this the start of a line? (Defaults to true)
         * @throws MWException
         * @return string HTML
-        * @since 1.33
+        * @since 1.32
         */
        public function parseInlineAsInterface( $text, $linestart = true ) {
                return Parser::stripOuterParagraph(
@@ -2174,12 +2175,13 @@ class OutputPage extends ContextSource {
         * @param bool $interface Use interface language (instead of content language) while parsing
         *   language sensitive magic words like GRAMMAR and PLURAL
         * @return string HTML
-        * @deprecated since 1.33, due to untidy output and confusing default
+        * @deprecated since 1.32, due to untidy output and confusing default
         *   for $interface.  Use parseInlineAsInterface() if $interface is
         *   the default value or false, or else use
         *   Parser::stripOuterParagraph($outputPage->parseAsContent(...)).
         */
        public function parseInline( $text, $linestart = true, $interface = false ) {
+               wfDeprecated( __METHOD__, '1.33' );
                $parsed = $this->parseInternal(
                        $text, $this->getTitle(), $linestart, /*tidy*/false, $interface, /*language*/null
                )->getText( [
@@ -2845,16 +2847,18 @@ class OutputPage extends ContextSource {
                                        $query['returntoquery'] = wfArrayToCgi( $returntoquery );
                                }
                        }
+                       $title = SpecialPage::getTitleFor( 'Userlogin' );
                        $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+                       $loginUrl = $title->getLinkURL( $query, false, PROTO_RELATIVE );
                        $loginLink = $linkRenderer->makeKnownLink(
-                               SpecialPage::getTitleFor( 'Userlogin' ),
+                               $title,
                                $this->msg( 'loginreqlink' )->text(),
                                [],
                                $query
                        );
 
                        $this->prepareErrorPage( $this->msg( 'loginreqtitle' ) );
-                       $this->addHTML( $this->msg( $msg )->rawParams( $loginLink )->parse() );
+                       $this->addHTML( $this->msg( $msg )->rawParams( $loginLink )->params( $loginUrl )->parse() );
 
                        # Don't return to a page the user can't read otherwise
                        # we'll end up in a pointless loop
@@ -2924,7 +2928,7 @@ class OutputPage extends ContextSource {
         * then the warning is a bit more obvious. If the lag is
         * lower than $wgSlaveLagWarning, then no warning is shown.
         *
-        * @param int $lag Slave lag
+        * @param int $lag Replica lag
         */
        public function showLagWarning( $lag ) {
                $config = $this->getConfig();