Bugzilla – Attachment 89761 Details for
Bug 22893
contributors.yaml not correctly copied
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22893: Do not crash if contributors.yaml does not exist
Bug-22893-Do-not-crash-if-contributorsyaml-does-no.patch (text/plain), 2.16 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-05-14 15:04:28 UTC
(
hide
)
Description:
Bug 22893: Do not crash if contributors.yaml does not exist
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-05-14 15:04:28 UTC
Size:
2.16 KB
patch
obsolete
>From 27ece8a947758240908bac5d3ee2ff1661e08653 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sun, 12 May 2019 19:22:54 -0500 >Subject: [PATCH] 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> >--- > about.pl | 5 ++++- > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 16 +++++++++++----- > 2 files changed, 15 insertions(+), 6 deletions(-) > >diff --git a/about.pl b/about.pl >index 62d15edf16..0a7300ce4d 100755 >--- a/about.pl >+++ b/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 => $_, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index b908428e7b..39216984bc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -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> >-- >2.21.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22893
:
89644
|
89645
|
89746
|
89747
| 89761 |
89762