]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/autoindex.pm
Merge branch 'master' into debian-jessie-backports
[git.ikiwiki.info.git] / IkiWiki / Plugin / autoindex.pm
index dede9eb05cf3fafc9e4cc8e4d9ad013a088417a5..c443f01d241d056ca1939fdd5cbe948b2dfc2e58 100644 (file)
@@ -33,9 +33,6 @@ sub checkconfig () {
        if (! defined $config{autoindex_commit}) {
                $config{autoindex_commit} = 1;
        }
        if (! defined $config{autoindex_commit}) {
                $config{autoindex_commit} = 1;
        }
-       if (! $config{autoindex_commit}) {
-               $config{only_committed_changes}=0;
-       }
 }
 
 sub genindex ($) {
 }
 
 sub genindex ($) {
@@ -49,6 +46,7 @@ sub genindex ($) {
 
                        my $dir = $config{srcdir};
                        if (! $config{autoindex_commit}) {
 
                        my $dir = $config{srcdir};
                        if (! $config{autoindex_commit}) {
+                               no warnings 'once';
                                $dir = $IkiWiki::Plugin::transient::transientdir;
                        }
 
                                $dir = $IkiWiki::Plugin::transient::transientdir;
                        }
 
@@ -74,7 +72,6 @@ sub refresh () {
 
        my (%pages, %dirs);
        foreach my $dir ($config{srcdir}, @{$config{underlaydirs}}, $config{underlaydir}) {
 
        my (%pages, %dirs);
        foreach my $dir ($config{srcdir}, @{$config{underlaydirs}}, $config{underlaydir}) {
-               next if $dir eq $IkiWiki::Plugin::transient::transientdir;
                chdir($dir) || next;
 
                find({
                chdir($dir) || next;
 
                find({
@@ -84,6 +81,7 @@ sub refresh () {
                                $file=~s/^\.\/?//;
                                return unless length $file;
                                if (IkiWiki::file_pruned($file)) {
                                $file=~s/^\.\/?//;
                                return unless length $file;
                                if (IkiWiki::file_pruned($file)) {
+                                       no warnings 'once';
                                        $File::Find::prune=1;
                                }
                                elsif (! -l $_) {
                                        $File::Find::prune=1;
                                }
                                elsif (! -l $_) {
@@ -93,7 +91,7 @@ sub refresh () {
                                        if (! -d _) {
                                                $pages{pagename($f)}=1;
                                        }
                                        if (! -d _) {
                                                $pages{pagename($f)}=1;
                                        }
-                                       elsif ($dir eq $config{srcdir}) {
+                                       elsif ($dir eq $config{srcdir} || ! $config{autoindex_commit}) {
                                                $dirs{$f}=1;
                                        }
                                }
                                                $dirs{$f}=1;
                                        }
                                }