From c05e2c13552ec9236de8ba8052864d91134516a3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 2 Aug 2016 09:43:01 +0100 Subject: [PATCH] Bug 16955: Do not clear from cache when adding a new framework MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There are several issues with these lines: 1/ $cache is not defined correctly and it not visible inside duplicate_framework 2/ $frameworkcode is a wrong c/p, it should be $newframeworkcode 3/ these calls are not needed. As we are creating a new framework, the cache should be empty... This patch will simply remove these calls Test plan: Duplicate a framework and confirm that you do not get any error in your logs. Signed-off-by: Christopher Brannon Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall (cherry picked from commit 84812129c979557cd2232c3a8b5b0f01c368a634) Signed-off-by: Frédéric Demians --- admin/marctagstructure.pl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 27d9592237..0f27ac0692 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -357,9 +357,5 @@ sub duplicate_framework { while ( my ($frameworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso,$hidden) = $sth->fetchrow) { $sth_insert->execute($newframeworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso, $hidden); } - $cache->clear_from_cache("MarcStructure-0-$newframeworkcode"); - $cache->clear_from_cache("MarcStructure-1-$newframeworkcode"); - $cache->clear_from_cache("default_value_for_mod_marc-$frameworkcode"); - $cache->clear_from_cache("MarcSubfieldStructure-$frameworkcode"); } -- 2.39.5