ApiQueryBase titleToKey(), keyToTitle() and keyPartToTitle() removed
authorReedy <reedy@wikimedia.org>
Sun, 20 Dec 2015 14:21:14 +0000 (14:21 +0000)
committerReedy <reedy@wikimedia.org>
Sun, 20 Dec 2015 15:12:45 +0000 (15:12 +0000)
All deprecated since 1.24.

Change-Id: I8cf91a12d564dc6b2c48ead5f3f382bebb0217bc
Depends-On: Id788b8f1dbf5b4b7079d361eb1357b3ae942d89d

RELEASE-NOTES-1.27
includes/api/ApiQueryBase.php

index fa36eb5..3289da5 100644 (file)
@@ -189,6 +189,8 @@ changes to languages because of Phabricator reports.
 * OutputPage::loginToUse() was removed (deprecated since 1.19).
 * Article::loadContent() was removed (deprecated since 1.19).
 * User::editToken() was removed (deprecated since 1.19).
+* ApiQueryBase::titleToKey(), ApiQueryBase::keyToTitle() and
+  ApiQueryBase::keyPartToTitle() all removed (deprecated since 1.24).
 
 == Compatibility ==
 
index ad92e53..87f8904 100644 (file)
@@ -611,59 +611,6 @@ abstract class ApiQueryBase extends ApiBase {
                return true;
        }
 
-       /**
-        * Convert a title to a DB key
-        * @deprecated since 1.24, past uses of this were always incorrect and should
-        *   have used self::titlePartToKey() instead
-        * @param string $title Page title with spaces
-        * @return string Page title with underscores
-        */
-       public function titleToKey( $title ) {
-               wfDeprecated( __METHOD__, '1.24' );
-               // Don't throw an error if we got an empty string
-               if ( trim( $title ) == '' ) {
-                       return '';
-               }
-               $t = Title::newFromText( $title );
-               if ( !$t ) {
-                       $this->dieUsageMsg( array( 'invalidtitle', $title ) );
-               }
-
-               return $t->getPrefixedDBkey();
-       }
-
-       /**
-        * The inverse of titleToKey()
-        * @deprecated since 1.24, unused and probably never needed
-        * @param string $key Page title with underscores
-        * @return string Page title with spaces
-        */
-       public function keyToTitle( $key ) {
-               wfDeprecated( __METHOD__, '1.24' );
-               // Don't throw an error if we got an empty string
-               if ( trim( $key ) == '' ) {
-                       return '';
-               }
-               $t = Title::newFromDBkey( $key );
-               // This really shouldn't happen but we gotta check anyway
-               if ( !$t ) {
-                       $this->dieUsageMsg( array( 'invalidtitle', $key ) );
-               }
-
-               return $t->getPrefixedText();
-       }
-
-       /**
-        * Inverse of titlePartToKey()
-        * @deprecated since 1.24, unused and probably never needed
-        * @param string $keyPart DBkey, with prefix
-        * @return string Key part with underscores
-        */
-       public function keyPartToTitle( $keyPart ) {
-               wfDeprecated( __METHOD__, '1.24' );
-               return substr( $this->keyToTitle( $keyPart . 'x' ), 0, -1 );
-       }
-
        /**
         * Gets the personalised direction parameter description
         *