support override of reports
This commit is contained in:
@@ -169,20 +169,21 @@ register 'register_report' => sub {
|
|||||||
return error "bad config to register_report";
|
return error "bad config to register_report";
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $tag (@{setting('_reports_menu')->{ $config->{category} }}) {
|
if (0 == scalar grep {$_ eq $config->{tag}}
|
||||||
if ($tag eq $config->{tag}) {
|
@{setting('_reports_menu')->{ $config->{category} }}) {
|
||||||
setting('_reports')->{$tag} = $config;
|
push @{setting('_reports_menu')->{ $config->{category} }}, $config->{tag};
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
push @{setting('_reports_menu')->{ $config->{category} }}, $config->{tag};
|
foreach my $tag (@{setting('_reports_menu')->{ $config->{category} }}) {
|
||||||
setting('_reports')->{$config->{tag}} = $config;
|
if ($config->{tag} eq $tag) {
|
||||||
|
setting('_reports')->{$tag} = $config;
|
||||||
|
|
||||||
foreach my $rconfig (@{setting('reports')}) {
|
foreach my $rconfig (@{setting('reports')}) {
|
||||||
if ($rconfig->{tag} eq $config->{tag}) {
|
if ($rconfig->{tag} eq $tag) {
|
||||||
setting('_reports')->{$config->{tag}}->{'rconfig'} = $rconfig;
|
setting('_reports')->{$tag}->{'rconfig'} = $rconfig;
|
||||||
last;
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user