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 378-383 if ( C4::Context->preference('WebBasedSelfCheck') Link Here
378
    );
379
    );
379
}
380
}
380
381
382
# Test YAML system preferences
383
# FIXME: This is list of current YAML formatted prefs, should by type of preference
384
my @yaml_prefs = (
385
    "UpdateNotForLoanStatusOnCheckin",
386
    "OpacHiddenItems",
387
    "BibtexExportAdditionalFields",
388
    "RisExportAdditionalFields",
389
    "UpdateItemWhenLostFromHoldList",
390
    "MarcFieldsToOrder",
391
    "MarcItemFieldsToOrder"
392
);
393
my @bad_yaml_prefs;
394
foreach my $syspref (@yaml_prefs) {
395
    my $yaml = C4::Context->preference( $syspref );
396
    if ( $yaml ) {
397
        eval { YAML::Load( "$yaml\n\n" ); };
398
        if ($@) {
399
            push @bad_yaml_prefs, $syspref;
400
        }
401
    }
402
}
403
$template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs;
404
381
{
405
{
382
    my $dbh       = C4::Context->dbh;
406
    my $dbh       = C4::Context->dbh;
383
    my $patrons = $dbh->selectall_arrayref(
407
    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 300-305 Link Here
300
                    System preference 'RESTOAuth2ClientCredentials' is set, but the required Net::OAuth2::AuthorizationServer dependency is missing. The feature is disabled.
300
                    System preference 'RESTOAuth2ClientCredentials' is set, but the required Net::OAuth2::AuthorizationServer dependency is missing. The feature is disabled.
301
                    </td></tr>
301
                    </td></tr>
302
                [% END %]
302
                [% END %]
303
                [% IF bad_yaml_prefs %]
304
                    <tr><th scope="row"><b>Warning</b> </th><td>
305
                    Some YAML formatted system preferences have bad format: [% bad_yaml_prefs.join(', ') | html %]
306
                    </td></tr>
307
                [% END %]
303
            </table>
308
            </table>
304
        [% END %]
309
        [% END %]
305
310
Lines 371-376 Link Here
371
            [% END %]
376
            [% END %]
372
            </table>
377
            </table>
373
        [% END %]
378
        [% END %]
379
374
    [% ELSE %]
380
    [% ELSE %]
375
        <p>No warnings.</p>
381
        <p>No warnings.</p>
376
    [% END %]
382
    [% END %]
377
- 

Return to bug 21502