$log_open=1;
}
eval {
- # keep a copy to avoid editing the original config repeatedly
- my $wikiname = $config{wikiname};
- utf8::encode($wikiname);
- my $message = join(" ", @_);
+ my $message = "[$config{wikiname}] ".join(" ", @_);
utf8::encode($message);
- Sys::Syslog::syslog($type, "[$wikiname] %s", $message);
+ Sys::Syslog::syslog($type, "%s", $message);
};
if ($@) {
print STDERR "failed to syslog: $@" unless $log_failed;
if ($@) {
my $error=$@;
chomp $error;
+ eval q{use HTML::Entities};
+ $error = encode_entities($error);
$ret="[[!$command <span class=\"error\">".
gettext("Error").": $error"."</span>]]";
}
$file=possibly_foolish_untaint($file);
if (! defined $file || ! length $file ||
file_pruned($file)) {
- error(gettext("bad file name %s"), $file);
+ error(sprintf(gettext("bad file name %s"), $file));
}
my $type=pagetype($file);