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