Updates to some files for legacy compatibility and bug fixing.

Changed $xoopsDB declaration for better compatibility.