]> sipb.mit.edu Git - ikiwiki.git/commitdiff
graphviz: Fix display of preexisting images in preview mode.
authorJoey Hess <joey@kitenet.net>
Tue, 4 May 2010 20:54:58 +0000 (16:54 -0400)
committerJoey Hess <joey@kitenet.net>
Tue, 4 May 2010 20:54:58 +0000 (16:54 -0400)
IkiWiki/Plugin/graphviz.pm
debian/changelog
doc/bugs/Problems_with_graphviz.pm_plug-in_previews.mdwn

index bec12207696ed5639b71dfd773bf261b8b1658b7..c91c92fec72af9bbe4d4cf1c8a0f07f01e6933ec 100644 (file)
@@ -79,12 +79,7 @@ sub render_graph (\%) {
                }
        }
 
-       if ($params{preview}) {
-               return "<img src=\"".urlto($dest, "")."\" />\n";
-       }
-       else {
-               return "<img src=\"".urlto($dest, $params{destpage})."\" />\n";
-       }
+       return "<img src=\"".urlto($dest, $params{destpage})."\" />\n";
 }
 
 sub graph (@) {
index 9fb9607a34d3640a2e6c9035cffb544d9c972f4d..31deaf9aaac1d2fab989cce560667368e0dc600e 100644 (file)
@@ -11,6 +11,7 @@ ikiwiki (3.20100502) UNRELEASED; urgency=low
     (COMMENTSLINK and DISCUSSIONLINK could be folded into this, but
     are kept separate for now to avoid breaking modified templates.)
   * websetup: Only display Setup button on admins' preferences page. 
+  * graphviz: Fix display of preexisting images in preview mode.
 
  -- Joey Hess <joeyh@debian.org>  Sun, 02 May 2010 13:22:50 -0400
 
index 283a6ef0876d158dba4b6da737100c66ef22ef88..c77bbeeaf8b7c2c7b8ecdaf5cc74ab8b52e93e85 100644 (file)
 >>> case from the root of the site). The browsers appear to be trying to fetch
 >>> `/demo/diagrams/demo/diagrams/graph-c9fd2a197322feb417bdedbca5e99f5aa65b3f06.png`
 >>> (i.e., prepending the required relpath twice). -- [[Jon]]
+
+>>>> Yeah, that patch may have been right once, but it's wrong now;
+>>>> preview mode uses `<base>` to make urls work the same as they would
+>>>> when viewing the html page. 
+>>>>
+>>>> Perhaps this was not noticed for a while while because it only
+>>>> shows up if previewing an *unchanged* graph on a page that has already
+>>>> been built before. Fixed now. [[done]] --[[Joey]]