From: Reedy Date: Wed, 18 Apr 2018 15:58:02 +0000 (+0000) Subject: Follow-up 2c74b043568e: Restore use of 'clearyourcache' message X-Git-Tag: 1.31.0-rc.0~29 X-Git-Url: https://git.cyclocoop.org/?a=commitdiff_plain;h=aeb9c10e95a33f6c174c7ace22073d358ed81a71;p=lhc%2Fweb%2Fwiklou.git Follow-up 2c74b043568e: Restore use of 'clearyourcache' message Bug: T191800 Change-Id: I632fff6489e929847e7abc1d944277e3b0358314 --- 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