* @return Skin
*/
public final function getLang() {
+ wfDeprecated( __METHOD__, '1.19' );
return $this->getLanguage();
}
* @deprecated in 1.19; use fetchContent()
*/
function loadContent() {
+ wfDeprecated( __METHOD__, '1.19' );
$this->fetchContent();
}
* @deprecated since 1.18
*/
public function forUpdate() {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.18' );
}
/**
* @deprecated since 1.19
*/
public function info() {
+ wfDeprecated( __METHOD__, '1.19' );
Action::factory( 'info', $this )->show();
}
* @deprecated since 1.18
*/
public function markpatrolled() {
+ wfDeprecated( __METHOD__, '1.18' );
Action::factory( 'markpatrolled', $this )->show();
}
* @deprecated since 1.19
*/
public function revert() {
+ wfDeprecated( __METHOD__, '1.19' );
Action::factory( 'revert', $this )->show();
}
* @deprecated since 1.19
*/
public function rollback() {
+ wfDeprecated( __METHOD__, '1.19' );
Action::factory( 'rollback', $this )->show();
}
* @deprecated since 1.18
*/
public function watch() {
+ wfDeprecated( __METHOD__, '1.18' );
Action::factory( 'watch', $this )->show();
}
*/
public function doWatch() {
global $wgUser;
+ wfDeprecated( __METHOD__, '1.18' );
return WatchAction::doWatch( $this->getTitle(), $wgUser );
}
* @deprecated since 1.18
*/
public function unwatch() {
+ wfDeprecated( __METHOD__, '1.18' );
Action::factory( 'unwatch', $this )->show();
}
*/
public function doUnwatch() {
global $wgUser;
+ wfDeprecated( __METHOD__, '1.18' );
return WatchAction::doUnwatch( $this->getTitle(), $wgUser );
}
* @param $extraQuery String: extra query params
*/
public function doRedirect( $noRedir = false, $sectionAnchor = '', $extraQuery = '' ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.18' );
global $wgOut;
if ( $noRedir ) {
* @deprecated since 1.18
*/
public static function newFromDB( $address, $user = 0 ) {
+ wfDeprecated( __METHOD__, '1.18' );
return self::newFromTarget( User::whoIs( $user ), $address );
}
* @deprecated since 1.18
*/
public function clear() {
+ wfDeprecated( __METHOD__, '1.18' );
# Noop
}
* @deprecated since 1.18
*/
public function load( $address = '', $user = 0 ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.18' );
if( $user ){
$username = User::whoIs( $user );
$block = self::newFromTarget( $username, $address );
* @param $x Bool
*/
public function forUpdate( $x = null ) {
+ wfDeprecated( __METHOD__, '1.18' );
# noop
}
* @deprecated since 1.18; use $dbw->encodeExpiry() instead
*/
public static function encodeExpiry( $expiry, $db ) {
+ wfDeprecated( __METHOD__, '1.18' );
return $db->encodeExpiry( $expiry );
}
* @deprecated since 1.18; use $wgLang->formatExpiry() instead
*/
public static function decodeExpiry( $expiry, $timestampType = TS_MW ) {
+ wfDeprecated( __METHOD__, '1.18' );
global $wgContLang;
return $wgContLang->formatExpiry( $expiry, $timestampType );
}
* @deprecated since 1.18, call IP::sanitizeRange() directly
*/
public static function normaliseRange( $range ) {
+ wfDeprecated( __METHOD__, '1.18' );
return IP::sanitizeRange( $range );
}
* @return String
*/
public static function infinity() {
+ wfDeprecated( __METHOD__, '1.18' );
return wfGetDB( DB_SLAVE )->getInfinity();
}
* @deprecated since 1.18; use $wgLang->formatExpiry() instead
*/
public static function formatExpiry( $encoded_expiry ) {
+ wfDeprecated( __METHOD__, '1.18' );
+
global $wgContLang;
static $msg = null;
* @deprecated since 1.18 moved to SpecialBlock::parseExpiryInput()
*/
public static function parseExpiryInput( $expiry ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.18' );
return SpecialBlock::parseExpiryInput( $expiry );
}
* @deprecated since 1.17 kept for compatibility, please use addSubcategoryObject instead
*/
function addSubcategory( Title $title, $sortkey, $pageLength ) {
+ wfDeprecated( __METHOD__, '1.17' );
$this->addSubcategoryObject( Category::newFromTitle( $title ), $sortkey, $pageLength );
}
* @return ChangesList|EnhancedChangesList|OldChangesList derivative
*/
public static function newFromUser( $unused ) {
+ wfDeprecated( __METHOD__, '1.18' );
return self::newFromContext( RequestContext::getMain() );
}
* @deprecated in 1.19; use displayPermissionsError() instead
*/
function readOnlyPage( $source = null, $protected = false, $reasons = array(), $action = null ) {
+ wfDeprecated( __METHOD__, '1.19' );
+
global $wgRequest, $wgOut;
if ( $wgRequest->getBool( 'redlink' ) ) {
// The edit page was reached via a red link.
* @deprecated in 1.19; throw an exception directly instead
*/
function blockedPage() {
+ wfDeprecated( __METHOD__, '1.19' );
global $wgUser;
throw new UserBlockedError( $wgUser->mBlock );
* @deprecated in 1.19; throw an exception directly instead
*/
function userNotLoggedInPage() {
+ wfDeprecated( __METHOD__, '1.19' );
throw new PermissionsError( 'edit' );
}
* @deprecated in 1.19; throw an exception directly instead
*/
function noCreatePermission() {
+ wfDeprecated( __METHOD__, '1.19' );
$permission = $this->mTitle->isTalkPage() ? 'createtalk' : 'createpage';
throw new PermissionsError( $permission );
}
* @deprecated since 1.17 Use method spamPageWithContent() instead
*/
static function spamPage( $match = false ) {
+ wfDeprecated( __METHOD__, '1.17' );
+
global $wgOut, $wgTitle;
$wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) );
* @return Language
*/
function wfUILang() {
+ wfDeprecated( __METHOD__, '1.18' );
global $wgLang;
return $wgLang;
}
* @deprecated in 1.19; use Language::viewPrevNext() instead
*/
function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) {
+ wfDeprecated( __METHOD__, '1.19' );
+
global $wgLang;
$query = wfCgiToArray( $query );
* @param $commit string
*/
function wfDoUpdates( $commit = '' ) {
+ wfDeprecated( __METHOD__, '1.19' );
DeferredUpdates::doUpdates( $commit );
}
* @deprecated since 1.18, warnings in 1.18, removal in 1.20
*/
function wfCreateObject( $name, $p ) {
- wfDeprecated( __FUNCTION__ );
+ wfDeprecated( __FUNCTION__, '1.18' );
return MWFunction::newObj( $name, $p );
}
* @deprecated since 1.19
*/
function wfStreamFile( $fname, $headers = array() ) {
+ wfDeprecated( __FUNCTION__, '1.19' );
StreamFile::stream( $fname, $headers );
}
* @codeCoverageIgnore
*/
function wfLoadExtensionMessages() {
- wfDeprecated( __FUNCTION__ );
+ wfDeprecated( __FUNCTION__, '1.16' );
}
/**
* @deprecated since 1.18, warnings in 1.18, remove in 1.20
*/
function wfOut( $s ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __FUNCTION__, '1.18' );
global $wgCommandLineMode;
if ( $wgCommandLineMode ) {
echo $s;
* done already.
* @deprecated since 1.18 load modules with ResourceLoader instead
*/
- static function addJS() { }
+ static function addJS() { wfDeprecated( __METHOD__, '1.18' ); }
/**
* Initialise a new Object for the field
* @deprecated since 1.18 Not used anymore
*/
function useSkin( $skin ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.18' );
/* no op */
}
* @deprecated since 1.18 Just pass the external class directly to something using Html::expandAttributes
*/
static function getExternalLinkAttributes( $class = 'external' ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.18' );
return self::getLinkAttributesInternal( '', $class );
}
*/
static function makeSizeLinkObj( $size, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
global $wgUser;
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.17' );
$threshold = $wgUser->getStubThreshold();
$colour = ( $size < $threshold ) ? 'stub' : '';
* the end of the link.
*/
static function makeBrokenLink( $title, $text = '', $query = '', $trail = '' ) {
+ wfDeprecated( __METHOD__, '1.16' );
+
$nt = Title::newFromText( $title );
if ( $nt instanceof Title ) {
return self::makeBrokenLinkObj( $nt, $text, $query, $trail );
* @param $prefix String: optional prefix. As trail, only before instead of after.
*/
static function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
+ wfDeprecated( __METHOD__, '1.16' );
+
wfProfileIn( __METHOD__ );
$query = wfCgiToArray( $query );
list( $inside, $trail ) = self::splitTrail( $trail );
static function makeKnownLinkObj(
$title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = ''
) {
+ wfDeprecated( __METHOD__, '1.16' );
+
wfProfileIn( __METHOD__ );
if ( $text == '' ) {
* @param $prefix String: Optional prefix
*/
static function makeBrokenLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '' ) {
+ wfDeprecated( __METHOD__, '1.16' );
+
wfProfileIn( __METHOD__ );
list( $inside, $trail ) = self::splitTrail( $trail );
* @param $prefix String: Optional prefix
*/
static function makeColouredLinkObj( $nt, $colour, $text = '', $query = '', $trail = '', $prefix = '' ) {
+ wfDeprecated( __METHOD__, '1.16' );
+
if ( $colour != '' ) {
$style = self::getInternalLinkAttributesObj( $nt, $text, $colour );
} else {
/**
* @deprecated since 1.14
+ * TODO: remove?!
+ *
* Returns raw bits of HTML, use titleAttrib()
*/
public static function tooltip( $name, $options = null ) {
+ wfDeprecated( __METHOD__, '1.14' );
+
# @todo FIXME: If Sanitizer::expandAttributes() treated "false" as "output
# no attribute" instead of "output '' as value for attribute", this
# would be two lines.
* @deprecated in 1.19
*/
public function showHeader( $type ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.19' );
// If only one log type is used, then show a special message...
$headerType = (count($type) == 1) ? $type[0] : '';
if( LogPage::isLogType( $headerType ) ) {
* @deprecated since 1.17
*/
public function isValidCssJsSubpage() {
+ wfDeprecated( __METHOD__, '1.17' );
return $this->isCssJsSubpage();
}
* @todo fold these checks into userCan()
*/
public function userCanRead() {
+ wfDeprecated( __METHOD__, '1.19' );
return $this->userCan( 'read' );
}
*/
public function userCanEditCssSubpage() {
global $wgUser;
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.19' );
return ( ( $wgUser->isAllowedAll( 'editusercssjs', 'editusercss' ) )
|| preg_match( '/^' . preg_quote( $wgUser->getName(), '/' ) . '\//', $this->mTextform ) );
}
*/
public function userCanEditJsSubpage() {
global $wgUser;
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.19' );
return ( ( $wgUser->isAllowedAll( 'editusercssjs', 'edituserjs' ) )
|| preg_match( '/^' . preg_quote( $wgUser->getName(), '/' ) . '\//', $this->mTextform ) );
}
public $mOldId;
function __construct( Page $page, $request = false ) {
+ wfDeprecated( __CLASS__, '1.19' );
parent::__construct( $page );
if ( $request !== false ) {
* @return DerivativeContext
*/
public function createContext() {
+ wfDeprecated( __METHOD__, '1.19' );
return new DerivativeContext( $this->getContext() );
}
* @return array
*/
public static function getValidNamespaces() {
+ wfDeprecated( __METHOD__, '1.17' );
return MWNamespace::getValidNamespaces();
}
* $this->setCacheMode('private')
*/
public function setCachePrivate() {
+ wfDeprecated( __METHOD__, '1.17' );
$this->setCacheMode( 'private' );
}
* @deprecated since 1.17 Use setCacheMode( 'anon-public-user-private' )
*/
public function setVaryCookie() {
+ wfDeprecated( __METHOD__, '1.17' );
$this->setCacheMode( 'anon-public-user-private' );
}
* @return string
*/
private function languagesHtml( $languages ) {
+ wfDeprecated( __METHOD__, '1.18' );
+
global $wgContLang, $wgHideInterlanguageLinks;
if ( $wgHideInterlanguageLinks || count( $languages ) == 0 ) {
* @return Language
*/
public function getLang() {
+ wfDeprecated( __METHOD__, '1.19' );
return $this->getLanguage();
}
* @param $l Mixed Language instance or language code
*/
public function setLang( $l ) {
+ wfDeprecated( __METHOD__, '1.19' );
$this->setLanguage( $l );
}
* @return Language
*/
public function getLang() {
+ wfDeprecated( __METHOD__, '1.19' );
$this->getLanguage();
}
* @param $l Mixed Language instance or language code
*/
public function setLang( $l ) {
+ wfDeprecated( __METHOD__, '1.19' );
$this->setLanguage( $l );
}
* @return Language
*/
public function getLang() {
+ wfDeprecated( __METHOD__, '1.19' );
return $this->getLanguage();
}
* @return DatabaseMysql
*/
static function newFromParams( $server, $user, $password, $dbName, $flags = 0 ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.17' );
return new DatabaseMysql( $server, $user, $password, $dbName, $flags );
}
* @see Database::factory()
*/
public final static function newFromType( $dbType, $p = array() ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.18' );
if ( isset( $p['tableprefix'] ) ) {
$p['tablePrefix'] = $p['tableprefix'];
}
* @return string
*/
function quote_ident( $s ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.18' );
return $this->addIdentifierQuotes( $s );
}
* @return string
*/
public function escapeLike( $s ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.17' );
return $this->escapeLikeInternal( $s );
}
* @deprecated since 1.19; use setSessionOptions()
*/
public function setTimeout( $timeout ) {
+ wfDeprecated( __METHOD__, '1.19' );
$this->setSessionOptions( array( 'connTimeout' => $timeout ) );
}
* @return bool|int
*/
function getLagFromProcesslist() {
+ wfDeprecated( __METHOD__, '1.19' );
$res = $this->query( 'SHOW PROCESSLIST', __METHOD__ );
if( !$res ) {
return false;
* @param $conn
*/
function closeConnecton( $conn ) {
+ wfDeprecated( __METHOD__, '1.18' );
$this->closeConnection( $conn );
}
* @return Status
*/
function append( $srcPath, $toAppendPath, $flags = 0 ) {
- wfDeprecated(__METHOD__);
+ wfDeprecated( __METHOD__, '1.19' );
$status = $this->newGood();
* @deprecated since 1.18
*/
function makeFormattedData( ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.18' );
$this->mFormattedExifData = FormatMetadata::getFormattedData(
$this->mFilteredExifData );
}
* @deprecated since 1.18
*/
function getFormattedData() {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.18' );
if (!$this->mFormattedExifData) {
$this->makeFormattedData();
}
* @deprecated since 1.18 Use Linker::* instead
*/
function getSkin( $title = null ) {
- wfDeprecated( __METHOD__ );
+ wfDeprecated( __METHOD__, '1.18' );
return new DummyLinker;
}
* @deprecated since 1.18 Call supports( 'list-redirects' );
*/
function acceptListRedirects() {
+ wfDeprecated( __METHOD__, '1.18' );
return $this->supports( 'list-redirects' );
}
* @return Status Status
*/
protected function appendToUploadFile( $srcPath, $toAppendPath ) {
- wfDeprecated(__METHOD__);
+ wfDeprecated( __METHOD__, '1.19' );
$repo = RepoGroup::singleton()->getLocalRepo();
$status = $repo->append( $srcPath, $toAppendPath );
* @return Status Status
*/
protected function appendFinish( $toAppendPath ) {
- wfDeprecated(__METHOD__);
+ wfDeprecated( __METHOD__, '1.19' );
$repo = RepoGroup::singleton()->getLocalRepo();
$status = $repo->appendFinish( $toAppendPath );