Lines 38-51
return {
Link Here
|
38 |
|); |
38 |
|); |
39 |
} |
39 |
} |
40 |
|
40 |
|
41 |
$dbh->do(q| |
41 |
my $contents = $dbh->selectall_arrayref(q|SELECT * FROM additional_contents|, { Slice => {} }); |
42 |
UPDATE letter |
42 |
my $sth_update = $dbh->prepare(q| |
43 |
SET content = REGEXP_REPLACE(content, '<<\\\\s*opac_news\.', '<<additional_contents.') |
43 |
UPDATE additional_contents |
44 |
|); |
44 |
SET content=? |
45 |
$dbh->do(q| |
45 |
WHERE idnew=? |
46 |
UPDATE letter |
|
|
47 |
SET content = REGEXP_REPLACE(content, '\\\\[%\\\\s*opac_news\.', '[% additional_contents.') |
48 |
|); |
46 |
|); |
|
|
47 |
for my $c ( @$contents ) { |
48 |
my $content = $c->{content}; |
49 |
$content =~ s|<<\s*opac_news\.|<<additional_contents.|g; |
50 |
$content =~ s|\[%\s*opac_news\.|[% additional_contents.|g; |
51 |
$sth_update->execute($content, $c->{idnew}); |
52 |
} |
49 |
|
53 |
|
50 |
$dbh->do(q| |
54 |
$dbh->do(q| |
51 |
UPDATE systempreferences |
55 |
UPDATE systempreferences |
Lines 82-88
return {
Link Here
|
82 |
|); |
86 |
|); |
83 |
} |
87 |
} |
84 |
|
88 |
|
85 |
my $contents = $dbh->selectall_arrayref(q|SELECT * FROM additional_contents|, { Slice => {} }); |
89 |
$contents = $dbh->selectall_arrayref(q|SELECT * FROM additional_contents|, { Slice => {} }); |
86 |
for my $c ( @$contents ) { |
90 |
for my $c ( @$contents ) { |
87 |
my ( $category, $location, $new_lang ); |
91 |
my ( $category, $location, $new_lang ); |
88 |
if ( $c->{lang} eq '' ) { |
92 |
if ( $c->{lang} eq '' ) { |
89 |
- |
|
|