summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-04 16:54:58 -0400
committerJoey Hess <joey@kitenet.net>2010-05-04 16:54:58 -0400
commitab575a4b6985d38969069757bb374aa8f1013019 (patch)
tree7e4bfd663468d31324e3e3249046f4f4bfa83bf2
parentddd7a766e27128f971fceba900d73982c686afbd (diff)
graphviz: Fix display of preexisting images in preview mode.
-rw-r--r--IkiWiki/Plugin/graphviz.pm7
-rw-r--r--debian/changelog1
-rw-r--r--doc/bugs/Problems_with_graphviz.pm_plug-in_previews.mdwn8
3 files changed, 10 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/graphviz.pm b/IkiWiki/Plugin/graphviz.pm
index bec122076..c91c92fec 100644
--- a/IkiWiki/Plugin/graphviz.pm
+++ b/IkiWiki/Plugin/graphviz.pm
@@ -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 (@) {
diff --git a/debian/changelog b/debian/changelog
index 9fb9607a3..31deaf9aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/doc/bugs/Problems_with_graphviz.pm_plug-in_previews.mdwn b/doc/bugs/Problems_with_graphviz.pm_plug-in_previews.mdwn
index 283a6ef08..c77bbeeaf 100644
--- a/doc/bugs/Problems_with_graphviz.pm_plug-in_previews.mdwn
+++ b/doc/bugs/Problems_with_graphviz.pm_plug-in_previews.mdwn
@@ -44,3 +44,11 @@
>>> 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]]