Index: trunk/extensions/timeline/Timeline.php |
— | — | @@ -44,8 +44,10 @@ |
45 | 45 | } |
46 | 46 | |
47 | 47 | function renderTimeline( $timelinesrc ){ |
48 | | - global $wgUploadDirectory, $wgUploadPath, $IP, $wgTimelineSettings, $wgArticlePath, $wgTmpDirectory; |
| 48 | + global $wgUploadDirectory, $wgUploadPath, $IP, $wgTimelineSettings, $wgArticlePath, $wgTmpDirectory, $wgRenderHashAppend; |
49 | 49 | $hash = md5( $timelinesrc ); |
| 50 | + if ($wgRenderHashAppend != "") |
| 51 | + $hash = md5( $hash . $wgRenderHashAppend ); |
50 | 52 | $dest = $wgUploadDirectory."/timeline/"; |
51 | 53 | if ( ! is_dir( $dest ) ) { mkdir( $dest, 0777 ); } |
52 | 54 | if ( ! is_dir( $wgTmpDirectory ) ) { mkdir( $wgTmpDirectory, 0777 ); } |
— | — | @@ -102,7 +104,7 @@ |
103 | 105 | $map = "<map name=\"" . htmlspecialchars( $hash ) . "\">{$map}</map>"; |
104 | 106 | $map = easyTimelineFixMap( $map ); |
105 | 107 | |
106 | | - if( substr( php_uname(), 0, 7 ) == "Windows" ) { |
| 108 | + if (wfIsWindows()) { |
107 | 109 | $ext = "gif"; |
108 | 110 | } else { |
109 | 111 | $ext = "png"; |
— | — | @@ -110,7 +112,7 @@ |
111 | 113 | |
112 | 114 | $url = "{$wgUploadPath}/timeline/{$hash}.{$ext}"; |
113 | 115 | $txt = $map . |
114 | | - "<img usemap=\"#" . htmlspecialchars( $hash ) . "\" " . |
| 116 | + "<img usemap=\"#timeline_" . htmlspecialchars( $hash ) . "\" " . |
115 | 117 | "src=\"" . htmlspecialchars( $url ) . "\">"; |
116 | 118 | |
117 | 119 | if( $expired ) { |