4 if($wgUseTeX) require_once( "Math.php" );
7 var $mHeaders, $mCookies, $mMetatags, $mKeywords;
8 var $mLinktags, $mPagetitle, $mBodytext, $mDebugtext;
9 var $mHTMLtitle, $mRobotpolicy, $mIsarticle, $mPrintable;
10 var $mSubtitle, $mRedirect;
11 var $mLastModified, $mCategoryLinks;
14 var $mSuppressQuickbar;
17 var $mContainsOldMagic, $mContainsNewMagic;
18 var $mIsArticleRelated;
20 var $mShowFeedLinks = false;
21 var $mEnableClientCache = true;
25 $this->mHeaders
= $this->mCookies
= $this->mMetatags
=
26 $this->mKeywords
= $this->mLinktags
= array();
27 $this->mHTMLtitle
= $this->mPagetitle
= $this->mBodytext
=
28 $this->mRedirect
= $this->mLastModified
=
29 $this->mSubtitle
= $this->mDebugtext
= $this->mRobotpolicy
=
30 $this->mOnloadHandler
= "";
31 $this->mIsArticleRelated
= $this->mIsarticle
= $this->mPrintable
= true;
32 $this->mSuppressQuickbar
= $this->mPrintable
= false;
33 $this->mLanguageLinks
= array();
34 $this->mCategoryLinks
= array() ;
35 $this->mDoNothing
= false;
36 $this->mContainsOldMagic
= $this->mContainsNewMagic
= 0;
37 $this->mParserOptions
= ParserOptions
::newFromUser( $temp = NULL );
38 $this->mSquidMaxage
= 0;
42 function addHeader( $name, $val ) { array_push( $this->mHeaders
, "$name: $val" ) ; }
43 function addCookie( $name, $val ) { array_push( $this->mCookies
, array( $name, $val ) ); }
44 function redirect( $url, $responsecode = '302' ) { $this->mRedirect
= $url; $this->mRedirectCode
= $responsecode; }
46 # To add an http-equiv meta tag, precede the name with "http:"
47 function addMeta( $name, $val ) { array_push( $this->mMetatags
, array( $name, $val ) ); }
48 function addKeyword( $text ) { array_push( $this->mKeywords
, $text ); }
49 function addScript( $script ) { $this->mScripts
.= $script; }
50 function getScript() { return $this->mScripts
; }
52 function addLink( $linkarr ) {
53 # $linkarr should be an associative array of attributes. We'll escape on output.
54 array_push( $this->mLinktags
, $linkarr );
57 function addMetadataLink( $linkarr ) {
58 # note: buggy CC software only reads first "meta" link
59 static $haveMeta = false;
60 $linkarr["rel"] = ($haveMeta) ?
"alternate meta" : "meta";
61 $this->addLink( $linkarr );
65 # checkLastModified tells the client to use the client-cached page if
66 # possible. If sucessful, the OutputPage is disabled so that
67 # any future call to OutputPage->output() have no effect. The method
68 # returns true iff cache-ok headers was sent.
69 function checkLastModified ( $timestamp )
71 global $wgLang, $wgCachePages, $wgUser;
72 if( !$wgCachePages ) {
73 wfDebug( "CACHE DISABLED\n", false );
76 if( preg_match( '/MSIE ([1-4]|5\.0)/', $_SERVER["HTTP_USER_AGENT"] ) ) {
77 # IE 5.0 has probs with our caching
78 wfDebug( "-- bad client, not caching\n", false );
81 if( $wgUser->getOption( "nocache" ) ) {
82 wfDebug( "USER DISABLED CACHE\n", false );
86 $lastmod = gmdate( "D, j M Y H:i:s", wfTimestamp2Unix(
87 max( $timestamp, $wgUser->mTouched
) ) ) . " GMT";
89 if( !empty( $_SERVER["HTTP_IF_MODIFIED_SINCE"] ) ) {
90 # IE sends sizes after the date like this:
91 # Wed, 20 Aug 2003 06:51:19 GMT; length=5202
92 # this breaks strtotime().
93 $modsince = preg_replace( '/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"] );
94 $ismodsince = wfUnix2Timestamp( strtotime( $modsince ) );
95 wfDebug( "-- client send If-Modified-Since: " . $modsince . "\n", false );
96 wfDebug( "-- we might send Last-Modified : $lastmod\n", false );
98 if( ($ismodsince >= $timestamp ) and $wgUser->validateCache( $ismodsince ) ) {
99 # Make sure you're in a place you can leave when you call us!
100 header( "HTTP/1.0 304 Not Modified" );
101 $this->mLastModified
= $lastmod;
102 $this->sendCacheControl();
103 wfDebug( "CACHED client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp\n", false );
107 wfDebug( "READY client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp\n", false );
108 $this->mLastModified
= $lastmod;
111 wfDebug( "We're confused.\n", false );
112 $this->mLastModified
= $lastmod;
116 function getPageTitleActionText () {
120 return wfMsg('edit');
122 return wfMsg('history_short');
124 return wfMsg('unprotect');
126 return wfMsg('unprotect');
128 return wfMsg('delete');
130 return wfMsg('watch');
132 return wfMsg('unwatch');
134 return wfMsg('preview');
139 function setRobotpolicy( $str ) { $this->mRobotpolicy
= $str; }
140 function setHTMLTitle( $name ) {$this->mHTMLtitle
= $name; }
141 function setPageTitle( $name ) {
143 $this->mPagetitle
= $name;
144 if(!empty($action)) {
145 $taction = $this->getPageTitleActionText();
146 if( !empty( $taction ) ) {
147 $name .= " - $taction";
150 $this->setHTMLTitle( $name . " - " . wfMsg( "wikititlesuffix" ) );
152 function getHTMLTitle() { return $this->mHTMLtitle
; }
153 function getPageTitle() { return $this->mPagetitle
; }
154 function setSubtitle( $str ) { $this->mSubtitle
= $str; }
155 function getSubtitle() { return $this->mSubtitle
; }
156 function isArticle() { return $this->mIsarticle
; }
157 function setPrintable() { $this->mPrintable
= true; }
158 function isPrintable() { return $this->mPrintable
; }
159 function setSyndicated( $show = true ) { $this->mShowFeedLinks
= $show; }
160 function isSyndicated() { return $this->mShowFeedLinks
; }
161 function setOnloadHandler( $js ) { $this->mOnloadHandler
= $js; }
162 function getOnloadHandler() { return $this->mOnloadHandler
; }
163 function disable() { $this->mDoNothing
= true; }
165 function setArticleRelated( $v )
167 $this->mIsArticleRelated
= $v;
169 $this->mIsarticle
= false;
172 function setArticleFlag( $v ) {
173 $this->mIsarticle
= $v;
175 $this->mIsArticleRelated
= $v;
179 function isArticleRelated()
181 return $this->mIsArticleRelated
;
184 function getLanguageLinks() {
185 global $wgTitle, $wgLanguageCode;
186 global $wgDBconnection, $wgDBname;
187 return $this->mLanguageLinks
;
189 function suppressQuickbar() { $this->mSuppressQuickbar
= true; }
190 function isQuickbarSuppressed() { return $this->mSuppressQuickbar
; }
192 function addHTML( $text ) { $this->mBodytext
.= $text; }
193 function debug( $text ) { $this->mDebugtext
.= $text; }
195 function setParserOptions( $options )
197 return wfSetVar( $this->mParserOptions
, $options );
200 # First pass--just handle <nowiki> sections, pass the rest off
201 # to doWikiPass2() which does all the real work.
203 # $cacheArticle - assume this text is the main text for the given article
205 function addWikiText( $text, $linestart = true, $cacheArticle = NULL )
207 global $wgParser, $wgParserCache, $wgUser, $wgTitle;
209 $parserOutput = false;
210 if ( $cacheArticle ) {
211 $parserOutput = $wgParserCache->get( $cacheArticle, $wgUser );
214 if ( $parserOutput === false ) {
215 $parserOutput = $wgParser->parse( $text, $wgTitle, $this->mParserOptions
, $linestart );
216 if ( $cacheArticle ) {
217 $wgParserCache->save( $parserOutput, $cacheArticle, $wgUser );
221 $this->mLanguageLinks +
= $parserOutput->getLanguageLinks();
222 $this->mCategoryLinks +
= $parserOutput->getCategoryLinks();
224 $this->addHTML( $parserOutput->getText() );
228 # Set the maximum cache time on the Squid in seconds
229 function setSquidMaxage( $maxage ) {
230 $this->mSquidMaxage
= $maxage;
233 # Use enableClientCache(false) to force it to send nocache headers
234 function enableClientCache( $state ) {
235 return wfSetVar( $this->mEnableClientCache
, $state );
238 function sendCacheControl() {
239 global $wgUseSquid, $wgUseESI;
240 # FIXME: This header may cause trouble with some versions of Internet Explorer
241 header( "Vary: Accept-Encoding, Cookie" );
242 if( $this->mEnableClientCache
&& $this->mLastModified
!= "" ) {
243 if( $wgUseSquid && ! isset( $_COOKIE[ini_get( "session.name") ] ) &&
244 ! $this->isPrintable() )
247 # We'll purge the proxy cache explicitly, but require end user agents
248 # to revalidate against the proxy on each visit.
249 # Surrogate-Control controls our Squid, Cache-Control downstream caches
250 wfDebug( "** proxy caching with ESI; {$this->mLastModified} **\n", false );
251 # start with a shorter timeout for initial testing
252 # header( 'Surrogate-Control: max-age=2678400+2678400, content="ESI/1.0"');
253 header( 'Surrogate-Control: max-age='.$wgSquidMaxage.'+'.$this->mSquidMaxage
.', content="ESI/1.0"');
254 header( 'Cache-Control: s-maxage=0, must-revalidate, max-age=0' );
256 # We'll purge the proxy cache for anons explicitly, but require end user agents
257 # to revalidate against the proxy on each visit.
258 # IMPORTANT! The Squid needs to replace the Cache-Control header with
259 # Cache-Control: s-maxage=0, must-revalidate, max-age=0
260 wfDebug( "** local proxy caching; {$this->mLastModified} **\n", false );
261 # start with a shorter timeout for initial testing
262 # header( "Cache-Control: s-maxage=2678400, must-revalidate, max-age=0" );
263 header( 'Cache-Control: s-maxage='.$this->mSquidMaxage
.', must-revalidate, max-age=0' );
266 # We do want clients to cache if they can, but they *must* check for updates
267 # on revisiting the page.
268 wfDebug( "** private caching; {$this->mLastModified} **\n", false );
269 header( "Expires: -1" );
270 header( "Cache-Control: private, must-revalidate, max-age=0" );
272 header( "Last-modified: {$this->mLastModified}" );
274 wfDebug( "** no caching **\n", false );
276 # In general, the absence of a last modified header should be enough to prevent
277 # the client from using its cache. We send a few other things just to make sure.
278 header( "Expires: -1" );
279 header( "Cache-Control: no-cache, no-store, max-age=0, must-revalidate" );
280 header( "Pragma: no-cache" );
284 # Finally, all the text has been munged and accumulated into
285 # the object, let's actually output it:
289 global $wgUser, $wgLang, $wgDebugComments, $wgCookieExpiration;
290 global $wgInputEncoding, $wgOutputEncoding, $wgLanguageCode;
291 global $wgDebugRedirects, $wgMimeType;
292 if( $this->mDoNothing
){
295 $fname = "OutputPage::output";
296 wfProfileIn( $fname );
298 $sk = $wgUser->getSkin();
300 if ( "" != $this->mRedirect
) {
301 if( substr( $this->mRedirect
, 0, 4 ) != "http" ) {
302 # Standards require redirect URLs to be absolute
304 $this->mRedirect
= $wgServer . $this->mRedirect
;
306 if( $this->mRedirectCode
== '301') {
307 if( !$wgDebugRedirects ) {
308 header("HTTP/1.1 {$this->mRedirectCode} Moved Permanently");
310 $this->mLastModified
= gmdate( "D, j M Y H:i:s" ) . " GMT";
313 $this->sendCacheControl();
315 if( $wgDebugRedirects ) {
316 $url = htmlspecialchars( $this->mRedirect
);
317 print "<html>\n<head>\n<title>Redirect</title>\n</head>\n<body>\n";
318 print "<p>Location: <a href=\"$url\">$url</a></p>\n";
319 print "</body>\n</html>\n";
321 header( "Location: {$this->mRedirect}" );
327 $this->sendCacheControl();
329 header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" );
330 header( "Content-language: {$wgLanguageCode}" );
332 $exp = time() +
$wgCookieExpiration;
333 foreach( $this->mCookies
as $name => $val ) {
334 setcookie( $name, $val, $exp, "/" );
337 $sk->outputPage( $this );
343 global $wgInputEncoding, $wgOutputEncoding, $wgLang;
344 if ( 0 == strcmp( $wgInputEncoding, $wgOutputEncoding ) ) {
347 $outs = $wgLang->iconv( $wgInputEncoding, $wgOutputEncoding, $ins );
348 if ( false === $outs ) { $outs = $ins; }
353 function setEncodings()
355 global $wgInputEncoding, $wgOutputEncoding;
356 global $wgUser, $wgLang;
358 $wgInputEncoding = strtolower( $wgInputEncoding );
360 if( $wgUser->getOption( 'altencoding' ) ) {
361 $wgLang->setAltEncoding();
365 if ( empty( $_SERVER['HTTP_ACCEPT_CHARSET'] ) ) {
366 $wgOutputEncoding = strtolower( $wgOutputEncoding );
371 # This code is unused anyway!
372 # Commenting out. --bv 2003-11-15
374 $a = explode( ",", $_SERVER['HTTP_ACCEPT_CHARSET'] );
378 foreach ( $a as $s ) {
379 if ( preg_match( "/(.*);q=(.*)/", $s, $m ) ) {
391 #if ( "*" == $bestset ) { $bestset = "iso-8859-1"; }
392 if ( "*" == $bestset ) { $bestset = $wgOutputEncoding; }
393 $wgOutputEncoding = strtolower( $bestset );
398 $wgOutputEncoding = $wgInputEncoding;
401 # Returns a HTML comment with the elapsed time since request.
402 # This method has no side effects.
403 function reportTime()
405 global $wgRequestTime;
408 list( $usec, $sec ) = explode( " ", $wgRequestTime );
409 $start = (float)$sec +
(float)$usec;
410 $elapsed = $now - $start;
411 $com = sprintf( "<!-- Time since request: %01.2f secs. -->",
416 # Note: these arguments are keys into wfMsg(), not text!
418 function errorpage( $title, $msg )
422 $this->mDebugtext
.= "Original title: " .
423 $wgTitle->getPrefixedText() . "\n";
424 $this->setPageTitle( wfMsg( $title ) );
425 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
426 $this->setRobotpolicy( "noindex,nofollow" );
427 $this->setArticleRelated( false );
428 $this->enableClientCache( false );
430 $this->mBodytext
= "";
431 $this->addHTML( "<p>" . wfMsg( $msg ) . "</p>\n" );
432 $this->returnToMain( false );
438 function sysopRequired()
442 $this->setPageTitle( wfMsg( "sysoptitle" ) );
443 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
444 $this->setRobotpolicy( "noindex,nofollow" );
445 $this->setArticleRelated( false );
446 $this->mBodytext
= "";
448 $sk = $wgUser->getSkin();
449 $ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" );
450 $this->addHTML( wfMsg( "sysoptext", $ap ) );
451 $this->returnToMain();
454 function developerRequired()
458 $this->setPageTitle( wfMsg( "developertitle" ) );
459 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
460 $this->setRobotpolicy( "noindex,nofollow" );
461 $this->setArticleRelated( false );
462 $this->mBodytext
= "";
464 $sk = $wgUser->getSkin();
465 $ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" );
466 $this->addHTML( wfMsg( "developertext", $ap ) );
467 $this->returnToMain();
470 function loginToUse()
472 global $wgUser, $wgTitle, $wgLang;
474 $this->setPageTitle( wfMsg( "loginreqtitle" ) );
475 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
476 $this->setRobotpolicy( "noindex,nofollow" );
477 $this->setArticleFlag( false );
478 $this->mBodytext
= "";
479 $this->addWikiText( wfMsg( "loginreqtext" ) );
481 # We put a comment in the .html file so a Sysop can diagnose the page the
483 $this->addHTML( "\n<!--" .
484 $wgLang->getNsText( $wgTitle->getNamespace() ) .
486 $wgTitle->getDBkey() . "-->" );
487 $this->returnToMain(); # Flip back to the main page after 10 seconds.
490 function databaseError( $fname, &$conn )
492 global $wgUser, $wgCommandLineMode;
494 $this->setPageTitle( wfMsgNoDB( "databaseerror" ) );
495 $this->setRobotpolicy( "noindex,nofollow" );
496 $this->setArticleRelated( false );
497 $this->enableClientCache( false );
499 if ( $wgCommandLineMode ) {
500 $msg = wfMsgNoDB( "dberrortextcl" );
502 $msg = wfMsgNoDB( "dberrortext" );
505 $msg = str_replace( "$1", htmlspecialchars( $conn->lastQuery() ), $msg );
506 $msg = str_replace( "$2", htmlspecialchars( $fname ), $msg );
507 $msg = str_replace( "$3", $conn->lastErrno(), $msg );
508 $msg = str_replace( "$4", htmlspecialchars( $conn->lastError() ), $msg );
510 if ( $wgCommandLineMode ||
!is_object( $wgUser )) {
514 $sk = $wgUser->getSkin();
515 $shlink = $sk->makeKnownLink( wfMsgNoDB( "searchhelppage" ),
516 wfMsgNoDB( "searchingwikipedia" ) );
517 $msg = str_replace( "$5", $shlink, $msg );
518 $this->mBodytext
= $msg;
523 function readOnlyPage( $source = null, $protected = false )
525 global $wgUser, $wgReadOnlyFile;
527 $this->setRobotpolicy( "noindex,nofollow" );
528 $this->setArticleRelated( false );
531 $this->setPageTitle( wfMsg( "viewsource" ) );
532 $this->addWikiText( wfMsg( "protectedtext" ) );
534 $this->setPageTitle( wfMsg( "readonly" ) );
535 $reason = file_get_contents( $wgReadOnlyFile );
536 $this->addWikiText( wfMsg( "readonlytext", $reason ) );
539 if( is_string( $source ) ) {
540 if( strcmp( $source, "" ) == 0 ) {
541 $source = wfMsg( "noarticletext" );
543 $rows = $wgUser->getOption( "rows" );
544 $cols = $wgUser->getOption( "cols" );
545 $text = "\n<textarea cols='$cols' rows='$rows' readonly='readonly'>" .
546 htmlspecialchars( $source ) . "\n</textarea>";
547 $this->addHTML( $text );
550 $this->returnToMain( false );
553 function fatalError( $message )
555 $this->setPageTitle( wfMsg( "internalerror" ) );
556 $this->setRobotpolicy( "noindex,nofollow" );
557 $this->setArticleRelated( false );
558 $this->enableClientCache( false );
560 $this->mBodytext
= $message;
565 function unexpectedValueError( $name, $val )
567 $this->fatalError( wfMsg( "unexpected", $name, $val ) );
570 function fileCopyError( $old, $new )
572 $this->fatalError( wfMsg( "filecopyerror", $old, $new ) );
575 function fileRenameError( $old, $new )
577 $this->fatalError( wfMsg( "filerenameerror", $old, $new ) );
580 function fileDeleteError( $name )
582 $this->fatalError( wfMsg( "filedeleteerror", $name ) );
585 function fileNotFoundError( $name )
587 $this->fatalError( wfMsg( "filenotfound", $name ) );
590 function returnToMain( $auto = true, $returnto = NULL )
592 global $wgUser, $wgOut, $wgRequest;
594 if ( $returnto == NULL ) {
595 $returnto = $wgRequest->getText( 'returnto' );
598 $sk = $wgUser->getSkin();
599 if ( "" == $returnto ) {
600 $returnto = wfMsg( "mainpage" );
602 $link = $sk->makeKnownLink( $returnto, "" );
604 $r = wfMsg( "returnto", $link );
606 $titleObj = Title
::newFromText( $returnto );
607 $wgOut->addMeta( "http:Refresh", "10;url=" . $titleObj->escapeFullURL() );
609 $wgOut->addHTML( "\n<p>$r</p>\n" );
612 # This function takes the existing and broken links for the page
613 # and uses the first 10 of them for META keywords
614 function addMetaTags ()
616 global $wgLinkCache , $wgOut ;
617 $good = array_keys ( $wgLinkCache->mGoodLinks
) ;
618 $bad = array_keys ( $wgLinkCache->mBadLinks
) ;
619 $a = array_merge ( $good , $bad ) ;
620 $a = array_slice ( $a , 0 , 10 ) ; # 10 keywords max
621 $a = implode ( "," , $a ) ;
626 $a = htmlspecialchars(preg_replace(array_keys($strip), array_values($strip),$a ));
628 $wgOut->addMeta ( "KEYWORDS" , $a ) ;
631 /* private */ function headElement()
633 global $wgDocType, $wgDTD, $wgLanguageCode, $wgOutputEncoding, $wgMimeType;
634 global $wgUser, $wgLang, $wgRequest;
636 $xml = ($wgMimeType == 'text/xml');
638 $ret = "<" . "?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n";
643 $ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\"\n \"$wgDTD\">\n";
645 if ( "" == $this->mHTMLtitle
) {
646 $this->mHTMLtitle
= wfMsg( "pagetitle", $this->mPagetitle
);
649 $xmlbits = "xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\"";
653 $rtl = $wgLang->isRTL() ?
" dir='RTL'" : "";
654 $ret .= "<html $xmlbits lang=\"$wgLanguageCode\" $rtl>\n";
655 $ret .= "<head>\n<title>" . htmlspecialchars( $this->mHTMLtitle
) . "</title>\n";
656 array_push( $this->mMetatags
, array( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ) );
658 $ret .= $this->getHeadLinks();
660 if( $this->isPrintable() ) {
663 $media = "media='print'";
665 $printsheet = htmlspecialchars( "$wgStylePath/wikiprintable.css" );
666 $ret .= "<link rel='stylesheet' type='text/css' $media href='$printsheet' />\n";
668 $sk = $wgUser->getSkin();
669 $ret .= $sk->getHeadScripts();
670 $ret .= $this->mScripts
;
671 $ret .= $sk->getUserStyles();
677 function getHeadLinks() {
678 global $wgRequest, $wgStylePath;
680 foreach ( $this->mMetatags
as $tag ) {
681 if ( 0 == strcasecmp( "http:", substr( $tag[0], 0, 5 ) ) ) {
683 $tag[0] = substr( $tag[0], 5 );
687 $ret .= "<meta $a=\"{$tag[0]}\" content=\"{$tag[1]}\" />\n";
689 $p = $this->mRobotpolicy
;
690 if ( "" == $p ) { $p = "index,follow"; }
691 $ret .= "<meta name=\"robots\" content=\"$p\" />\n";
693 if ( count( $this->mKeywords
) > 0 ) {
698 $ret .= "<meta name=\"keywords\" content=\"" .
699 htmlspecialchars(preg_replace(array_keys($strip), array_values($strip),implode( ",", $this->mKeywords
))) . "\" />\n";
701 foreach ( $this->mLinktags
as $tag ) {
703 foreach( $tag as $attr => $val ) {
704 $ret .= " $attr=\"" . htmlspecialchars( $val ) . "\"";
708 if( $this->isSyndicated() ) {
709 # FIXME: centralize the mime-type and name information in Feed.php
710 $link = $wgRequest->escapeAppendQuery( "feed=rss" );
711 $ret .= "<link rel='alternate' type='application/rss+xml' title='RSS 2.0' href='$link' />\n";
712 $link = $wgRequest->escapeAppendQuery( "feed=atom" );
713 $ret .= "<link rel='alternate' type='application/rss+atom' title='Atom 0.3' href='$link' />\n";
715 # FIXME: get these working
716 # $fix = htmlspecialchars( $wgStylePath . "/ie-png-fix.js" );
717 # $ret .= "<!--[if gte IE 5.5000]><script type='text/javascript' src='$fix'></script><![endif]-->";