From aeb9c10e95a33f6c174c7ace22073d358ed81a71 Mon Sep 17 00:00:00 2001 From: Reedy Date: Wed, 18 Apr 2018 15:58:02 +0000 Subject: [PATCH] Follow-up 2c74b043568e: Restore use of 'clearyourcache' message Bug: T191800 Change-Id: I632fff6489e929847e7abc1d944277e3b0358314 --- includes/page/Article.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/includes/page/Article.php b/includes/page/Article.php index 3cbeacffa7..a543f46b93 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -577,7 +577,16 @@ class Article implements Page { # Preload timestamp to avoid a DB hit $outputPage->setRevisionTimestamp( $this->mPage->getTimestamp() ); - if ( !Hooks::run( 'ArticleContentViewCustom', + # Pages containing custom CSS or JavaScript get special treatment + if ( $this->getTitle()->isSiteConfigPage() || $this->getTitle()->isUserConfigPage() ) { + $dir = $this->getContext()->getLanguage()->getDir(); + $lang = $this->getContext()->getLanguage()->getHtmlCode(); + + $outputPage->wrapWikiMsg( + "
\n$1\n
", + 'clearyourcache' + ); + } elseif ( !Hooks::run( 'ArticleContentViewCustom', [ $this->fetchContentObject(), $this->getTitle(), $outputPage ] ) ) { # Allow extensions do their own custom view for certain pages -- 2.20.1