r23409 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23408‎ | r23409 | r23410 >
Date:01:01, 26 June 2007
Author:simetrical
Status:old
Tags:
Comment:
* Wrap site CSS and JavaScript in a <pre> tag, like user JS/CSS
* (bug 10196) Add classes and dir=ltr to the <pre>s on CSS and JS pages (new
classes: mw-user-css, mw-user-js, mw-site-css, mw-site-js)
* Merge RELEASE-NOTES regarding the addition of a feature and a change to that feature
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -777,14 +777,21 @@
778778 }
779779 if( !$outputDone ) {
780780 $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.
783786 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))
786789 ) {
787790 $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+ );
789796 } else if ( $rt = Title::newFromRedirect( $text ) ) {
790797 # Display redirect
791798 $imageDir = $wgContLang->isRTL() ? 'rtl' : 'ltr';
Index: trunk/phase3/RELEASE-NOTES
@@ -75,14 +75,13 @@
7676 a path to the AdminSettings.php file
7777 * (bug 8781) Remind users to check file permissions for LocalSettings.php
7878 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)
8179 * Use shared.css for all skins and oldshared.css in place of common.css for
8280 pre-Monobook skins. As always, modifications should go in-wiki to MediaWiki:
8381 Common.css and MediaWiki:Monobook.css.
8482 * (bug 8869) Introduce Special:Uncategorizedtemplates
8583 * (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
8786 * (bug 10096) Added an ability to query interwiki map table
8887 * On reupload, add a null revision to the image description page
8988 * Group log output by date
@@ -101,9 +100,11 @@
102101 enabled by default.
103102 * Added option to install to MyISAM
104103 * (bug 9250) Remove hardcoded minimum image name length of three characters
105 -* (bug 10338) Enforce signature length limit in Unicode characters instead of bytes
106104 * Fixed DISPLAYTITLE behaviour to reject titles which don't normalise to the
107105 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)
108109
109110 == Bugfixes since 1.10 ==
110111

Follow-up revisions

RevisionCommit summaryAuthorDate
r23581Merged revisions 23406-23580 via svnmerge from...david04:50, 30 June 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r22887* (bug 10196) Add classes and dir="ltr" to the <pre>s on user CSS and JS page...simetrical16:36, 10 June 2007
r22919Merged revisions 22878-22918 via svnmerge from...david00:00, 12 June 2007

Status & tagging log