r106016 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106015‎ | r106016 | r106017 >
Date:11:54, 13 December 2011
Author:robin
Status:ok
Tags:
Comment:
Removed Title::isValidCssJsSubpage(), deprecated since 1.17 (77309), and updated all remaining usage in extensions
Modified paths:
  • /trunk/extensions/InlineEditor/ExtendedEditPage.class.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php (modified) (history)
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/FakeTitle.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -243,6 +243,8 @@
244244 have been replaced with a secondary query argument.
245245 * The $variant argument in the hooks for the Title::get{Local,Full,Link,Canonical}URL
246246 methods have been removed, the variant is now part of the $query argument.
 247+* Removed Title::isValidCssJsSubpage(), deprecated since 1.17 in favor of
 248+ using Title::isCssJsSubpage() or checking Title::isWrongCaseCssJsPage()
247249
248250 == Compatibility ==
249251
Index: trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php
@@ -27,7 +27,7 @@
2828 *
2929 * This can only be used for wiki pages in the MediaWiki and User namespaces,
3030 * because of its dependence on the functionality of
31 - * Title::isValidCssJsSubpage.
 31+ * Title::isCssJsSubpage.
3232 */
3333 abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
3434
Index: trunk/phase3/includes/Title.php
@@ -967,17 +967,6 @@
968968 }
969969
970970 /**
971 - * Is this a *valid* .css or .js subpage of a user page?
972 - *
973 - * @return Bool
974 - * @deprecated since 1.17
975 - */
976 - public function isValidCssJsSubpage() {
977 - wfDeprecated( __METHOD__, '1.17' );
978 - return $this->isCssJsSubpage();
979 - }
980 -
981 - /**
982971 * Trim down a .css or .js subpage title to get the corresponding skin name
983972 *
984973 * @return string containing skin name from .css or .js subpage title
Index: trunk/phase3/includes/FakeTitle.php
@@ -56,7 +56,6 @@
5757 function getSubpages( $limit = -1 ) { $this->error(); }
5858 function isCssJsSubpage() { $this->error(); }
5959 function isCssOrJsPage() { $this->error(); }
60 - function isValidCssJsSubpage() { $this->error(); }
6160 function getSkinFromCssJsSubpage() { $this->error(); }
6261 function isCssSubpage() { $this->error(); }
6362 function isJsSubpage() { $this->error(); }
Index: trunk/extensions/InlineEditor/ExtendedEditPage.class.php
@@ -58,10 +58,10 @@
5959
6060 $this->isConflict = false;
6161 // css / js subpages of user pages get a special treatment
62 - $this->isCssJsSubpage = $this->mTitle->isCssJsSubpage();
63 - $this->isCssSubpage = $this->mTitle->isCssSubpage();
64 - $this->isJsSubpage = $this->mTitle->isJsSubpage();
65 - $this->isValidCssJsSubpage = $this->mTitle->isValidCssJsSubpage();
 62+ $this->isCssJsSubpage = $this->mTitle->isCssJsSubpage();
 63+ $this->isCssSubpage = $this->mTitle->isCssSubpage();
 64+ $this->isJsSubpage = $this->mTitle->isJsSubpage();
 65+ $this->isWrongCaseCssJsPage = $this->isWrongCaseCssJsPage();
6666
6767 // catch the HTML that the intro throws
6868 // if anything is thrown, fall back to the normal editor
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php
@@ -188,8 +188,8 @@
189189
190190 $this->isConflict = false;
191191 // css / js subpages of user pages get a special treatment
192 - $this->isCssJsSubpage = $this->mTitle->isCssJsSubpage();
193 - $this->isValidCssJsSubpage = $this->mTitle->isValidCssJsSubpage();
 192+ $this->isCssJsSubpage = $this->mTitle->isCssJsSubpage();
 193+ $this->isWrongCaseCssJsPage = $this->isWrongCaseCssJsPage();
194194
195195 /* Notice that we can't use isDeleted, because it returns true if article is ever deleted
196196 * no matter it's current state
@@ -485,7 +485,7 @@
486486 } else {
487487 if ( $this->isCssJsSubpage && $this->formtype != 'preview' ) {
488488 # Check the skin exists
489 - if ( $this->isValidCssJsSubpage ) {
 489+ if ( !$this->isWrongCaseCssJsPage ) {
490490 $wgOut->addWikiText( wfMsg( 'usercssjsyoucanpreview' ) );
491491 } else {
492492 $wgOut->addWikiText( wfMsg( 'userinvalidcssjstitle', $this->mTitle->getSkinFromCssJsSubpage() ) );

Status & tagging log