From: Aryeh Gregor Date: Sun, 10 Jun 2007 16:36:09 +0000 (+0000) Subject: * (bug 10196) Add classes and dir="ltr" to the
s on user CSS and JS pages (new... 
X-Git-Tag: 1.31.0-rc.0~52598
X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=commitdiff_plain;h=6ac8f516efc70775c13d6c6b3173068e445d0319;p=lhc%2Fweb%2Fwiklou.git

* (bug 10196) Add classes and dir="ltr" to the 
s on user CSS and JS pages (new classes: mw-user-css, mw-user-js)
* Prettied up a regex slightly
---

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 5fa0f16a5a..23550ffb0b 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -74,6 +74,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   a path to the AdminSettings.php file
 * (bug 8781) Remind users to check file permissions for LocalSettings.php
   post-installation
+* (bug 10196) Add classes and dir="ltr" to the 
s on user CSS and JS pages
+  (new classes: mw-user-css, mw-user-js)
 
 == Bugfixes since 1.10 ==
 
diff --git a/includes/Article.php b/includes/Article.php
index ebf3c64036..6e7f779f75 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -781,10 +781,10 @@ class Article {
 			# XXX: use $this->mTitle->usCssJsSubpage() when php is fixed/ a workaround is found
 			if (
 				$ns == NS_USER &&
-				preg_match('/\\/[\\w]+\\.(?:css|js)$/', $this->mTitle->getDBkey())
+				preg_match('!/[\w]+\.(css|js)$!', $this->mTitle->getDBkey(), $matches)
 			) {
 				$wgOut->addWikiText( wfMsg('clearyourcache'));
-				$wgOut->addHTML( '
'.htmlspecialchars($this->mContent)."\n
" ); + $wgOut->addHTML( "
".htmlspecialchars($this->mContent)."\n
" ); } else if ( $rt = Title::newFromRedirect( $text ) ) { # Display redirect $imageDir = $wgContLang->isRTL() ? 'rtl' : 'ltr';