http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60863

Revision: 60863
Author:   siebrand
Date:     2010-01-09 18:02:57 +0000 (Sat, 09 Jan 2010)

Log Message:
-----------
(bug 21948) Cached timelines have the wrong links between secure server and 
normal. Patch by Platonides.

Modified Paths:
--------------
    trunk/extensions/timeline/Timeline.php

Modified: trunk/extensions/timeline/Timeline.php
===================================================================
--- trunk/extensions/timeline/Timeline.php      2010-01-09 15:23:27 UTC (rev 
60862)
+++ trunk/extensions/timeline/Timeline.php      2010-01-09 18:02:57 UTC (rev 
60863)
@@ -44,8 +44,10 @@
 }
 
 function renderTimeline( $timelinesrc ){
-       global $wgUploadDirectory, $wgUploadPath, $IP, $wgTimelineSettings, 
$wgArticlePath, $wgTmpDirectory;
+       global $wgUploadDirectory, $wgUploadPath, $IP, $wgTimelineSettings, 
$wgArticlePath, $wgTmpDirectory, $wgRenderHashAppend;
        $hash = md5( $timelinesrc );
+       if ($wgRenderHashAppend != "")
+               $hash = md5( $hash . $wgRenderHashAppend );
        $dest = $wgUploadDirectory."/timeline/";
        if ( ! is_dir( $dest ) ) { mkdir( $dest, 0777 ); }
        if ( ! is_dir( $wgTmpDirectory ) ) { mkdir( $wgTmpDirectory, 0777 ); }
@@ -102,7 +104,7 @@
                $map = "<map name=\"" . htmlspecialchars( $hash ) . 
"\">{$map}</map>";
                $map = easyTimelineFixMap( $map );
 
-               if( substr( php_uname(), 0, 7 ) == "Windows" ) {
+               if (wfIsWindows()) {
                        $ext = "gif";
                } else {
                        $ext = "png";
@@ -110,7 +112,7 @@
 
                $url = "{$wgUploadPath}/timeline/{$hash}.{$ext}";
                $txt = $map .
-                       "<img usemap=\"#" . htmlspecialchars( $hash ) . "\" " . 
+                       "<img usemap=\"#timeline_" . htmlspecialchars( $hash ) 
. "\" " . 
                        "src=\"" . htmlspecialchars( $url ) . "\">";
 
                if( $expired ) {



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to