Bug 15099: Move admin/categorie.pl to admin/categories.pl
[koha-ffzg.git] / C4 / Installer.pm
index 58fd6e8..5fe2e16 100644 (file)
@@ -4,18 +4,18 @@ package C4::Installer;
 #
 # 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 2 of the License, or (at your option) any later
-# version.
+# 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.
+# 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, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use strict;
 #use warnings; FIXME - Bug 2505
@@ -24,6 +24,8 @@ use Encode qw( encode is_utf8 );
 our $VERSION = 3.07.00.049;
 use C4::Context;
 use C4::Installer::PerlModules;
+use DBI;
+use Koha;
 
 =head1 NAME
 
@@ -303,6 +305,9 @@ sub load_sql_in_order {
     # Make sure the global sysprefs.sql file is loaded first
     my $globalsysprefs = C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/sysprefs.sql";
     unshift(@fnames, $globalsysprefs);
+    push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/userflags.sql";
+    push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/userpermissions.sql";
+    push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/audio_alerts.sql";
     foreach my $file (@fnames) {
         #      warn $file;
         undef $/;
@@ -389,7 +394,7 @@ Koha software version.
 sub set_version_syspref {
     my $self = shift;
 
-    my $kohaversion=C4::Context::KOHAVERSION;
+    my $kohaversion = Koha::version();
     # remove the 3 last . to have a Perl number
     $kohaversion =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/;
     if (C4::Context->preference('Version')) {
@@ -457,7 +462,7 @@ sub load_sql {
         $error = qx($strcmd -f $filename 2>&1 1>/dev/null);
         # Be sure to set 'client_min_messages = error' in postgresql.conf
         # so that only true errors are returned to stderr or else the installer will
-        # report the import a failure although it really succeded -fbcit
+        # report the import as a failure although it really succeeded -fbcit
     }
 #   errors thrown while loading installer data should be logged
     if($error) {