Removed deprecated Linker functions
authorawu42 <9922yalp@gmail.com>
Wed, 4 Jan 2017 22:44:16 +0000 (17:44 -0500)
committerReedy <reedy@wikimedia.org>
Sat, 7 Jan 2017 15:33:33 +0000 (15:33 +0000)
Removed:
 - getInterwikiLinkAttributes (deprecated in 1.25)
 - getInternalLinkAttributes (deprecated in 1.25)
 - getInternalLinkAttributesObj (deprecated in 1.25)
 - getLinkAttributesInternal (deprecated in 1.25)
 - usages in includes/DummyLinker.php

Bug: T61113
Change-Id: I98182f4145dafdc6e60953f25a5f20575257a854

RELEASE-NOTES-1.29
includes/DummyLinker.php
includes/Linker.php

index 3630abc..8b10207 100644 (file)
@@ -163,6 +163,10 @@ changes to languages because of Phabricator reports.
 * Hook UnknownAction (deprecated in 1.19) was actually deprecated (it will now emit warnings).
   Create a subclass of Action, and add it to $wgActions instead.
 * WikiRevision:getText() (deprecated since 1.21) is no longer marked deprecated.
+* Linker:getInterwikiLinkAttributes (deprecated since 1.25) was removed.
+* Linker:getInternalLinkAttributes (deprecated since 1.25) was removed.
+* Linker:getInternalLinkAttributesObj (deprecated since 1.25) was removed.
+* Linker:getLinkAttributesInternal (deprecated since 1.25) was removed.
 
 == Compatibility ==
 
index fc94a63..9aa6aeb 100644 (file)
@@ -5,48 +5,6 @@
  */
 class DummyLinker {
 
-       /**
-        * @deprecated since 1.27
-        */
-       public function getInterwikiLinkAttributes( $title, $unused = null, $class = 'external' ) {
-               wfDeprecated( __METHOD__, '1.27' );
-               return Linker::getInterwikiLinkAttributes(
-                       $title,
-                       $unused,
-                       $class
-               );
-       }
-
-       /**
-        * @deprecated since 1.27
-        */
-       public function getInternalLinkAttributes( $title, $unused = null, $class = '' ) {
-               wfDeprecated( __METHOD__, '1.27' );
-               return Linker::getInternalLinkAttributes(
-                       $title,
-                       $unused,
-                       $class
-               );
-       }
-
-       /**
-        * @deprecated since 1.27
-        */
-       public function getInternalLinkAttributesObj(
-               $nt,
-               $unused = null,
-               $class = '',
-               $title = false
-       ) {
-               wfDeprecated( __METHOD__, '1.27' );
-               return Linker::getInternalLinkAttributesObj(
-                       $nt,
-                       $unused,
-                       $class,
-                       $title
-               );
-       }
-
        /**
         * @deprecated since 1.28, use LinkRenderer::getLinkClasses() instead
         */
index d3d1f38..794e2e9 100644 (file)
@@ -38,102 +38,6 @@ class Linker {
        const TOOL_LINKS_NOBLOCK = 1;
        const TOOL_LINKS_EMAIL = 2;
 
-       /**
-        * Get the appropriate HTML attributes to add to the "a" element of an interwiki link.
-        *
-        * @since 1.16.3
-        * @deprecated since 1.25
-        *
-        * @param string $title The title text for the link, URL-encoded (???) but
-        *   not HTML-escaped
-        * @param string $unused Unused
-        * @param string $class The contents of the class attribute; if an empty
-        *   string is passed, which is the default value, defaults to 'external'.
-        * @return string
-        */
-       static function getInterwikiLinkAttributes( $title, $unused = null, $class = 'external' ) {
-               global $wgContLang;
-
-               wfDeprecated( __METHOD__, '1.25' );
-
-               # @todo FIXME: We have a whole bunch of handling here that doesn't happen in
-               # getExternalLinkAttributes, why?
-               $title = urldecode( $title );
-               $title = $wgContLang->checkTitleEncoding( $title );
-               $title = preg_replace( '/[\\x00-\\x1f]/', ' ', $title );
-
-               return self::getLinkAttributesInternal( $title, $class );
-       }
-
-       /**
-        * Get the appropriate HTML attributes to add to the "a" element of an internal link.
-        *
-        * @since 1.16.3
-        * @deprecated since 1.25
-        *
-        * @param string $title The title text for the link, URL-encoded (???) but
-        *   not HTML-escaped
-        * @param string $unused Unused
-        * @param string $class The contents of the class attribute, default none
-        * @return string
-        */
-       static function getInternalLinkAttributes( $title, $unused = null, $class = '' ) {
-               wfDeprecated( __METHOD__, '1.25' );
-
-               $title = urldecode( $title );
-               $title = strtr( $title, '_', ' ' );
-               return self::getLinkAttributesInternal( $title, $class );
-       }
-
-       /**
-        * Get the appropriate HTML attributes to add to the "a" element of an internal
-        * link, given the Title object for the page we want to link to.
-        *
-        * @since 1.16.3
-        * @deprecated since 1.25
-        *
-        * @param Title $nt
-        * @param string $unused Unused
-        * @param string $class The contents of the class attribute, default none
-        * @param string|bool $title Optional (unescaped) string to use in the title
-        *   attribute; if false, default to the name of the page we're linking to
-        * @return string
-        */
-       static function getInternalLinkAttributesObj( $nt, $unused = null, $class = '', $title = false ) {
-               wfDeprecated( __METHOD__, '1.25' );
-
-               if ( $title === false ) {
-                       $title = $nt->getPrefixedText();
-               }
-               return self::getLinkAttributesInternal( $title, $class );
-       }
-
-       /**
-        * Common code for getLinkAttributesX functions
-        *
-        * @since 1.16.3
-        * @deprecated since 1.25
-        *
-        * @param string $title
-        * @param string $class
-        *
-        * @return string
-        */
-       private static function getLinkAttributesInternal( $title, $class ) {
-               wfDeprecated( __METHOD__, '1.25' );
-
-               $title = htmlspecialchars( $title );
-               $class = htmlspecialchars( $class );
-               $r = '';
-               if ( $class != '' ) {
-                       $r .= " class=\"$class\"";
-               }
-               if ( $title != '' ) {
-                       $r .= " title=\"$title\"";
-               }
-               return $r;
-       }
-
        /**
         * Return the CSS colour of a known link
         *