]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
not working for me
[ikiwiki.git] / IkiWiki.pm
index c14124f79f221fdd638d6f781b205e87bd6193a0..3f8a4bca334debb8a5728b25b258dac50c112f89 100644 (file)
@@ -545,10 +545,11 @@ sub beautify_urlpath ($) { #{{{
        return $url;
 } #}}}
 
-sub urlto ($$) { #{{{
+sub urlto ($$;$) { #{{{
        my $to=shift;
        my $from=shift;
-
+       my $absolute=shift;
+       
        if (! length $to) {
                return beautify_urlpath(baseurl($from)."index.$config{htmlext}");
        }
@@ -557,6 +558,10 @@ sub urlto ($$) { #{{{
                $to=htmlpage($to);
        }
 
+       if ($absolute) {
+               return $config{url}.beautify_urlpath("/".$to);
+       }
+
        my $link = abs2rel($to, dirname(htmlpage($from)));
 
        return beautify_urlpath($link);
@@ -759,13 +764,10 @@ sub preprocess ($$$;$$) { #{{{
                        if ($preprocessing{$page}++ > 3) {
                                # Avoid loops of preprocessed pages preprocessing
                                # other pages that preprocess them, etc.
-                               #translators: The first parameter is a
-                               #translators: preprocessor directive name,
-                               #translators: the second a page name, the
-                               #translators: third a number.
-                               return "[[".sprintf(gettext("%s preprocessing loop detected on %s at depth %i"),
-                                       $command, $page, $preprocessing{$page}).
-                               "]]";
+                               return "[[!$command <span class=\"error\">".
+                                       sprintf(gettext("preprocessing loop detected on %s at depth %i"),
+                                               $page, $preprocessing{$page}).
+                                       "</span>]]";
                        }
                        my $ret;
                        if (! $scan) {