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, $mHeadtext;
11 var $mLastModified, $mCategoryLinks;
13 var $mSuppressQuickbar;
16 var $mContainsOldMagic, $mContainsNewMagic;
17 var $mIsArticleRelated;
19 var $mShowFeedLinks = false;
20 var $mEnableClientCache = true;
24 $this->mHeaders
= $this->mCookies
= $this->mMetatags
=
25 $this->mKeywords
= $this->mLinktags
= array();
26 $this->mHTMLtitle
= $this->mPagetitle
= $this->mBodytext
=
27 $this->mRedirect
= $this->mLastModified
=
28 $this->mSubtitle
= $this->mDebugtext
= $this->mRobotpolicy
=
29 $this->mOnloadHandler
= "";
30 $this->mIsArticleRelated
= $this->mIsarticle
= $this->mPrintable
= true;
31 $this->mSuppressQuickbar
= $this->mPrintable
= false;
32 $this->mLanguageLinks
= array();
33 $this->mCategoryLinks
= array() ;
34 $this->mDoNothing
= false;
35 $this->mContainsOldMagic
= $this->mContainsNewMagic
= 0;
36 $this->mParserOptions
= ParserOptions
::newFromUser( $temp = NULL );
37 $this->mSquidMaxage
= 0;
40 function addHeader( $name, $val ) { array_push( $this->mHeaders
, "$name: $val" ) ; }
41 function addCookie( $name, $val ) { array_push( $this->mCookies
, array( $name, $val ) ); }
42 function redirect( $url, $responsecode = '302' ) { $this->mRedirect
= $url; $this->mRedirectCode
= $responsecode; }
44 # To add an http-equiv meta tag, precede the name with "http:"
45 function addMeta( $name, $val ) { array_push( $this->mMetatags
, array( $name, $val ) ); }
46 function addKeyword( $text ) { array_push( $this->mKeywords
, $text ); }
48 function addLink( $linkarr ) {
49 # $linkarr should be an associative array of attributes. We'll escape on output.
50 array_push( $this->mLinktags
, $linkarr );
53 function addMetadataLink( $linkarr ) {
54 # note: buggy CC software only reads first "meta" link
55 static $haveMeta = false;
56 $linkarr["rel"] = ($haveMeta) ?
"alternate meta" : "meta";
57 $this->addLink( $linkarr );
61 # checkLastModified tells the client to use the client-cached page if
62 # possible. If sucessful, the OutputPage is disabled so that
63 # any future call to OutputPage->output() have no effect. The method
64 # returns true iff cache-ok headers was sent.
65 function checkLastModified ( $timestamp )
67 global $wgLang, $wgCachePages, $wgUser;
68 if( !$wgCachePages ) {
69 wfDebug( "CACHE DISABLED\n", false );
72 if( preg_match( '/MSIE ([1-4]|5\.0)/', $_SERVER["HTTP_USER_AGENT"] ) ) {
73 # IE 5.0 has probs with our caching
74 wfDebug( "-- bad client, not caching\n", false );
77 if( $wgUser->getOption( "nocache" ) ) {
78 wfDebug( "USER DISABLED CACHE\n", false );
82 $lastmod = gmdate( "D, j M Y H:i:s", wfTimestamp2Unix(
83 max( $timestamp, $wgUser->mTouched
) ) ) . " GMT";
85 if( !empty( $_SERVER["HTTP_IF_MODIFIED_SINCE"] ) ) {
86 # IE sends sizes after the date like this:
87 # Wed, 20 Aug 2003 06:51:19 GMT; length=5202
88 # this breaks strtotime().
89 $modsince = preg_replace( '/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"] );
90 $ismodsince = wfUnix2Timestamp( strtotime( $modsince ) );
91 wfDebug( "-- client send If-Modified-Since: " . $modsince . "\n", false );
92 wfDebug( "-- we might send Last-Modified : $lastmod\n", false );
94 if( ($ismodsince >= $timestamp ) and $wgUser->validateCache( $ismodsince ) ) {
95 # Make sure you're in a place you can leave when you call us!
96 header( "HTTP/1.0 304 Not Modified" );
97 $this->mLastModified
= $lastmod;
98 $this->sendCacheControl();
99 wfDebug( "CACHED client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp\n", false );
103 wfDebug( "READY client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp\n", false );
104 $this->mLastModified
= $lastmod;
107 wfDebug( "We're confused.\n", false );
108 $this->mLastModified
= $lastmod;
112 function getPageTitleActionText () {
116 return wfMsg('edit');
118 return wfMsg('history_short');
120 return wfMsg('unprotect');
122 return wfMsg('unprotect');
124 return wfMsg('delete');
126 return wfMsg('watch');
128 return wfMsg('unwatch');
130 return wfMsg('preview');
135 function setRobotpolicy( $str ) { $this->mRobotpolicy
= $str; }
136 function setHTMLTitle( $name ) {$this->mHTMLtitle
= $name; }
137 function setPageTitle( $name ) {
139 $this->mPagetitle
= $name;
140 if(!empty($action)) {
141 $taction = $this->getPageTitleActionText();
142 if( !empty( $taction ) ) {
143 $name .= " - $taction";
146 $this->setHTMLTitle( $name . " - " . wfMsg( "wikititlesuffix" ) );
148 function getHTMLTitle() { return $this->mHTMLtitle
; }
149 function getPageTitle() { return $this->mPagetitle
; }
150 function setSubtitle( $str ) { $this->mSubtitle
= $str; }
151 function getSubtitle() { return $this->mSubtitle
; }
152 function isArticle() { return $this->mIsarticle
; }
153 function setPrintable() { $this->mPrintable
= true; }
154 function isPrintable() { return $this->mPrintable
; }
155 function setSyndicated( $show = true ) { $this->mShowFeedLinks
= $show; }
156 function isSyndicated() { return $this->mShowFeedLinks
; }
157 function setOnloadHandler( $js ) { $this->mOnloadHandler
= $js; }
158 function getOnloadHandler() { return $this->mOnloadHandler
; }
159 function disable() { $this->mDoNothing
= true; }
161 function setArticleRelated( $v )
163 $this->mIsArticleRelated
= $v;
165 $this->mIsarticle
= false;
168 function setArticleFlag( $v ) {
169 $this->mIsarticle
= $v;
171 $this->mIsArticleRelated
= $v;
175 function isArticleRelated()
177 return $this->mIsArticleRelated
;
180 function getLanguageLinks() {
181 global $wgTitle, $wgLanguageCode;
182 global $wgDBconnection, $wgDBname;
183 return $this->mLanguageLinks
;
185 function suppressQuickbar() { $this->mSuppressQuickbar
= true; }
186 function isQuickbarSuppressed() { return $this->mSuppressQuickbar
; }
188 function addHTML( $text ) { $this->mBodytext
.= $text; }
189 function addHeadtext( $text ) { $this->mHeadtext
.= $text; }
190 function debug( $text ) { $this->mDebugtext
.= $text; }
192 function setParserOptions( $options )
194 return wfSetVar( $this->mParserOptions
, $options );
197 # First pass--just handle <nowiki> sections, pass the rest off
198 # to doWikiPass2() which does all the real work.
200 # $cacheArticle - assume this text is the main text for the given article
202 function addWikiText( $text, $linestart = true, $cacheArticle = NULL )
204 global $wgParser, $wgParserCache, $wgUser, $wgTitle;
206 $parserOutput = false;
207 if ( $cacheArticle ) {
208 $parserOutput = $wgParserCache->get( $cacheArticle, $wgUser );
211 if ( $parserOutput === false ) {
212 $parserOutput = $wgParser->parse( $text, $wgTitle, $this->mParserOptions
, $linestart );
213 if ( $cacheArticle ) {
214 $wgParserCache->save( $parserOutput, $cacheArticle, $wgUser );
218 $this->mLanguageLinks +
= $parserOutput->getLanguageLinks();
219 $this->mCategoryLinks +
= $parserOutput->getCategoryLinks();
221 $this->addHTML( $parserOutput->getText() );
225 # Set the maximum cache time on the Squid in seconds
226 function setSquidMaxage( $maxage ) {
227 $this->mSquidMaxage
= $maxage;
230 # Use enableClientCache(false) to force it to send nocache headers
231 function enableClientCache( $state ) {
232 return wfSetVar( $this->mEnableClientCache
, $state );
235 function sendCacheControl() {
236 global $wgUseSquid, $wgUseESI;
237 # FIXME: This header may cause trouble with some versions of Internet Explorer
238 header( "Vary: Accept-Encoding, Cookie" );
239 if( $this->mEnableClientCache
&& $this->mLastModified
!= "" ) {
240 if( $wgUseSquid && ! isset( $_COOKIE[ini_get( "session.name") ] ) &&
241 ! $this->isPrintable() )
244 # We'll purge the proxy cache explicitly, but require end user agents
245 # to revalidate against the proxy on each visit.
246 # Surrogate-Control controls our Squid, Cache-Control downstream caches
247 wfDebug( "** proxy caching with ESI; {$this->mLastModified} **\n", false );
248 # start with a shorter timeout for initial testing
249 # header( 'Surrogate-Control: max-age=2678400+2678400, content="ESI/1.0"');
250 header( 'Surrogate-Control: max-age='.$wgSquidMaxage.'+'.$this->mSquidMaxage
.', content="ESI/1.0"');
251 header( 'Cache-Control: s-maxage=0, must-revalidate, max-age=0' );
253 # We'll purge the proxy cache for anons explicitly, but require end user agents
254 # to revalidate against the proxy on each visit.
255 # IMPORTANT! The Squid needs to replace the Cache-Control header with
256 # Cache-Control: s-maxage=0, must-revalidate, max-age=0
257 wfDebug( "** local proxy caching; {$this->mLastModified} **\n", false );
258 # start with a shorter timeout for initial testing
259 # header( "Cache-Control: s-maxage=2678400, must-revalidate, max-age=0" );
260 header( 'Cache-Control: s-maxage='.$this->mSquidMaxage
.', must-revalidate, max-age=0' );
263 # We do want clients to cache if they can, but they *must* check for updates
264 # on revisiting the page.
265 wfDebug( "** private caching; {$this->mLastModified} **\n", false );
266 header( "Expires: -1" );
267 header( "Cache-Control: private, must-revalidate, max-age=0" );
269 header( "Last-modified: {$this->mLastModified}" );
271 wfDebug( "** no caching **\n", false );
273 # In general, the absence of a last modified header should be enough to prevent
274 # the client from using its cache. We send a few other things just to make sure.
275 header( "Expires: -1" );
276 header( "Cache-Control: no-cache, no-store, max-age=0, must-revalidate" );
277 header( "Pragma: no-cache" );
281 # Finally, all the text has been munged and accumulated into
282 # the object, let's actually output it:
286 global $wgUser, $wgLang, $wgDebugComments, $wgCookieExpiration;
287 global $wgInputEncoding, $wgOutputEncoding, $wgLanguageCode;
288 global $wgDebugRedirects, $wgMimeType;
289 if( $this->mDoNothing
){
292 $fname = "OutputPage::output";
293 wfProfileIn( $fname );
295 $sk = $wgUser->getSkin();
297 if ( "" != $this->mRedirect
) {
298 if( substr( $this->mRedirect
, 0, 4 ) != "http" ) {
299 # Standards require redirect URLs to be absolute
301 $this->mRedirect
= $wgServer . $this->mRedirect
;
303 if( $this->mRedirectCode
== '301') {
304 if( !$wgDebugRedirects ) {
305 header("HTTP/1.1 {$this->mRedirectCode} Moved Permanently");
307 $this->mLastModified
= gmdate( "D, j M Y H:i:s" ) . " GMT";
310 $this->sendCacheControl();
312 if( $wgDebugRedirects ) {
313 $url = htmlspecialchars( $this->mRedirect
);
314 print "<html>\n<head>\n<title>Redirect</title>\n</head>\n<body>\n";
315 print "<p>Location: <a href=\"$url\">$url</a></p>\n";
316 print "</body>\n</html>\n";
318 header( "Location: {$this->mRedirect}" );
324 $this->sendCacheControl();
326 header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" );
327 header( "Content-language: {$wgLanguageCode}" );
329 $exp = time() +
$wgCookieExpiration;
330 foreach( $this->mCookies
as $name => $val ) {
331 setcookie( $name, $val, $exp, "/" );
334 $sk->outputPage( $this );
340 global $wgInputEncoding, $wgOutputEncoding, $wgLang;
341 if ( 0 == strcmp( $wgInputEncoding, $wgOutputEncoding ) ) {
344 $outs = $wgLang->iconv( $wgInputEncoding, $wgOutputEncoding, $ins );
345 if ( false === $outs ) { $outs = $ins; }
350 function setEncodings()
352 global $wgInputEncoding, $wgOutputEncoding;
353 global $wgUser, $wgLang;
355 $wgInputEncoding = strtolower( $wgInputEncoding );
357 if( $wgUser->getOption( 'altencoding' ) ) {
358 $wgLang->setAltEncoding();
362 if ( empty( $_SERVER['HTTP_ACCEPT_CHARSET'] ) ) {
363 $wgOutputEncoding = strtolower( $wgOutputEncoding );
368 # This code is unused anyway!
369 # Commenting out. --bv 2003-11-15
371 $a = explode( ",", $_SERVER['HTTP_ACCEPT_CHARSET'] );
375 foreach ( $a as $s ) {
376 if ( preg_match( "/(.*);q=(.*)/", $s, $m ) ) {
388 #if ( "*" == $bestset ) { $bestset = "iso-8859-1"; }
389 if ( "*" == $bestset ) { $bestset = $wgOutputEncoding; }
390 $wgOutputEncoding = strtolower( $bestset );
395 $wgOutputEncoding = $wgInputEncoding;
398 # Returns a HTML comment with the elapsed time since request.
399 # This method has no side effects.
400 function reportTime()
402 global $wgRequestTime;
405 list( $usec, $sec ) = explode( " ", $wgRequestTime );
406 $start = (float)$sec +
(float)$usec;
407 $elapsed = $now - $start;
408 $com = sprintf( "<!-- Time since request: %01.2f secs. -->",
413 # Note: these arguments are keys into wfMsg(), not text!
415 function errorpage( $title, $msg )
419 $this->mDebugtext
.= "Original title: " .
420 $wgTitle->getPrefixedText() . "\n";
421 $this->setPageTitle( wfMsg( $title ) );
422 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
423 $this->setRobotpolicy( "noindex,nofollow" );
424 $this->setArticleRelated( false );
425 $this->enableClientCache( false );
427 $this->mBodytext
= "";
428 $this->addHTML( "<p>" . wfMsg( $msg ) . "</p>\n" );
429 $this->returnToMain( false );
435 function sysopRequired()
439 $this->setPageTitle( wfMsg( "sysoptitle" ) );
440 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
441 $this->setRobotpolicy( "noindex,nofollow" );
442 $this->setArticleRelated( false );
443 $this->mBodytext
= "";
445 $sk = $wgUser->getSkin();
446 $ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" );
447 $this->addHTML( wfMsg( "sysoptext", $ap ) );
448 $this->returnToMain();
451 function developerRequired()
455 $this->setPageTitle( wfMsg( "developertitle" ) );
456 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
457 $this->setRobotpolicy( "noindex,nofollow" );
458 $this->setArticleRelated( false );
459 $this->mBodytext
= "";
461 $sk = $wgUser->getSkin();
462 $ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" );
463 $this->addHTML( wfMsg( "developertext", $ap ) );
464 $this->returnToMain();
467 function loginToUse()
469 global $wgUser, $wgTitle, $wgLang;
471 $this->setPageTitle( wfMsg( "loginreqtitle" ) );
472 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
473 $this->setRobotpolicy( "noindex,nofollow" );
474 $this->setArticleFlag( false );
475 $this->mBodytext
= "";
476 $this->addWikiText( wfMsg( "loginreqtext" ) );
478 # We put a comment in the .html file so a Sysop can diagnose the page the
480 $this->addHTML( "\n<!--" .
481 $wgLang->getNsText( $wgTitle->getNamespace() ) .
483 $wgTitle->getDBkey() . "-->" );
484 $this->returnToMain(); # Flip back to the main page after 10 seconds.
487 function databaseError( $fname, &$conn )
489 global $wgUser, $wgCommandLineMode;
491 $this->setPageTitle( wfMsgNoDB( "databaseerror" ) );
492 $this->setRobotpolicy( "noindex,nofollow" );
493 $this->setArticleRelated( false );
494 $this->enableClientCache( false );
496 if ( $wgCommandLineMode ) {
497 $msg = wfMsgNoDB( "dberrortextcl" );
499 $msg = wfMsgNoDB( "dberrortext" );
502 $msg = str_replace( "$1", htmlspecialchars( $conn->lastQuery() ), $msg );
503 $msg = str_replace( "$2", htmlspecialchars( $fname ), $msg );
504 $msg = str_replace( "$3", $conn->lastErrno(), $msg );
505 $msg = str_replace( "$4", htmlspecialchars( $conn->lastError() ), $msg );
507 if ( $wgCommandLineMode ||
!is_object( $wgUser )) {
511 $sk = $wgUser->getSkin();
512 $shlink = $sk->makeKnownLink( wfMsgNoDB( "searchhelppage" ),
513 wfMsgNoDB( "searchingwikipedia" ) );
514 $msg = str_replace( "$5", $shlink, $msg );
515 $this->mBodytext
= $msg;
520 function readOnlyPage( $source = null, $protected = false )
522 global $wgUser, $wgReadOnlyFile;
524 $this->setRobotpolicy( "noindex,nofollow" );
525 $this->setArticleRelated( false );
528 $this->setPageTitle( wfMsg( "viewsource" ) );
529 $this->addWikiText( wfMsg( "protectedtext" ) );
531 $this->setPageTitle( wfMsg( "readonly" ) );
532 $reason = file_get_contents( $wgReadOnlyFile );
533 $this->addWikiText( wfMsg( "readonlytext", $reason ) );
536 if( is_string( $source ) ) {
537 if( strcmp( $source, "" ) == 0 ) {
538 $source = wfMsg( "noarticletext" );
540 $rows = $wgUser->getOption( "rows" );
541 $cols = $wgUser->getOption( "cols" );
542 $text = "\n<textarea cols='$cols' rows='$rows' readonly='readonly'>" .
543 htmlspecialchars( $source ) . "\n</textarea>";
544 $this->addHTML( $text );
547 $this->returnToMain( false );
550 function fatalError( $message )
552 $this->setPageTitle( wfMsg( "internalerror" ) );
553 $this->setRobotpolicy( "noindex,nofollow" );
554 $this->setArticleRelated( false );
555 $this->enableClientCache( false );
557 $this->mBodytext
= $message;
562 function unexpectedValueError( $name, $val )
564 $this->fatalError( wfMsg( "unexpected", $name, $val ) );
567 function fileCopyError( $old, $new )
569 $this->fatalError( wfMsg( "filecopyerror", $old, $new ) );
572 function fileRenameError( $old, $new )
574 $this->fatalError( wfMsg( "filerenameerror", $old, $new ) );
577 function fileDeleteError( $name )
579 $this->fatalError( wfMsg( "filedeleteerror", $name ) );
582 function fileNotFoundError( $name )
584 $this->fatalError( wfMsg( "filenotfound", $name ) );
587 function returnToMain( $auto = true, $returnto = NULL )
589 global $wgUser, $wgOut, $wgRequest;
591 if ( $returnto == NULL ) {
592 $returnto = $wgRequest->getText( 'returnto' );
595 $sk = $wgUser->getSkin();
596 if ( "" == $returnto ) {
597 $returnto = wfMsg( "mainpage" );
599 $link = $sk->makeKnownLink( $returnto, "" );
601 $r = wfMsg( "returnto", $link );
603 $titleObj = Title
::newFromText( $returnto );
604 $wgOut->addMeta( "http:Refresh", "10;url=" . $titleObj->escapeFullURL() );
606 $wgOut->addHTML( "\n<p>$r</p>\n" );
609 # This function takes the existing and broken links for the page
610 # and uses the first 10 of them for META keywords
611 function addMetaTags ()
613 global $wgLinkCache , $wgOut ;
614 $good = array_keys ( $wgLinkCache->mGoodLinks
) ;
615 $bad = array_keys ( $wgLinkCache->mBadLinks
) ;
616 $a = array_merge ( $good , $bad ) ;
617 $a = array_slice ( $a , 0 , 10 ) ; # 10 keywords max
618 $a = implode ( "," , $a ) ;
623 $a = htmlspecialchars(preg_replace(array_keys($strip), array_values($strip),$a ));
625 $wgOut->addMeta ( "KEYWORDS" , $a ) ;
628 /* private */ function headElement()
630 global $wgDocType, $wgDTD, $wgLanguageCode, $wgOutputEncoding, $wgMimeType;
631 global $wgUser, $wgLang, $wgRequest;
633 $xml = ($wgMimeType == 'text/xml');
635 $ret = "<" . "?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n";
640 $ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\"\n \"$wgDTD\">\n";
642 if ( "" == $this->mHTMLtitle
) {
643 $this->mHTMLtitle
= wfMsg( "pagetitle", $this->mPagetitle
);
646 $xmlbits = "xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\"";
650 $rtl = $wgLang->isRTL() ?
" dir='RTL'" : "";
651 $ret .= "<html $xmlbits lang=\"$wgLanguageCode\" $rtl>\n";
652 $ret .= "<head>\n<title>" . htmlspecialchars( $this->mHTMLtitle
) . "</title>\n";
653 array_push( $this->mMetatags
, array( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ) );
655 $ret .= $this->getHeadLinks();
657 if( $this->isPrintable() ) {
660 $media = "media='print'";
662 $printsheet = htmlspecialchars( "$wgStylePath/wikiprintable.css" );
663 $ret .= "<link rel='stylesheet' type='text/css' $media href='$printsheet' />\n";
665 $sk = $wgUser->getSkin();
666 $ret .= $sk->getHeadScripts();
667 $ret .= $sk->getUserStyles();
673 function getHeadLinks() {
674 global $wgRequest, $wgStylePath;
676 foreach ( $this->mMetatags
as $tag ) {
677 if ( 0 == strcasecmp( "http:", substr( $tag[0], 0, 5 ) ) ) {
679 $tag[0] = substr( $tag[0], 5 );
683 $ret .= "<meta $a=\"{$tag[0]}\" content=\"{$tag[1]}\" />\n";
685 $p = $this->mRobotpolicy
;
686 if ( "" == $p ) { $p = "index,follow"; }
687 $ret .= "<meta name=\"robots\" content=\"$p\" />\n";
689 if ( count( $this->mKeywords
) > 0 ) {
694 $ret .= "<meta name=\"keywords\" content=\"" .
695 htmlspecialchars(preg_replace(array_keys($strip), array_values($strip),implode( ",", $this->mKeywords
))) . "\" />\n";
697 foreach ( $this->mLinktags
as $tag ) {
699 foreach( $tag as $attr => $val ) {
700 $ret .= " $attr=\"" . htmlspecialchars( $val ) . "\"";
704 if( $this->isSyndicated() ) {
705 # FIXME: centralize the mime-type and name information in Feed.php
706 $link = $wgRequest->escapeAppendQuery( "feed=rss" );
707 $ret .= "<link rel='alternate' type='application/rss+xml' title='RSS 2.0' href='$link' />\n";
708 $link = $wgRequest->escapeAppendQuery( "feed=atom" );
709 $ret .= "<link rel='alternate' type='application/rss+atom' title='Atom 0.3' href='$link' />\n";
711 # FIXME: get these working
712 # $fix = htmlspecialchars( $wgStylePath . "/ie-png-fix.js" );
713 # $ret .= "<!--[if gte IE 5.5000]><script type='text/javascript' src='$fix'></script><![endif]-->";