7 if ($cgi eq 'edit_log.cgi') {
8 # Link to first log that can be edited
9 my @logs = grep { &can_edit_log($_->{'file'}) } &get_all_logs();
11 return $access{'add'} ? 'new=1' : 'none';
13 elsif (!$access{'view'}) {
14 return 'file='.&urlize($logs[0]->{'file'}).
15 '&type='.&urlize($logs[0]->{'type'}).
16 '&custom='.&urlize($logs[0]->{'custom'});
22 elsif ($cgi eq 'view_log.cgi') {
24 my @logs = grep { my $lconf = &get_log_config($_->{'file'});
25 &can_edit_log($_->{'file'}) &&
26 $lconf->{'dir'} } &get_all_logs();
27 return @logs ? &urlize($logs[0]->{'file'}).'/index.html' : 'none';