Come to think about it given that the modified file is not an app/core file but a library file (/lib/Varien/File/Uploader.php), I am wondering if the custom module creation described below would work. I have not tested that. So please backup you work before testing and do not test on a production environment. However this works any core file that that need to be modified.
Here is the automated way:
Here is a extract from the following Wiki:
Most likely you will want to make a module that representâs your company to hold all your specific changes. Start off by making a new directory like so:
Now, if you need to make changes to the Magento file, Mage/Catalog/Block/Breadcrumbs.php, you can add a new directory for the âCatalogâ module under your XyzCorp directory, then a blocks directory and copy the file into this new directory. Also you need to create config.xml of your module.
Change the class name inside the file by starting off with âXyzCorpâ instead of âMageâ.
Strip out all the code you donât need, and make it subclass the original class name (âMage_Catalog_Block_Breadcrumbsâ).
Now, you must activate your module so Magento understands that there is new code in the âlocalâ directory.
In app/etc/modules/XyzCorp_Catalog.xml, add the following lines
It is crucial that the same prefix XyzCorp is used throughout files, class names, directories, and XML tag names.
Now, your own catalog module is activated, but when will it actually be called by the system? Ahh, we need a special rewrite tag to instruct Magento to use this one file (Breadcrumbs.php) instead of its default.
Now we should rewrite block using your moduleâs config file.
We need to add a âblocksâ tag, or edit inside an existing blocks tag, depending on your XML file. Then we add a rewrite tag after our module name, which is âcatalogâ in this case. Then, we throw in the word âbreadcrumbsâ. This âbreadcrumbsâ name must help magento to find the Block class you want to extend. In our example here, breadcrumbs is the core class file name (which will be overwritten): app/code/core/Mage/Catalog/Block/Breadcrumbs.php. If you have more levels below the Block directory, include it on that tag, using underscores to separate it from the class file name. Ex:
In this case, the class being overwritten is app/code/core/Mage/Catalog/Block/Category/View.php.
The data inside the breadcrumbs (same for category_view) tag is the name of your classfile, and Magento knows how to find it because the class name is the same as itâs directory path and filename. Remember that the underscore means another folder level on the file structure, and Magento wonât find your class in case the Folder structure doesnât reflect the classname properly.
XyzCorp_Catalog_Block_Breadcrumbs â /app/code/local/XyzCorp/Catalog/Block/Breadcrumbs.php XyzCorp_Catalog_Block_Category_View â /app/code/local/XyzCorp/Catalog/Block/Category/View.php