]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/teximg.pm
web commit by http://edward.myopenid.com/: spelling fix and link [[hyperestraier]]
[git.ikiwiki.info.git] / IkiWiki / Plugin / teximg.pm
index 2eb13c86c3c3c024fc1f4903043e708d76d49a15..5dff5feef30913bd598da7e02ab7b2f42b5cfa2b 100644 (file)
@@ -70,9 +70,8 @@ sub create ($$$) { #{{{
 
        my $digest = md5_hex($code, $height);
 
 
        my $digest = md5_hex($code, $height);
 
-       my $teximgdir = "/teximag";
-       my $imglink = "$teximgdir/$digest.png";
-       my $imglog = "$teximgdir/$digest.log";
+       my $imglink= $params->{page} . "/$digest.png";
+       my $imglog =  $params->{page} .  "/$digest.log";
        will_render($params->{destpage}, $imglink);
        will_render($params->{destpage}, $imglog);
 
        will_render($params->{destpage}, $imglink);
        will_render($params->{destpage}, $imglog);
 
@@ -83,14 +82,14 @@ sub create ($$$) { #{{{
                $logurl = urlto($imglog, $params->{destpage});
        }
        else {
                $logurl = urlto($imglog, $params->{destpage});
        }
        else {
-               $imgurl="$config{url}/$teximgdir/$digest.png";
-               $logurl="$config{url}/$teximgdir/$digest.log";
+               $imgurl=$params->{page}."/$digest.png";
+               $logurl=$params->{page}."/$digest.log";
        }
        
        if (-e "$config{destdir}/$imglink" ||
        }
        
        if (-e "$config{destdir}/$imglink" ||
-           gen_image($code, $height, $digest, $teximgdir)) {
+           gen_image($code, $height, $digest, $params->{page})) {
                return qq{<img src="$imgurl" alt="}
                return qq{<img src="$imgurl" alt="}
-                       .(exists $params{alt} ? $params{alt} : encode_entities($code))
+                       .(exists $params->{alt} ? $params->{alt} : encode_entities($code))
                        .qq{" class="teximg" />};
        }
        else {
                        .qq{" class="teximg" />};
        }
        else {