View | Details | Raw Unified | Return to bug 21502
Collapse All | Expand All

(-)a/about.pl (+24 lines)
Lines 32-37 use XML::Simple; Link Here
32
use Config;
32
use Config;
33
use Search::Elasticsearch;
33
use Search::Elasticsearch;
34
use Try::Tiny;
34
use Try::Tiny;
35
use YAML;
35
36
36
use C4::Output;
37
use C4::Output;
37
use C4::Auth;
38
use C4::Auth;
Lines 385-390 if ( C4::Context->preference('WebBasedSelfCheck') Link Here
385
    );
386
    );
386
}
387
}
387
388
389
# Test YAML system preferences
390
# FIXME: This is list of current YAML formatted prefs, should by type of preference
391
my @yaml_prefs = (
392
    "UpdateNotForLoanStatusOnCheckin",
393
    "OpacHiddenItems",
394
    "BibtexExportAdditionalFields",
395
    "RisExportAdditionalFields",
396
    "UpdateItemWhenLostFromHoldList",
397
    "MarcFieldsToOrder",
398
    "MarcItemFieldsToOrder"
399
);
400
my @bad_yaml_prefs;
401
foreach my $syspref (@yaml_prefs) {
402
    my $yaml = C4::Context->preference( $syspref );
403
    if ( $yaml ) {
404
        eval { YAML::Load( "$yaml\n\n" ); };
405
        if ($@) {
406
            push @bad_yaml_prefs, $syspref;
407
        }
408
    }
409
}
410
$template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs;
411
388
{
412
{
389
    my $dbh       = C4::Context->dbh;
413
    my $dbh       = C4::Context->dbh;
390
    my $patrons = $dbh->selectall_arrayref(
414
    my $patrons = $dbh->selectall_arrayref(
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt (-3 / +8 lines)
Lines 183-189 Link Here
183
        </div>
183
        </div>
184
184
185
        <div id="sysinfo">
185
        <div id="sysinfo">
186
    [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps %]
186
    [% 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 %]
187
        [% IF (warnIsRootUser) %]
187
        [% IF (warnIsRootUser) %]
188
            <h2>Warning regarding current user</h2>
188
            <h2>Warning regarding current user</h2>
189
            <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>
189
            <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>
Lines 228-234 Link Here
228
            <br/>
228
            <br/>
229
        [% END %]
229
        [% END %]
230
230
231
        [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps %]
231
        [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs %]
232
            <h2>Warnings regarding the system configuration</h2>
232
            <h2>Warnings regarding the system configuration</h2>
233
            <table>
233
            <table>
234
                <caption>Preferences and parameters</caption>
234
                <caption>Preferences and parameters</caption>
Lines 305-310 Link Here
305
                    System preference 'RESTOAuth2ClientCredentials' is set, but the required Net::OAuth2::AuthorizationServer dependency is missing. The feature is disabled.
305
                    System preference 'RESTOAuth2ClientCredentials' is set, but the required Net::OAuth2::AuthorizationServer dependency is missing. The feature is disabled.
306
                    </td></tr>
306
                    </td></tr>
307
                [% END %]
307
                [% END %]
308
                [% IF bad_yaml_prefs %]
309
                    <tr><th scope="row"><b>Warning</b> </th><td>
310
                    Some YAML formatted system preferences have bad format: [% bad_yaml_prefs.join(', ') | html %]
311
                    </td></tr>
312
                [% END %]
308
            </table>
313
            </table>
309
        [% END %]
314
        [% END %]
310
315
Lines 376-381 Link Here
376
            [% END %]
381
            [% END %]
377
            </table>
382
            </table>
378
        [% END %]
383
        [% END %]
384
379
    [% ELSE %]
385
    [% ELSE %]
380
        <p>No warnings.</p>
386
        <p>No warnings.</p>
381
    [% END %]
387
    [% END %]
382
- 

Return to bug 21502