Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/173027

Change subject: Deprecate rarely or unused *LinkAttributes methods in Linker
......................................................................

Deprecate rarely or unused *LinkAttributes methods in Linker

Linker::getInterwikiLinkAttributes and Linker::getInternalLinkAttributesObj
are not not used any code in gerrit.

Linker::getInternalLinkAttributes is used once, in the Video extension.

Change-Id: I76d9b549e0fdccb9c1b4d9c12ba40a67c2733637
---
M RELEASE-NOTES-1.25
M includes/Linker.php
2 files changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/27/173027/1

diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25
index 7ab8772..ea5e8b8 100644
--- a/RELEASE-NOTES-1.25
+++ b/RELEASE-NOTES-1.25
@@ -185,6 +185,9 @@
   <https://www.mediawiki.org/xml/export-0.10.xsd>.
 * MWFunction::call() and MWFunction::callArray() were removed, having being
   deprecated in 1.22.
+* Deprecated the getInternalLinkAttributes, getInternalLinkAttributesObj,
+  and getInternalLinkAttributes methods in Linker, and removed
+  getExternalLinkAttributes method, which was deprecated in MediaWiki 1.18.
 
 == Compatibility ==
 
diff --git a/includes/Linker.php b/includes/Linker.php
index 876aa5f..0e9ef2b 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -39,6 +39,8 @@
        /**
         * Get the appropriate HTML attributes to add to the "a" element of an 
interwiki link.
         *
+        * @deprecated since 1.25
+        *
         * @param string $title The title text for the link, URL-encoded (???) 
but
         *   not HTML-escaped
         * @param string $unused Unused
@@ -48,6 +50,8 @@
         */
        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?
@@ -61,6 +65,8 @@
        /**
         * Get the appropriate HTML attributes to add to the "a" element of an 
internal link.
         *
+        * @deprecated since 1.25
+        *
         * @param string $title The title text for the link, URL-encoded (???) 
but
         *   not HTML-escaped
         * @param string $unused Unused
@@ -68,6 +74,8 @@
         * @return string
         */
        static function getInternalLinkAttributes( $title, $unused = null, 
$class = '' ) {
+               wfDeprecated( __METHOD__, '1.25' );
+
                $title = urldecode( $title );
                $title = str_replace( '_', ' ', $title );
                return self::getLinkAttributesInternal( $title, $class );
@@ -77,6 +85,8 @@
         * 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.
         *
+        * @deprecated since 1.25
+        *
         * @param Title $nt
         * @param string $unused Unused
         * @param string $class The contents of the class attribute, default 
none
@@ -85,6 +95,8 @@
         * @return string
         */
        static function getInternalLinkAttributesObj( $nt, $unused = null, 
$class = '', $title = false ) {
+               wfDeprecated( __METHOD__, '1.25' );
+
                if ( $title === false ) {
                        $title = $nt->getPrefixedText();
                }
@@ -94,12 +106,16 @@
        /**
         * Common code for getLinkAttributesX functions
         *
+        * @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 = '';

-- 
To view, visit https://gerrit.wikimedia.org/r/173027
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76d9b549e0fdccb9c1b4d9c12ba40a67c2733637
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to