r60863 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60862‎ | r60863 | r60864 >
Date:18:02, 9 January 2010
Author:siebrand
Status:ok
Tags:
Comment:
(bug 21948) Cached timelines have the wrong links between secure server and normal. Patch by Platonides.
Modified paths:
  • /trunk/extensions/timeline/Timeline.php (modified) (history)

Diff [purge]

Index: trunk/extensions/timeline/Timeline.php
@@ -44,8 +44,10 @@
4545 }
4646
4747 function renderTimeline( $timelinesrc ){
48 - global $wgUploadDirectory, $wgUploadPath, $IP, $wgTimelineSettings, $wgArticlePath, $wgTmpDirectory;
 48+ global $wgUploadDirectory, $wgUploadPath, $IP, $wgTimelineSettings, $wgArticlePath, $wgTmpDirectory, $wgRenderHashAppend;
4949 $hash = md5( $timelinesrc );
 50+ if ($wgRenderHashAppend != "")
 51+ $hash = md5( $hash . $wgRenderHashAppend );
5052 $dest = $wgUploadDirectory."/timeline/";
5153 if ( ! is_dir( $dest ) ) { mkdir( $dest, 0777 ); }
5254 if ( ! is_dir( $wgTmpDirectory ) ) { mkdir( $wgTmpDirectory, 0777 ); }
@@ -102,7 +104,7 @@
103105 $map = "<map name=\"" . htmlspecialchars( $hash ) . "\">{$map}</map>";
104106 $map = easyTimelineFixMap( $map );
105107
106 - if( substr( php_uname(), 0, 7 ) == "Windows" ) {
 108+ if (wfIsWindows()) {
107109 $ext = "gif";
108110 } else {
109111 $ext = "png";
@@ -110,7 +112,7 @@
111113
112114 $url = "{$wgUploadPath}/timeline/{$hash}.{$ext}";
113115 $txt = $map .
114 - "<img usemap=\"#" . htmlspecialchars( $hash ) . "\" " .
 116+ "<img usemap=\"#timeline_" . htmlspecialchars( $hash ) . "\" " .
115117 "src=\"" . htmlspecialchars( $url ) . "\">";
116118
117119 if( $expired ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r62017follow-up r60863 - fix issue with name attribute on <map> not matching usemap...bawolff06:54, 5 February 2010

Status & tagging log