Bug 35267: Fix check_sysprefs.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2026-04-20 11:14:35 +02:00 committed by Lucas Gass
parent 1c60030164
commit 3a91b4f8d0
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
3 changed files with 25 additions and 23 deletions

View File

@ -7,36 +7,34 @@ return {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
# Do you stuffs here
$dbh->do(
q{
INSERT IGNORE INTO systempreferences (variable, value) VALUES
('AllNoticeStylesheet', ''),
('AllNoticeCSS',''),
('EmailNoticeCSS',''),
('PrintNoticeCSS',''),
('PrintSlipCSS','')
}
my @new_prefs = qw(
AllNoticeStylesheet
AllNoticeCSS
EmailNoticeCSS
PrintNoticeStylesheet
PrintNoticeCSS
PrintSlipCSS
);
say $out "Added new system preference 'AllNoticeStylesheet'";
say $out "Added new system preference 'AllNoticeCSS'";
say $out "Added new system preference 'EmailNoticeCSS'";
say $out "Added new system preference 'PrintNoticeCSS'";
say $out "Added new system preference 'PrintSlipCSS'";
for my $pref (@new_prefs) {
$dbh->do(
q{INSERT IGNORE INTO systempreferences (variable, value) VALUES (?, '')},
undef, $pref
) == 1
&& say $out "Added new system preference '$pref'";
}
$dbh->do(
q{
UPDATE systempreferences SET variable='EmailNoticeStylesheet' WHERE variable='NoticeCSS'
}
);
say $out "Rename system preference 'NoticeCSS' to 'EmailNoticeStylesheet'";
) == 1 && say $out "Renamed system preference 'NoticeCSS' to 'EmailNoticeStylesheet'";
$dbh->do(
q{
UPDATE systempreferences SET variable='PrintSlipStylesheet' WHERE variable='SlipCSS'
}
);
say $out "Rename system preference 'SlipCSS' to 'PrintSlipStylesheet'";
) == 1 && say $out "Renamed system preference 'SlipCSS' to 'PrintSlipStylesheet'";
},
};

View File

@ -28,6 +28,7 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES
('AggressiveMatchOnISSN','0'),
('AllFinesNeedOverride','1'),
('AllNoticeCSS',''),
('AllNoticeStylesheet',''),
('AllowAllMessageDeletion','0'),
('AllowCheckoutNotes', '0'),
('AllowFineOverride','0'),
@ -255,9 +256,9 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES
('EmailFieldPrimary',''),
('EmailFieldSelection',''),
('emailLibrarianWhenHoldIsPlaced','0'),
('EmailOverduesNoEmail','1'),
('EmailNoticeCSS',''),
('EmailNoticeStylesheet',''),
('EmailOverduesNoEmail','1'),
('EmailPatronRegistrations', '0'),
('EmailPatronWhenHoldIsPlaced', '0'),
('EmailPurchaseSuggestions','0'),
@ -461,7 +462,6 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES
('NotesToHide',''),
('NotHighlightedWords','and|or|not'),
('NoticeBcc',''),
('NoticeCSS',''),
('NoticesLog','0'),
('NotifyBorrowerDeparture','30'),
('NotifyPasswordChange','1'),
@ -667,10 +667,10 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES
('previousIssuesDefaultSortOrder','asc'),
('PrintNoticeCSS',''),
('PrintNoticesMaxLines','0'),
('PrivacyPolicyConsent',''),
('PrintNoticeStylesheet',''),
('PrintSlipCSS',''),
('PrintSlipStylesheet',''),
('PrivacyPolicyConsent',''),
('PrivacyPolicyURL',''),
('ProcessingFeeNote', ''),
('ProtectSuperlibrarianPrivileges','1'),
@ -775,7 +775,6 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES
('SIP2AddOpacMessagesToScreenMessage','1'),
('SIP2SortBinMapping',''),
('SkipHoldTrapOnNotForLoanValue',''),
('SlipCSS',''),
('SMSSendAdditionalOptions', ''),
('SMSSendDriver',''),
('SMSSendMaxChar', ''),

View File

@ -56,6 +56,11 @@ Tools:
type: textarea
syntax: css
class: code
-
- Include the stylesheet at
- pref: PrintNoticeStylesheet
class: url
- on print notices. (This should be a complete URL, starting with <code>http://</code>.)
-
- Include the stylesheet at
- pref: PrintSlipStylesheet