Bug 17600: Standardize our EXPORT_OK
[srvgit] / misc / maintenance / sanitize_records.pl
index 7079ea0..2aa9f02 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Charset qw( SanitizeRecord );
+
+use Koha::Script;
+use C4::Charset;
 use C4::Context;
-use DBI;
 use C4::Biblio;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 my ( $help, $verbose, $confirm, $biblionumbers, $reindex, $filename,
     $auto_search, $fix_ampersand );
@@ -152,7 +153,7 @@ sub biblios_to_sanitize {
         SELECT biblionumber
         FROM biblio_metadata
         WHERE format = 'marcxml'
-            AND marcflavour = ?
+            AND `schema` = ?
             AND metadata LIKE "%&amp;amp;%"
         };
     return @{ $dbh->selectcol_arrayref( $query, { Slice => {} }, C4::Context->preference('marcflavour') ) };
@@ -224,11 +225,17 @@ Copyright 2014 BibLibre
 
 This file is part of Koha.
 
-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 3 of the License, or (at your option) any later version.
-
-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.
+# 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 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 =cut