prevent help index linking to nonexistant docs
This commit is contained in:
parent
db6ea6d793
commit
3ed5a864c5
2 changed files with 6 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
7.4.6
|
7.4.6
|
||||||
|
- Prevent Help index from trying to link to non-existant documentation
|
||||||
- fix: can't see the send private message link
|
- fix: can't see the send private message link
|
||||||
|
|
||||||
|
|
||||||
7.4.5
|
7.4.5
|
||||||
- fix: Apostrophy incorrectly escaped as double quote in some places
|
- fix: Apostrophy incorrectly escaped as double quote in some places
|
||||||
- Remove Help TOC links
|
- Remove Help TOC links
|
||||||
|
|
|
||||||
|
|
@ -389,21 +389,20 @@ sub www_viewHelpIndex {
|
||||||
return $session->privilege->insufficient() unless canView($session);
|
return $session->privilege->insufficient() unless canView($session);
|
||||||
my $i18n = WebGUI::International->new($session);
|
my $i18n = WebGUI::International->new($session);
|
||||||
my @helpIndex;
|
my @helpIndex;
|
||||||
my $i;
|
|
||||||
my @files = _getHelpFilesList($session,);
|
my @files = _getHelpFilesList($session,);
|
||||||
foreach my $fileSet (@files) {
|
foreach my $fileSet (@files) {
|
||||||
my $namespace = $fileSet->[1];
|
my $namespace = $fileSet->[1];
|
||||||
my $help = _load($session,$namespace);
|
my $help = _load($session,$namespace);
|
||||||
foreach my $key (keys %{$help}) {
|
foreach my $key (keys %{$help}) {
|
||||||
next if $help->{$key}{private};
|
next if $help->{$key}{private};
|
||||||
push @helpIndex, [$namespace, $key,
|
my $title = $i18n->get($help->{$key}{title},$namespace);
|
||||||
$i18n->get($help->{$key}{title},$namespace)];
|
next unless $title;
|
||||||
$i++;
|
push @helpIndex, [$namespace, $key, $title];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
my $output = '<table width="100%" class="content"><tr><td valign="top">';
|
my $output = '<table width="100%" class="content"><tr><td valign="top">';
|
||||||
my $halfway = round($i/2);
|
my $halfway = round(@helpIndex / 2);
|
||||||
$i = 0;
|
my $i = 0;
|
||||||
@helpIndex = sort { $a->[2] cmp $b->[2] } @helpIndex;
|
@helpIndex = sort { $a->[2] cmp $b->[2] } @helpIndex;
|
||||||
foreach my $helpEntry (@helpIndex) {
|
foreach my $helpEntry (@helpIndex) {
|
||||||
my ($namespace, $id, $title) = @{ $helpEntry };
|
my ($namespace, $id, $title) = @{ $helpEntry };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue