From 6ac8f516efc70775c13d6c6b3173068e445d0319 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 10 Jun 2007 16:36:09 +0000 Subject: [PATCH] * (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

---
 RELEASE-NOTES        | 2 ++
 includes/Article.php | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

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'; -- 2.20.1