bug_6974: bugfix: do not create empty record before building input for new biblio
authorSrdjan Jankovic <srdjan@catalyst.net.nz>
Thu, 6 Oct 2011 00:55:47 +0000 (13:55 +1300)
committerChris Cormack <chrisc@catalyst.net.nz>
Thu, 6 Oct 2011 20:59:45 +0000 (09:59 +1300)
It messes up javascript default values

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
cataloguing/addbiblio.pl

index ba10332..29df4a5 100755 (executable)
@@ -1037,10 +1037,7 @@ elsif ( $op eq "delete" ) {
         $biblionumber = "";
     }
 
-    if ( $record eq -1 ) {
-        $record = TransformHtmlToMarc( $input );
-    }
-    else {
+    if ( $record ne -1 ) {
 #FIXME: it's kind of silly to go from MARC::Record to MARC::File::XML and then back again just to fix the encoding
         eval {
             my $uxml = $record->as_xml;