Bugzilla – Attachment 89617 Details for
Bug 22508
Add the ability to prefill 856$u with the direct URL of the file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22508: Add warnings to about page
Bug-22508-Add-warnings-to-about-page.patch (text/plain), 5.84 KB, created by
Jonathan Druart
on 2019-05-11 17:17:51 UTC
(
hide
)
Description:
Bug 22508: Add warnings to about page
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-05-11 17:17:51 UTC
Size:
5.84 KB
patch
obsolete
>From 2a61634cffde242d97591dd211f31e2b9195e26d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 4 Apr 2019 14:11:51 -0300 >Subject: [PATCH] Bug 22508: Add warnings to about page > >--- > about.pl | 24 ++++++++++++++++++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 26 ++++++++++++++++++++++-- > 2 files changed, 48 insertions(+), 2 deletions(-) > >diff --git a/about.pl b/about.pl >index 62d15edf16..609e5b0562 100755 >--- a/about.pl >+++ b/about.pl >@@ -293,6 +293,30 @@ if ( C4::Context->preference('ILLModule') ) { > $template->param( warnILLConfiguration => $warnILLConfiguration ); > } > >+my $upload_public_path = C4::Context->config('upload_public_path'); >+my $upload_public_url = C4::Context->config('upload_public_url'); >+if ( $upload_public_path or $upload_public_url ) { >+ my $warnUploadPublic; >+ >+ if ( $upload_public_path and not $upload_public_url ) { >+ $warnUploadPublic = 1; >+ $template->param(upload_public_url_not_defined => 1); >+ }elsif( not $upload_public_path and $upload_public_url ) { >+ $warnUploadPublic = 1; >+ $template->param(upload_public_path_not_defined => 1); >+ } >+ if ( ! -d $upload_public_path ) { >+ $warnUploadPublic = 1; >+ $template->param(upload_public_path_not_created => 1); >+ } >+ elsif( ! -w $upload_public_path ) { >+ $warnUploadPublic = 1; >+ $template->param(upload_public_path_not_writable => 1); >+ } >+ >+ $template->param(warnUploadPublic => $warnUploadPublic); >+} >+ > if ( C4::Context->preference('SearchEngine') eq 'Elasticsearch' ) { > # Check ES configuration health and runtime status > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index b908428e7b..77f24278fb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -183,7 +183,7 @@ > </div> > > <div id="sysinfo"> >- [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs %] >+ [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnUploadPublic %] > [% IF (warnIsRootUser) %] > <h2>Warning regarding current user</h2> > <p>You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.</p> >@@ -228,7 +228,7 @@ > <br/> > [% END %] > >- [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs %] >+ [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnUploadPublic %] > <h2>Warnings regarding the system configuration</h2> > <table> > <caption>Preferences and parameters</caption> >@@ -310,6 +310,28 @@ > Some system preferences have badly formatted YAML content: [% bad_yaml_prefs.join(', ') | html %] > </td></tr> > [% END %] >+ [% IF warnUploadPublic %] >+ [% IF upload_public_url_not_defined %] >+ <tr><th scope="row"><b>Warning</b> </th><td> >+ The configuration entry 'upload_public_url' is not defined in koha-conf.xml but 'upload_public_path' is. The feature is disabled. >+ </td></tr> >+ [% END %] >+ [% IF upload_public_path_not_defined %] >+ <tr><th scope="row"><b>Warning</b> </th><td> >+ The configuration entry 'upload_public_path' is not defined in koha-conf.xml but 'upload_public_url' is. The feature is disabled. >+ </td></tr> >+ [% END %] >+ [% IF upload_public_path_not_created %] >+ <tr><th scope="row"><b>Warning</b> </th><td> >+ The configuration entry 'upload_public_path' is defined but the value does not point to an existing local directory. >+ </td></tr> >+ [% END %] >+ [% IF upload_public_path_not_writable %] >+ <tr><th scope="row"><b>Warning</b> </th><td> >+ The configuration entry 'upload_public_path' is defined but the value does not point to a writable local directory. >+ </td></tr> >+ [% END %] >+ [% END %] > </table> > [% END %] > >-- >2.11.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 22508
:
86583
|
86584
|
86585
|
87272
|
87273
|
87274
|
87430
|
87431
|
87432
|
89540
|
89541
|
89542
|
89543
|
89544
|
89545
| 89617