Page MenuHomePhabricator

bug_21948.patch

Authored By
bzimport
Nov 21 2014, 10:47 PM
Size
1 KB
Referenced Files
None
Subscribers
None

bug_21948.patch

Index: Timeline.php
===================================================================
--- Timeline.php (revision 60396)
+++ Timeline.php (working copy)
@@ -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 ) {

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5509
Default Alt Text
bug_21948.patch (1 KB)

Event Timeline