ApiQueryBase titleToKey(), keyToTitle() and keyPartToTitle() removed
All deprecated since 1.24. Change-Id: I8cf91a12d564dc6b2c48ead5f3f382bebb0217bc Depends-On: Id788b8f1dbf5b4b7079d361eb1357b3ae942d89d
This commit is contained in:
parent
4b328d6c2e
commit
941f88d4c8
2 changed files with 2 additions and 53 deletions
|
|
@ -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 ==
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue