r17822 - gnucash/branches/2.2/src/engine - [17805] Bug #567174: Restrict commodity mnemonic updates (like NIS to ILS) to iso currencies only.
Christian Stimming
cstim at cvs.gnucash.org
Wed Jan 14 15:13:05 EST 2009
Author: cstim
Date: 2009-01-14 15:13:05 -0500 (Wed, 14 Jan 2009)
New Revision: 17822
Trac: http://svn.gnucash.org/trac/changeset/17822
Modified:
gnucash/branches/2.2/src/engine/gnc-commodity.c
Log:
[17805] Bug #567174: Restrict commodity mnemonic updates (like NIS to ILS) to iso currencies only.
Original patch by andi5.
Modified: gnucash/branches/2.2/src/engine/gnc-commodity.c
===================================================================
--- gnucash/branches/2.2/src/engine/gnc-commodity.c 2009-01-14 20:12:58 UTC (rev 17821)
+++ gnucash/branches/2.2/src/engine/gnc-commodity.c 2009-01-14 20:13:05 UTC (rev 17822)
@@ -1194,10 +1194,12 @@
* Backward compatability support for currencies that have
* recently changed.
*/
- for (i = 0; i < GNC_NEW_ISO_CODES; i++) {
- if (strcmp(mnemonic, gnc_new_iso_codes[i].old_code) == 0) {
- mnemonic = gnc_new_iso_codes[i].new_code;
- break;
+ if (nsp->iso4217) {
+ for (i = 0; i < GNC_NEW_ISO_CODES; i++) {
+ if (strcmp(mnemonic, gnc_new_iso_codes[i].old_code) == 0) {
+ mnemonic = gnc_new_iso_codes[i].new_code;
+ break;
+ }
}
}
return g_hash_table_lookup(nsp->cm_table, (gpointer)mnemonic);
More information about the gnucash-changes
mailing list