VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: balai on April 09, 2012, 11:20:16 AM

Title: [request] Please don't change the names of the core functions
Post by: balai on April 09, 2012, 11:20:16 AM
Hi

These days some developers are investing a lot of time and effort to develop extensions used to enhance the VM core.

Most of those extensions are making use of some core functions, so please do not change the names of the functions from version to version.
For exaple im noticing that the "getCurrencyDisplay" from the "currencydisplay" helper has been renamed to "getCurrencyForDisplay" in VM2 j.
I don't find any reason for this to happen but can cause only troubles.

Now i have to check in my extensions which of those functions exists in order to call them.

This is a small request: If the function names change from version to version our extensions will break easily rendering them "unreliable". So we us developers cannot continue base on VM
Title: Re: [request] Please don't change the names of the core functions
Post by: Milbo on April 09, 2012, 11:58:47 AM
hm? Are you sure? getCurrencyDisplay is not getCurrencyForDisplay.

Of course we avoid renaming, but sometimes you need to fix a bug that way.
Title: Re: [request] Please don't change the names of the core functions
Post by: balai on April 09, 2012, 12:38:06 PM
Yes i am sure:

administrator\components\com_virtuemart\helpers\currencydisplay.php
line: 284
VM 2.0.2j

Please let me know how this endup to know what to do with my code. This might interest others too