Bug 22893: Do not crash if contributors.yaml does not exist
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
b90bbc1259
commit
d4b503aa14
2 changed files with 15 additions and 6 deletions
5
about.pl
5
about.pl
|
@ -531,7 +531,10 @@ if ( defined C4::Context->config('docdir') ) {
|
|||
}
|
||||
|
||||
## Contributors
|
||||
my $contributors = LoadFile("$docdir"."/contributors.yaml");
|
||||
my $contributors =
|
||||
-e "$docdir" . "/contributors.yaml"
|
||||
? LoadFile( "$docdir" . "/contributors.yaml" )
|
||||
: {};
|
||||
my @people = map {
|
||||
{
|
||||
name => $_,
|
||||
|
|
|
@ -469,11 +469,17 @@
|
|||
</ul>
|
||||
|
||||
<h2>Koha development team</h2>
|
||||
<ul class="columns-4">
|
||||
[% FOREACH contributor IN contributors %]
|
||||
<li>[% INCLUDE person p=contributor %][% INCLUDE contributions p=contributor %]</li>
|
||||
[% END %]
|
||||
</ul>
|
||||
[% IF contributors.size %]
|
||||
<ul class="columns-4">
|
||||
[% FOREACH contributor IN contributors %]
|
||||
<li>[% INCLUDE person p=contributor %][% INCLUDE contributions p=contributor %]</li>
|
||||
[% END %]
|
||||
</ul>
|
||||
[% ELSE %]
|
||||
<div class="dialog alert">
|
||||
Could not read the contributors.yaml file. Please make sure <docdir> is correctly defined in koha-conf.xml.
|
||||
</div>
|
||||
[% END %]
|
||||
<hr>
|
||||
|
||||
<h2>Contributing companies and institutions</h2>
|
||||
|
|
Loading…
Reference in a new issue