Bug 10096 - (follow-up) various QA improvements
authorDavid Cook <dcook@prosentient.com.au>
Tue, 10 Sep 2013 02:41:36 +0000 (12:41 +1000)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 4 Oct 2013 14:29:18 +0000 (14:29 +0000)
- improve POD
- remove extraneous comments
- correct license statement in new files
- remove backticks in database update SQL

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Breeding.pm
cataloguing/z3950_auth_search.pl
installer/data/mysql/updatedatabase.pl

index 876ea19..8e01d41 100644 (file)
@@ -457,7 +457,8 @@ sub _isbn_replace {
 
 ImportBreedingAuth($marcrecords,$overwrite_auth,$filename,$encoding,$z3950random,$batch_type);
 
-TODO description
+    ImportBreedingAuth imports MARC records in the reservoir (import_records table).
+    ImportBreedingAuth is based on the ImportBreeding subroutine.
 
 =cut
 
@@ -485,10 +486,6 @@ sub ImportBreedingAuth {
         # Normalize the record so it doesn't have separated diacritics
         SetUTF8Flag($marcrecord);
 
-#         warn "$i : $marcarray[$i]";
-        # FIXME - currently this does nothing
-        my @warnings = $marcrecord->warnings();
-
         if (scalar($marcrecord->fields()) == 0) {
             $notmarcrecord++;
         } else {
@@ -509,10 +506,6 @@ sub ImportBreedingAuth {
 
             if ($duplicateauthid && $overwrite_auth ne 2) {
                 #If the authority record exists and $overwrite_auth doesn't equal 2, then mark it as already in the DB
-                #FIXME: What does $overwrite_auth = 2 even mean?
-
-                #FIXME: Should we bother with $overwrite_auth values? Currently, the hard-coded $overwrite_auth value is 2, which means the database gets filled with import_records...
-                #^^ of course, we might not want to reject records if their control number/heading exist in the db or breeding/import pool...as we might be wanting to update existing authority records...
                 $alreadyindb++;
             } else {
                 if ($controlnumber && $heading) {
@@ -520,11 +513,9 @@ sub ImportBreedingAuth {
                     ($breedingid) = $searchbreeding->fetchrow;
                 }
                 if ($breedingid && $overwrite_auth eq '0') {
-                    #FIXME: What does $overwrite_auth = 0 even mean?
                     $alreadyinfarm++;
                 } else {
                     if ($breedingid && $overwrite_auth eq '1') {
-                        #FIXME: What does $overwrite_auth = 1 even mean?
                         ModAuthorityInBatch($breedingid, $marcrecord);
                     } else {
                         my $import_id = AddAuthToBatch($batch_id, $imported, $marcrecord, $encoding, $z3950random);
index 47be33e..3ab7666 100755 (executable)
@@ -1,25 +1,20 @@
 #!/usr/bin/perl
 
-# This is a completely new Z3950 clients search using async ZOOM -TG 02/11/06
-# Copyright 2000-2002 Katipo Communications
-#
-# This is a new Z3950 authority search using the current Z3950 bibliographic search as a model 07/05/2013
-# Parts Copyright 2013 Prosentient Systems
-#
 # This file is part of Koha.
 #
+# Copyright 2013 Prosentient Systems
+#
 # Koha is free software; you can redistribute it and/or modify it under the
 # terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
+# Foundation; either version 3 of the License, or (at your option) any later
 # version.
 #
 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use strict;
 use warnings;
index 6a09c17..6a4129a 100755 (executable)
@@ -7164,7 +7164,7 @@ if ( CheckVersion($DBversion) ) {
 
 $DBversion = "3.13.00.XXX";
 if ( CheckVersion($DBversion) ) {
-    $dbh->do(q{ALTER TABLE `z3950servers` ADD COLUMN `recordtype` VARCHAR(45) NOT NULL DEFAULT 'biblio';});
+    $dbh->do(q{ALTER TABLE z3950servers ADD COLUMN recordtype VARCHAR(45) NOT NULL DEFAULT 'biblio' AFTER description;});
     print "Upgrade to $DBversion done (Bug 10096 - Add a Z39.50 interface for authority searching)\n";
     SetVersion ($DBversion);
 }