Link Here
|
16 |
if ($opacresultssidebar) { |
16 |
if ($opacresultssidebar) { |
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', 'OPACResultsSidebar', 'OPACResultsSidebar', NULL, CAST(NOW() AS date) )" |
21 |
"INSERT INTO additional_contents ( category, code, location, branchcode, title, content, lang, published_on ) VALUES ('html_customizations', 'OPACResultsSidebar', 'OPACResultsSidebar', NULL, ?, ?, ?, CAST(NOW() AS date) )", |
21 |
); |
22 |
undef, "OPACResultsSidebar $lang", $opacresultssidebar, $lang |
22 |
|
23 |
); |
23 |
my ($insert_id) = $dbh->selectrow_array( |
24 |
} |
24 |
"SELECT id FROM additional_contents WHERE category = 'html_customizations' AND code = 'OPACResultsSidebar' AND location = 'OPACResultsSidebar' LIMIT 1", |
|
|
25 |
{} |
26 |
); |
27 |
|
28 |
$dbh->do( |
29 |
"INSERT INTO additional_contents_localizations ( additional_content_id, title, content, lang ) VALUES ( ?, 'OPACResultsSidebar default', ?, 'default' )", |
30 |
undef, $insert_id, $opacresultssidebar |
31 |
); |
25 |
|
32 |
|
26 |
# Remove old system preference |
33 |
# Remove old system preference |
27 |
$dbh->do("DELETE FROM systempreferences WHERE variable='OPACResultsSidebar'"); |
34 |
$dbh->do("DELETE FROM systempreferences WHERE variable='OPACResultsSidebar'"); |
28 |
- |
|
|