Lines 27-32
use C4::Context;
Link Here
|
27 |
use C4::Output; |
27 |
use C4::Output; |
28 |
use C4::Context; |
28 |
use C4::Context; |
29 |
|
29 |
|
|
|
30 |
use Koha::Cache; |
30 |
|
31 |
|
31 |
# retrieve parameters |
32 |
# retrieve parameters |
32 |
my $input = new CGI; |
33 |
my $input = new CGI; |
Lines 45-50
my $pagesize = 20;
Link Here
|
45 |
my $script_name = "/cgi-bin/koha/admin/marctagstructure.pl"; |
46 |
my $script_name = "/cgi-bin/koha/admin/marctagstructure.pl"; |
46 |
|
47 |
|
47 |
my $dbh = C4::Context->dbh; |
48 |
my $dbh = C4::Context->dbh; |
|
|
49 |
my $cache = Koha::Cache->get_instance(); |
48 |
|
50 |
|
49 |
# open template |
51 |
# open template |
50 |
my ($template, $loggedinuser, $cookie) |
52 |
my ($template, $loggedinuser, $cookie) |
Lines 167-172
if ($op eq 'add_form') {
Link Here
|
167 |
$frameworkcode |
169 |
$frameworkcode |
168 |
); |
170 |
); |
169 |
} |
171 |
} |
|
|
172 |
$cache->clear_from_cache("MarcStructure-0-$frameworkcode"); |
173 |
$cache->clear_from_cache("MarcStructure-1-$frameworkcode"); |
170 |
} |
174 |
} |
171 |
print $input->redirect("/cgi-bin/koha/admin/marctagstructure.pl?searchfield=$tagfield&frameworkcode=$frameworkcode"); |
175 |
print $input->redirect("/cgi-bin/koha/admin/marctagstructure.pl?searchfield=$tagfield&frameworkcode=$frameworkcode"); |
172 |
exit; |
176 |
exit; |
Lines 191-196
if ($op eq 'add_form') {
Link Here
|
191 |
my $sth2 = $dbh->prepare("DELETE FROM marc_subfield_structure WHERE tagfield=? AND frameworkcode=?"); |
195 |
my $sth2 = $dbh->prepare("DELETE FROM marc_subfield_structure WHERE tagfield=? AND frameworkcode=?"); |
192 |
$sth1->execute($searchfield, $frameworkcode); |
196 |
$sth1->execute($searchfield, $frameworkcode); |
193 |
$sth2->execute($searchfield, $frameworkcode); |
197 |
$sth2->execute($searchfield, $frameworkcode); |
|
|
198 |
$cache->clear_from_cache("MarcStructure-0-$frameworkcode"); |
199 |
$cache->clear_from_cache("MarcStructure-1-$frameworkcode"); |
194 |
} |
200 |
} |
195 |
$template->param( |
201 |
$template->param( |
196 |
searchfield => $searchfield, |
202 |
searchfield => $searchfield, |
Lines 354-358
sub duplicate_framework {
Link Here
|
354 |
while ( my ($frameworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso,$hidden) = $sth->fetchrow) { |
360 |
while ( my ($frameworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso,$hidden) = $sth->fetchrow) { |
355 |
$sth_insert->execute($newframeworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso, $hidden); |
361 |
$sth_insert->execute($newframeworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso, $hidden); |
356 |
} |
362 |
} |
|
|
363 |
$cache->clear_from_cache("MarcStructure-0-$newframeworkcode"); |
364 |
$cache->clear_from_cache("MarcStructure-1-$newframeworkcode"); |
357 |
} |
365 |
} |
358 |
|
366 |
|
359 |
- |
|
|