# 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., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# 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.
use strict;
use warnings;
use Test::More qw(no_plan);
use C4::Context;
-use YAML;
-my $root_dir = C4::Context->config( 'intranetdir' ) . '/installer/data/mysql';
+my $root_dir = 'installer/data/mysql';
my $base_perms_file = "en/mandatory/userpermissions.sql";
my @trans_perms_files = qw(
+ de-DE/mandatory/userpermissions.sql
+ it-IT/necessari/userpermissions.sql
fr-FR/1-Obligatoire/userpermissions.sql
- uk-UA/mandatory/userpermissions.sql
- ru-RU/mandatory/userpermissions.sql
+ uk-UA/mandatory/permissions_and_user_flags.sql
+ ru-RU/mandatory/permissions_and_user_flags.sql
pl-PL/mandatory/userpermissions.sql
+ nb-NO/1-Obligatorisk/userpermissions.sql
+ es-ES/mandatory/userpermissions.sql
);
ok(
sub get_perms_from_file {
my $fh = shift;
my %perm;
+ my $found_insert = 0;
while ( <$fh> ) {
next if /^--/; # Comment line
+ $found_insert = 1 if /insert\s+into/i and /permissions/i;
+ next unless $found_insert;
#/VALUES.*\(\'([\w\-:]+)\'/;
/,\s*\'(.*?)\'/;
my $variable = $1;