From 4081d6d47d6b0c9d601f4cde42ce6887a6e380f8 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 10 Nov 2014 20:53:20 +0100 Subject: [PATCH] Bug 10749: Fix typo in budget_add_del permission Updates the en permission file and adds a database update to fix the permisson. The update is done using the description, to not untranslate non-English permission descriptions. To test: - Run the database update on your existing installation and check the typo is gone - Run the web installer and check there are no errors and permissions are loaded correctly (and without typos) --- installer/data/mysql/en/mandatory/userpermissions.sql | 2 +- installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/en/mandatory/userpermissions.sql b/installer/data/mysql/en/mandatory/userpermissions.sql index f8e3e9d..9958c27 100644 --- a/installer/data/mysql/en/mandatory/userpermissions.sql +++ b/installer/data/mysql/en/mandatory/userpermissions.sql @@ -23,7 +23,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES (11, 'order_manage_all', 'Manage all orders and baskets, regardless of restrictions on them'), (11, 'group_manage', 'Manage orders & basketgroups'), (11, 'order_receive', 'Manage orders & basket'), - (11, 'budget_add_del', 'Add and delete budgets (but cant modify budgets)'), + (11, 'budget_add_del', 'Add and delete budgets (but can''t modify budgets)'), (11, 'budget_manage_all', 'Manage all budgets'), (13, 'edit_news', 'Write news for the OPAC and staff interfaces'), (13, 'label_creator', 'Create printable labels and barcodes from catalog and patron data'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 5ada385..447c213 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9438,6 +9438,16 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } + +$DBversion = "3.17.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + UPDATE permissions SET description = "Add and delete budgets (but can't modifiy budgets)" WHERE description = "Add and delete budgets (but cant modify budgets)"; + }); + print "Upgrade to $DBversion done (Bug 10749: Fix typo in budget_add_del permission description)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 1.9.1