|
Lines 16-35
return {
Link Here
|
| 16 |
if ($intranetcirculationhomehtml) { |
16 |
if ($intranetcirculationhomehtml) { |
| 17 |
|
17 |
|
| 18 |
$dbh->do( |
18 |
$dbh->do( |
| 19 |
"INSERT INTO additional_contents ( category, code, location, branchcode, published_on ) VALUES ('html_customizations', 'IntranetCirculationHomeHTML', 'IntranetCirculationHomeHTML', NULL, CAST(NOW() AS date) )" |
19 |
"INSERT INTO additional_contents ( category, code, location, branchcode, published_on ) VALUES ('html_customizations', 'StaffCirculationHomeHTML', 'StaffCirculationHomeHTML', NULL, CAST(NOW() AS date) )" |
| 20 |
); |
20 |
); |
| 21 |
|
21 |
|
| 22 |
my ($insert_id) = $dbh->selectrow_array( |
22 |
my ($insert_id) = $dbh->selectrow_array( |
| 23 |
"SELECT id FROM additional_contents WHERE category = 'html_customizations' AND code = 'IntranetCirculationHomeHTML' AND location = 'IntranetCirculationHomeHTML' LIMIT 1", |
23 |
"SELECT id FROM additional_contents WHERE category = 'html_customizations' AND code = 'StaffCirculationHomeHTML' AND location = 'StaffCirculationHomeHTML' LIMIT 1", |
| 24 |
{} |
24 |
{} |
| 25 |
); |
25 |
); |
| 26 |
|
26 |
|
| 27 |
$dbh->do( |
27 |
$dbh->do( |
| 28 |
"INSERT INTO additional_contents_localizations ( additional_content_id, title, content, lang ) VALUES ( ?, 'IntranetCirculationHomeHTML default', ?, 'default' )", |
28 |
"INSERT INTO additional_contents_localizations ( additional_content_id, title, content, lang ) VALUES ( ?, 'StaffCirculationHomeHTML default', ?, 'default' )", |
| 29 |
undef, $insert_id, $intranetcirculationhomehtml |
29 |
undef, $insert_id, $intranetcirculationhomehtml |
| 30 |
); |
30 |
); |
| 31 |
|
31 |
|
| 32 |
say $out "Added 'IntranetCirculationHomeHTML' HTML customization"; |
32 |
say $out "Added 'StaffCirculationHomeHTML' HTML customization"; |
| 33 |
} |
33 |
} |
| 34 |
|
34 |
|
| 35 |
# Remove old system preference |
35 |
# Remove old system preference |