Just wanted to check whether you changed the function from a custom module, or by editing the original file.
You should implement all changes as custom modules (check the documentation at
http://kb.x-cart.com/) and never edit original files as the next upgrade will drop your tweaks and replace them with unmodified files.