From 9f7f38039d2e9bc1c628a68333af679750a793d0 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 20 May 2014 14:22:38 -0300 Subject: [PATCH] Bug 12279: Diacritics in system preference editor broken This patch changes how .pref files are read. Instead of going through all our global ultra-tweaked template object, we only use gettemplate to build the correct file name (path included) and load it using the (at functional) YAML::Syck::LoadFile method. Pros: Doesn't break anything for YAML::Syck pre-1.27 (the ones shipped with Ubuntu 14.04) Cons: something is wrong with C4::Templates encoding/decoding, or at least our default setup using C4::Templates->new doesn't work properly for all file types. To test: - On clean master, install a translation like: cd misc/translator ; perl translate install fr-FR - Go to sysprefs, opac => FAIL: descriptions are encoding-broken - Apply the patch, reload => SUCCESS: Everything shows ok Regards To+ Sponsored-by: Universidad Nacional de Cordoba --- admin/preferences.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/preferences.pl b/admin/preferences.pl index 8bcdb0a..b885e3e 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -54,7 +54,7 @@ sub GetTab { local_currency => $local_currency, # currency code is used, because we do not know how a given currency is formatted. ); - return YAML::Syck::Load( $tab_template->output() ); + return YAML::Syck::LoadFile( $tab_template->{filename} ); } sub _get_chunk { -- 1.9.1