r36308 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36307‎ | r36308 | r36309 >
Date:20:30, 15 June 2008
Author:demon
Status:old
Tags:
Comment:
(bug 2889) MediaWiki:Print.css now applies to the printable version
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -962,7 +962,8 @@
963963 function setupUserCss() {
964964 wfProfileIn( __METHOD__ );
965965
966 - global $wgRequest, $wgAllowUserCss, $wgUseSiteCss, $wgContLang, $wgSquidMaxage, $wgStylePath, $wgUser;
 966+ global $wgRequest, $wgAllowUserCss, $wgUseSiteCss,
 967+ $wgContLang, $wgSquidMaxage, $wgStylePath, $wgUser, $wgOut;
967968
968969 $sitecss = '';
969970 $usercss = '';
@@ -1005,6 +1006,7 @@
10061007 $sitecss .= '@import "' . self::makeNSUrl( 'Common.css', $query, NS_MEDIAWIKI) . '";' . "\n";
10071008 $sitecss .= '@import "' . self::makeNSUrl( ucfirst( $this->skinname ) . '.css', $query, NS_MEDIAWIKI ) . '";' . "\n";
10081009 $sitecss .= '@import "' . self::makeUrl( '-', "action=raw&gen=css$siteargs$skinquery" ) . '";' . "\n";
 1010+ if( $wgOut->isPrintable()) $sitecss .= '@import "' . self::makeNSUrl( 'Print.css', $query, NS_MEDIAWIKI) . '";' . "\n";
10091011 }
10101012
10111013 # If we use any dynamic CSS, make a little CDATA block out of it.
Index: trunk/phase3/includes/Skin.php
@@ -416,7 +416,7 @@
417417
418418 # get the user/site-specific stylesheet, SkinTemplate loads via RawPage.php (settings are cached that way)
419419 function getUserStylesheet() {
420 - global $wgStylePath, $wgRequest, $wgContLang, $wgSquidMaxage, $wgStyleVersion;
 420+ global $wgStylePath, $wgRequest, $wgContLang, $wgSquidMaxage, $wgStyleVersion, $wgOut;
421421 $sheet = $this->getStylesheet();
422422 $s = "@import \"$wgStylePath/common/shared.css?$wgStyleVersion\";\n";
423423 $s .= "@import \"$wgStylePath/common/oldshared.css?$wgStyleVersion\";\n";
@@ -428,6 +428,7 @@
429429 '@import "' . self::makeNSUrl( ucfirst( $this->getSkinName() . '.css' ), $query, NS_MEDIAWIKI ) . "\";\n";
430430
431431 $s .= $this->doGetUserStyles();
 432+ if($wgOut->isPrintable()) $s .= '@import "' . self::makeNSUrl( 'Print.css', $query, NS_MEDIAWIKI ) . "\";\n";
432433 return $s."\n";
433434 }
434435
@@ -528,7 +529,7 @@
529530 }
530531 return $s;
531532 }
532 -
 533+
533534 function getBodyOptions() {
534535 global $wgUser, $wgTitle, $wgOut, $wgRequest, $wgContLang;
535536
Index: trunk/phase3/RELEASE-NOTES
@@ -155,6 +155,7 @@
156156 external links.
157157 * (bug 14132) Allow user to disable bot edits from being output to UDP.
158158 * (bug 14328) jsMsg() within Wikibits now accepts a DOM object, not just a string
 159+* (bug 2889) MediaWiki:Print.css applies to the printable version
159160
160161 === Bug fixes in 1.13 ===
161162

Follow-up revisions

RevisionCommit summaryAuthorDate
r36346Per r36308: Add print.css to the message filesraymond19:41, 16 June 2008
r36474Revert r36308 "(bug 2889) MediaWiki:Print.css now applies to the printable ve...brion18:18, 19 June 2008
r40414* (bug 2889) MediaWiki:Print.css applies to the printable version...brion03:13, 4 September 2008

Status & tagging log