From: Gabriel Wicke Date: Thu, 29 Apr 2004 23:13:19 +0000 (+0000) Subject: moved the css special case to view(), old versions had the \ in them X-Git-Tag: 1.3.0beta1~186 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=e8c1b6c3167be79d4f3df798316cf62faf5f72c1;p=lhc%2Fweb%2Fwiklou.git moved the css special case to view(), old versions had the \ in them --- diff --git a/includes/Article.php b/includes/Article.php index 55adf464ef..f9d076d4ef 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -127,13 +127,6 @@ class Article { wfProfileOut( $fname ); return $rv; } - } else if ( - # wrap user css and user js in pre - $this->mTitle->getNamespace() == Namespace::getUser() && - preg_match("/\\/[\\w]+\\.(css|js)$/", $this->mTitle->getDBkey()) - ) - { - $this->mContent = '
'.htmlspecialchars($this->mContent)."\n
"; } wfProfileOut( $fname ); return $this->mContent; @@ -508,8 +501,14 @@ class Article { } $wgLinkCache->preFill( $this->mTitle ); - - if( $wgEnableParserCache && intval($wgUser->getOption( "stubthreshold" )) == 0 ){ + + # wrap user css and user js in pre and don't parse + if ( + $this->mTitle->getNamespace() == Namespace::getUser() && + preg_match("/\\/[\\w]+\\.(css|js)$/", $this->mTitle->getDBkey()) + ) { + $wgOut->addHTML( '
'.htmlspecialchars($this->mContent)."\n
" ); + } else if( $wgEnableParserCache && intval($wgUser->getOption( "stubthreshold" )) == 0 ){ $wgOut->addWikiText( $text, true, $this ); } else { $wgOut->addWikiText( $text );