Lines 16-28
return {
Link Here
|
16 |
if ($patronselfregistrationadditionalinstructions) { |
16 |
if ($patronselfregistrationadditionalinstructions) { |
17 |
|
17 |
|
18 |
# Insert any values found from system preference into additional_contents |
18 |
# Insert any values found from system preference into additional_contents |
19 |
foreach my $lang ('default') { |
19 |
$dbh->do( |
20 |
$dbh->do( |
20 |
"INSERT INTO additional_contents ( category, code, location, branchcode, published_on ) VALUES ('html_customizations', 'PatronSelfRegistrationAdditionalInstructions', 'PatronSelfRegistrationAdditionalInstructions', NULL, CAST(NOW() AS date) )" |
21 |
"INSERT INTO additional_contents ( category, code, location, branchcode, title, content, lang, published_on ) VALUES ('html_customizations', 'PatronSelfRegistrationAdditionalInstructions', 'PatronSelfRegistrationAdditionalInstructions', NULL, ?, ?, ?, CAST(NOW() AS date) )", |
21 |
); |
22 |
undef, "PatronSelfRegistrationAdditionalInstructions $lang", |
22 |
|
23 |
$patronselfregistrationadditionalinstructions, $lang |
23 |
my ($insert_id) = $dbh->selectrow_array( |
24 |
); |
24 |
"SELECT id FROM additional_contents WHERE category = 'html_customizations' AND code = 'PatronSelfRegistrationAdditionalInstructions' AND location = 'PatronSelfRegistrationAdditionalInstructions' LIMIT 1", |
25 |
} |
25 |
{} |
|
|
26 |
); |
27 |
|
28 |
$dbh->do( |
29 |
"INSERT INTO additional_contents_localizations ( additional_content_id, title, content, lang ) VALUES ( ?, 'PatronSelfRegistrationAdditionalInstructions default', ?, 'default' )", |
30 |
undef, $insert_id, $patronselfregistrationadditionalinstructions |
31 |
); |
26 |
|
32 |
|
27 |
# Remove old system preference |
33 |
# Remove old system preference |
28 |
$dbh->do("DELETE FROM systempreferences WHERE variable='PatronSelfRegistrationAdditionalInstructions'"); |
34 |
$dbh->do("DELETE FROM systempreferences WHERE variable='PatronSelfRegistrationAdditionalInstructions'"); |
29 |
- |
|
|