]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
web commit by https://camrdale.myopenid.com/: Added DebTorrent to the projects list...
[ikiwiki.git] / IkiWiki.pm
index b70f511757dc2f88fc6b62260004bdea60f9555b..a89d9c2529190b3c94c265e1f740f0412545db50 100644 (file)
@@ -166,7 +166,7 @@ sub loadplugin ($) { #{{{
 
        return if grep { $_ eq $plugin} @{$config{disable_plugins}};
 
-       foreach my $dir (possibly_foolish_untaint($config{libdir}),
+       foreach my $dir (defined $config{libdir} ? possibly_foolish_untaint($config{libdir}) : undef,
                         "$installdir/lib/ikiwiki") {
                if (defined $dir && -x "$dir/plugins/$plugin") {
                        require IkiWiki::Plugin::external;
@@ -1017,7 +1017,9 @@ sub file_pruned ($$) { #{{{
 
 sub gettext { #{{{
        # Only use gettext in the rare cases it's needed.
-       if (exists $ENV{LANG} || exists $ENV{LC_ALL} || exists $ENV{LC_MESSAGES}) {
+       if ((exists $ENV{LANG} && length $ENV{LANG}) ||
+           (exists $ENV{LC_ALL} && length $ENV{LC_ALL}) ||
+           (exists $ENV{LC_MESSAGES} && length $ENV{LC_MESSAGES})) {
                if (! $gettext_obj) {
                        $gettext_obj=eval q{
                                use Locale::gettext q{textdomain};