]> sipb.mit.edu Git - ikiwiki.git/commitdiff
attachment: Use relative paths when inserting links.
authorJoey Hess <joey@kodama.kitenet.net>
Fri, 25 Jul 2008 23:22:29 +0000 (19:22 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Fri, 25 Jul 2008 23:22:29 +0000 (19:22 -0400)
IkiWiki/Plugin/attachment.pm
debian/changelog

index 9dbc66020a1455421bae70bf71f4127e3223797e..720078be15cfcd51399f375815b4d22e1a2e8d7b 100644 (file)
@@ -193,8 +193,10 @@ sub formbuilder (@) { #{{{
                IkiWiki::saveindex();
        }
        elsif ($form->submitted eq "Insert Links") {
+               my $page=quotemeta($q->param("page"));
                my $add="";
                foreach my $f ($q->param("attachment_select")) {
+                       $f=~s/^$page\///;
                        $add.="[[$f]]\n";
                }
                $form->field(name => 'editcontent',
index 7df5881746966464d46b6672339c68f939509932..348d30997ef2843307211669d4ed18989021e888 100644 (file)
@@ -28,6 +28,7 @@ ikiwiki (2.55) UNRELEASED; urgency=low
   * monotone: Add support for rename, delete, and also diff. (William Uther)
   * toggle: Fix incompatability between javascript and webkit.
   * bzr: Add support for rename and delete. (Jelmer Vernooij)
+  * attachment: Use relative paths when inserting links.
 
  -- Joey Hess <joeyh@debian.org>  Mon, 21 Jul 2008 11:35:46 -0400