Steps to reproduce: 1. Open koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref with vim (check that it creates a .circulation.pref.swp in the same directory) 2. Go to the "Local Use" tab in admin/systempreferences.pl 3. Observe the error: Can't use string ("b0VIM 8.0") as a HASH ref while "strict refs" in use at /home/koha/koha/admin/systempreferences.pl line 413.
Created attachment 70548 [details] [review] Bug 19977: Open only .pref files in Local Use tab (sysprefs) Test plan: 1. Open .../prog/en/modules/admin/preferences/circulation.pref with vim (check that it creates a .circulation.pref.swp in the same directory) 2. Go to the "Local Use" tab in admin/systempreferences.pl 3. Confirm that the page works normally
One would hope this case never happens. And if it does, stop editing the files on a live system. That being said, this is a straight-forward regexp tightening.
Created attachment 70703 [details] [review] Bug 19977: Open only .pref files in Local Use tab (sysprefs) Test plan: 1. Open .../prog/en/modules/admin/preferences/circulation.pref with vim (check that it creates a .circulation.pref.swp in the same directory) 2. Go to the "Local Use" tab in admin/systempreferences.pl 3. Confirm that the page works normally Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
(In reply to M. Tompsett from comment #2) > One would hope this case never happens. And if it does, stop editing the > files on a live system. That being said, this is a straight-forward regexp > tightening. Of course this should never happen in production, but it can be annoying during development. Thanks for the sign-off!
Created attachment 70749 [details] [review] Bug 19977: Open only .pref files in Local Use tab (sysprefs) Test plan: 1. Open .../prog/en/modules/admin/preferences/circulation.pref with vim (check that it creates a .circulation.pref.swp in the same directory) 2. Go to the "Local Use" tab in admin/systempreferences.pl 3. Confirm that the page works normally Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 18.05, thanks to everybody involved!
Awesome work all! Pushed to Stable for 17.11.02
Pushed to 17.05.x for v17.05.09