Merge "Skin: Hard deprecate escapeSearchLink()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 27 Jun 2019 19:28:37 +0000 (19:28 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 27 Jun 2019 19:28:37 +0000 (19:28 +0000)
RELEASE-NOTES-1.34
includes/skins/Skin.php
includes/skins/SkinTemplate.php

index a79f57a..0d9bf9a 100644 (file)
@@ -325,6 +325,8 @@ because of Phabricator reports.
 * The use of the $terms param in the ShowSearchHit and ShowSearchHitTitle
   hooks is highly discouraged as it's only populated by SearchDatabase search
   engines.
+* Skin::escapeSearchLink() is deprecated. Use Skin::getSearchLink() or the skin
+  template option 'searchaction' instead.
 
 === Other changes in 1.34 ===
 * …
index 05b6297..918c761 100644 (file)
@@ -813,9 +813,11 @@ abstract class Skin extends ContextSource {
        }
 
        /**
+        * @deprecated since 1.34, use getSearchLink() instead.
         * @return string
         */
        function escapeSearchLink() {
+               wfDeprecated( __METHOD__, '1.34' );
                return htmlspecialchars( $this->getSearchLink() );
        }
 
index 8b46ee9..5d6197e 100644 (file)
@@ -317,7 +317,7 @@ class SkinTemplate extends Skin {
                $tpl->set( 'handheld', $request->getBool( 'handheld' ) );
                $tpl->set( 'loggedin', $this->loggedin );
                $tpl->set( 'notspecialpage', !$title->isSpecialPage() );
-               $tpl->set( 'searchaction', $this->escapeSearchLink() );
+               $tpl->set( 'searchaction', $this->getSearchLink() );
                $tpl->set( 'searchtitle', SpecialPage::getTitleFor( 'Search' )->getPrefixedDBkey() );
                $tpl->set( 'search', trim( $request->getVal( 'search' ) ) );
                $tpl->set( 'stylepath', $wgStylePath );