diff options
author | Eric Wong <e@80x24.org> | 2014-04-10 00:33:54 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-04-10 00:33:54 +0000 |
commit | 1534bd3ac9848fc69b473dedc069ae2a95347e1e (patch) | |
tree | d0b29fb3fd54958f6e3e176d651ca1ba625df51c /public-inbox-cgi | |
parent | 44af7563687c794dba2006a774ec525208488755 (diff) | |
download | public-inbox-1534bd3ac9848fc69b473dedc069ae2a95347e1e.tar.gz |
Remove the specified /all.html while we're at it, we only have /all.atom.xml because it's convenient for feed readers.
Diffstat (limited to 'public-inbox-cgi')
-rwxr-xr-x | public-inbox-cgi | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/public-inbox-cgi b/public-inbox-cgi index 4e727da8..912bb191 100755 --- a/public-inbox-cgi +++ b/public-inbox-cgi @@ -56,9 +56,7 @@ sub main { if ($path_info eq "/") { r404(); } elsif ($path_info =~ m!$LISTNAME_RE/?\z!o) { - invalid_list(\%ctx, $1) || get_list_log(\%ctx, $cgi); - } elsif ($path_info =~ m!$LISTNAME_RE/all\z!o) { - invalid_list(\%ctx, $1) || get_list_all(\%ctx, $cgi); + invalid_list(\%ctx, $1) || get_index(\%ctx, $cgi, 1); } elsif ($path_info =~ m!$LISTNAME_RE/index\.atom\.xml\z!o) { invalid_list(\%ctx, $1) || get_atom(\%ctx, $cgi, 1); } elsif ($path_info =~ m!$LISTNAME_RE/all\.atom\.xml\z!o) { @@ -114,3 +112,17 @@ sub get_atom { }) ]; } + +sub get_index { + my ($ctx, $cgi, $top) = @_; + require PublicInbox::Feed; + [ '200 OK', { 'Content-Type' => 'text/html' }, + PublicInbox::Feed->generate_html_index({ + git_dir => $ctx->{git_dir}, + listname => $ctx->{listname}, + pi_config => $pi_config, + cgi => $cgi, + top => $top, + }) + ]; +} |