r22887 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22886‎ | r22887 | r22888 >
Date:16:36, 10 June 2007
Author:simetrical
Status:old
Tags:
Comment:
* (bug 10196) Add classes and dir="ltr" to the <pre>s on user CSS and JS pages (new classes: mw-user-css, mw-user-js)
* Prettied up a regex slightly
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -781,10 +781,10 @@
782782 # XXX: use $this->mTitle->usCssJsSubpage() when php is fixed/ a workaround is found
783783 if (
784784 $ns == NS_USER &&
785 - preg_match('/\\/[\\w]+\\.(?:css|js)$/', $this->mTitle->getDBkey())
 785+ preg_match('!/[\w]+\.(css|js)$!', $this->mTitle->getDBkey(), $matches)
786786 ) {
787787 $wgOut->addWikiText( wfMsg('clearyourcache'));
788 - $wgOut->addHTML( '<pre>'.htmlspecialchars($this->mContent)."\n</pre>" );
 788+ $wgOut->addHTML( "<pre class=\"mw-user-{$matches[1]}\" dir=\"ltr\">".htmlspecialchars($this->mContent)."\n</pre>" );
789789 } else if ( $rt = Title::newFromRedirect( $text ) ) {
790790 # Display redirect
791791 $imageDir = $wgContLang->isRTL() ? 'rtl' : 'ltr';
Index: trunk/phase3/RELEASE-NOTES
@@ -74,6 +74,8 @@
7575 a path to the AdminSettings.php file
7676 * (bug 8781) Remind users to check file permissions for LocalSettings.php
7777 post-installation
 78+* (bug 10196) Add classes and dir="ltr" to the <pre>s on user CSS and JS pages
 79+ (new classes: mw-user-css, mw-user-js)
7880
7981 == Bugfixes since 1.10 ==
8082

Follow-up revisions

RevisionCommit summaryAuthorDate
r22919Merged revisions 22878-22918 via svnmerge from...david00:00, 12 June 2007
r23409* Wrap site CSS and JavaScript in a <pre> tag, like user JS/CSS...simetrical01:01, 26 June 2007
r23581Merged revisions 23406-23580 via svnmerge from...david04:50, 30 June 2007

Status & tagging log