Lines 18-31
return {
Link Here
|
18 |
`module` IN (SELECT `module` FROM `marc_overlay_rules` WHERE `filter` = "*") AND |
18 |
`module` IN (SELECT `module` FROM `marc_overlay_rules` WHERE `filter` = "*") AND |
19 |
`filter` NOT IN (SELECT `filter` FROM `marc_overlay_rules` WHERE `tag` = "*") |
19 |
`filter` NOT IN (SELECT `filter` FROM `marc_overlay_rules` WHERE `tag` = "*") |
20 |
}; |
20 |
}; |
21 |
my @results = $dbh->selectall_array( $query ); |
21 |
my @results = $dbh->selectall_array($query); |
22 |
for my $result ( @results ) { |
22 |
for my $result (@results) { |
23 |
my ($module, $filter) = @{$result}; |
23 |
my ( $module, $filter ) = @{$result}; |
24 |
$query = q{ |
24 |
$query = q{ |
25 |
INSERT INTO `marc_overlay_rules`(`tag`, `module`, `filter`, `add`, `append`, `remove`, `delete`) |
25 |
INSERT INTO `marc_overlay_rules`(`tag`, `module`, `filter`, `add`, `append`, `remove`, `delete`) |
26 |
VALUES(?, ?, ?, ?, ?, ?, ?) |
26 |
VALUES(?, ?, ?, ?, ?, ?, ?) |
27 |
}; |
27 |
}; |
28 |
$dbh->do($query, undef, '*', $module, $filter, 1, 1, 1, 1); |
28 |
$dbh->do( $query, undef, '*', $module, $filter, 1, 1, 1, 1 ); |
29 |
} |
29 |
} |
30 |
say $out "Added record overlay rules to preserve current behavior"; |
30 |
say $out "Added record overlay rules to preserve current behavior"; |
31 |
}, |
31 |
}, |
32 |
- |
|
|