[Koha-patches] [PATCH] (bug #3558) use replace instead of insert

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Wed Aug 26 17:06:30 CEST 2009


build browser and cloud script problem, if you run it more than one time, with duplicate entries.
This one, replace the "insert" by "replace".
---
 misc/cronjobs/build_browser_and_cloud.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/misc/cronjobs/build_browser_and_cloud.pl b/misc/cronjobs/build_browser_and_cloud.pl
index 263d886..d3304a1 100755
--- a/misc/cronjobs/build_browser_and_cloud.pl
+++ b/misc/cronjobs/build_browser_and_cloud.pl
@@ -142,7 +142,7 @@ if ($browser_tag) {
 # fills the cloud (tags) table
 if ($cloud_tag) {
     $dbh->do("truncate tags");
-    my $sth = $dbh->prepare("insert into tags (entry,weight) values (?,?)");
+    my $sth = $dbh->prepare("replace into tags (entry,weight) values (?,?)");
     foreach (keys %cloud_result) {
         $sth->execute($_,$cloud_result{$_});
     }
-- 
1.6.0.4




More information about the Koha-patches mailing list