From bb0b1f60beb18c50d619adac3304710b73f2e1ab Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Tue, 27 Sep 2016 20:29:54 -0700 Subject: [PATCH] Add @deprecated annotations to NS_IMAGE and NS_IMAGE_TALK Hopefully this will discourage people from using them in new code. Change-Id: I165a19406dfc0bcc471252e416480fa3af92d969 --- includes/Defines.php | 5 +++++ tests/parser/ParserTestRunner.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/Defines.php b/includes/Defines.php index 529dfb39be..02930ea815 100644 --- a/includes/Defines.php +++ b/includes/Defines.php @@ -77,8 +77,13 @@ define( 'NS_CATEGORY_TALK', 15 ); * When writing code that should be compatible with older MediaWiki * versions, either stick to the old names or define the new constants * yourself, if they're not defined already. + * + * @deprecated since 1.14 */ define( 'NS_IMAGE', NS_FILE ); +/** + * @deprecated since 1.14 + */ define( 'NS_IMAGE_TALK', NS_FILE_TALK ); /**@}*/ diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index 369cd0e8c8..6ca851edd1 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -1524,7 +1524,7 @@ class ParserTestRunner { } // The RepoGroup cache is invalidated by the creation of file redirects - if ( $title->getNamespace() === NS_IMAGE ) { + if ( $title->inNamespace( NS_FILE ) ) { RepoGroup::singleton()->clearCache( $title ); } } -- 2.20.1