Marc - Thanks for sharing your experience here. It is important that users be aware of how to upgrade and how to properly apply patches. No files, especially lib files which are used by multiple aspects of Moodle, should be used from a different version (i.e. 1.6, 1.7, 1.8, 1.9, etc.) as they may well cause problems as things mature and develop. The 1.9 files are written only to work with other 1.9 files. Users you might be confused about how versions work in Moodle may find it helpful to read:
http://docs.moodle.org/en/CVS_(developer)#Working_with_branchesAs you discovered, it is important to understand how versioning works. In general, I recommend that when adding a patch or contributed (3rd party) plugin that users upgrade to the latest stable release of the version they have before applying the patch or adding the module (unless the instructions for that patch indicate otherwise). It is important that site administrators who want to take advantage of a patch make sure that it works with their installation by testing on a test
server first. Patches are deviations from Moodle core and are likely to be less reliable and not as thoroughly tested. This really does place an additional burden of testing on the one installling the patch. I might even go as far as to say that any patch should be treated as beta quality.
Especially with patches that overwrite or modify core code, it is worth reiterating the warning found at:
http://docs.moodle.org/en/Installing_contributed_modules_or_pluginsWarning: Please be aware that some contributed modules and plugins have not been reviewed, and the quality and/or suitability for your Moodle site has not been checked. The modules and plugins may have security problems, data-loss problems, interface problems or just plain not work. Please think carefully about maintenance before relying on contributed code in your production site, as some of this code may not work with future versions of Moodle.Moodle admins wishing to use patches or contributed code should be comfortable debugging code and troubleshooting issues. In short, patches are not for the faint of heart.
Peace - Anthony