From: Reedy Date: Sun, 20 Dec 2015 14:21:14 +0000 (+0000) Subject: ApiQueryBase titleToKey(), keyToTitle() and keyPartToTitle() removed X-Git-Tag: 1.31.0-rc.0~8609 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=941f88d4c83bfdb9f1389e81ed35e8d91da8df9c;p=lhc%2Fweb%2Fwiklou.git ApiQueryBase titleToKey(), keyToTitle() and keyPartToTitle() removed All deprecated since 1.24. Change-Id: I8cf91a12d564dc6b2c48ead5f3f382bebb0217bc Depends-On: Id788b8f1dbf5b4b7079d361eb1357b3ae942d89d --- diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index fa36eb5510..3289da5d1d 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -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 == diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index ad92e53c26..87f89044be 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -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 *