Index: trunk/phase3/includes/Article.php |
— | — | @@ -777,14 +777,21 @@ |
778 | 778 | } |
779 | 779 | if( !$outputDone ) { |
780 | 780 | $wgOut->setRevisionId( $this->getRevIdFetched() ); |
781 | | - # wrap user css and user js in pre and don't parse |
782 | | - # XXX: use $this->mTitle->usCssJsSubpage() when php is fixed/ a workaround is found |
| 781 | + // Wrap site/user css/js in pre and don't parse. User pages need |
| 782 | + // to be subpages, site pages just need to end in ".css" or ".js". |
| 783 | + |
| 784 | + // @todo: use $this->mTitle->isCssJsSubpage() when php is fixed/ |
| 785 | + // a workaround is found. |
783 | 786 | if ( |
784 | | - $ns == NS_USER && |
785 | | - preg_match('!/[\w]+\.(css|js)$!', $this->mTitle->getDBkey(), $matches) |
| 787 | + ($ns == NS_USER and preg_match('#/\w+\.(css|js)$#',$this->mTitle->getDBkey(),$matches)) |
| 788 | + or ($ns == NS_MEDIAWIKI and preg_match('/.(css|js)$/', $this->mTitle->getDBkey(), $matches)) |
786 | 789 | ) { |
787 | 790 | $wgOut->addWikiText( wfMsg('clearyourcache')); |
788 | | - $wgOut->addHTML( "<pre class=\"mw-user-{$matches[1]}\" dir=\"ltr\">".htmlspecialchars($this->mContent)."\n</pre>" ); |
| 791 | + $classbit = $ns == NS_USER ? 'user' : 'site'; |
| 792 | + $wgOut->addHTML( |
| 793 | + "<pre class=\"mw-$classbit-{$matches[1]}\" dir=\"ltr\">" |
| 794 | + .htmlspecialchars($this->mContent)."\n</pre>" |
| 795 | + ); |
789 | 796 | } else if ( $rt = Title::newFromRedirect( $text ) ) { |
790 | 797 | # Display redirect |
791 | 798 | $imageDir = $wgContLang->isRTL() ? 'rtl' : 'ltr'; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -75,14 +75,13 @@ |
76 | 76 | a path to the AdminSettings.php file |
77 | 77 | * (bug 8781) Remind users to check file permissions for LocalSettings.php |
78 | 78 | post-installation |
79 | | -* (bug 10196) Add classes and dir="ltr" to the <pre>s on user CSS and JS pages |
80 | | - (new classes: mw-user-css, mw-user-js) |
81 | 79 | * Use shared.css for all skins and oldshared.css in place of common.css for |
82 | 80 | pre-Monobook skins. As always, modifications should go in-wiki to MediaWiki: |
83 | 81 | Common.css and MediaWiki:Monobook.css. |
84 | 82 | * (bug 8869) Introduce Special:Uncategorizedtemplates |
85 | 83 | * (bug 8734) Different log message when article protection level is changed |
86 | | -* (bug 8458) Limit custom signature length to $wgMaxSigChars bytes |
| 84 | +* (bug 8458, 10338) Limit custom signature length to $wgMaxSigChars Unicode |
| 85 | + characters |
87 | 86 | * (bug 10096) Added an ability to query interwiki map table |
88 | 87 | * On reupload, add a null revision to the image description page |
89 | 88 | * Group log output by date |
— | — | @@ -101,9 +100,11 @@ |
102 | 101 | enabled by default. |
103 | 102 | * Added option to install to MyISAM |
104 | 103 | * (bug 9250) Remove hardcoded minimum image name length of three characters |
105 | | -* (bug 10338) Enforce signature length limit in Unicode characters instead of bytes |
106 | 104 | * Fixed DISPLAYTITLE behaviour to reject titles which don't normalise to the |
107 | 105 | same title as the current page, and enabled per default |
| 106 | +* Wrap site CSS and JavaScript in a <pre> tag, like user JS/CSS |
| 107 | +* (bug 10196) Add classes and dir="ltr" to the <pre>s on CSS and JS pages (new |
| 108 | + classes: mw-user-css, mw-user-js, mw-site-css, mw-site-js) |
108 | 109 | |
109 | 110 | == Bugfixes since 1.10 == |
110 | 111 | |