1 # Copyright 2010 Chris Cormack
3 # This file is part of Koha.
5 # Koha is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # Koha is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with Koha; if not, see <http://www.gnu.org/licenses>.
26 my @files =('kohaversion.pl','installer/data/mysql/updatedatabase.pl');
28 foreach my $file (@files){
30 my @name_parts = File::Spec->splitpath($file);
31 my %dirs = map { $_ => 1 } File::Spec->splitdir($name_parts[1]);
32 next if exists $dirs{'.git'};
34 my $fh = IO::File->new($file, 'r');
40 #two lines are an exception for updatedatabase (routine SetVersion and TransferToNum)
42 if $file =~ /updatedatabase/
43 && ( /s\/XXX\$\/999\/;/
44 || /\$_\[0\]=~ \/XXX\$\/;/
45 || /version contains XXX/
46 || /\$proposed_version =~ m\/XXX\// );
53 fail("$file has no XXX in it");
54 diag("XXX found in line $line");
56 pass("$file has no XXX in it");