From: Kevin A. M. <KMcGrail@PCCC.com> - 2010-02-04 15:05:57
|
>> Second, the newuser_wiz plugin doesn't work with newer compatibility >> versions. I *know* it is old but theoretically it should work. >> > > I'm not sure what your theory is, but old broken code has to be fixed > before it will work. ;-) > > >> However, it doesn't seems to work because this line in compatibility doesn't >> work: >> >> compatibility_sqextractGlobalVar('new_full_name'); >> >> leading to >> >> PHP Fatal error: Call to undefined function sqgetGlobalVar() in >> /htdocs/webmail.pccc.com/squirrelmail-1.4.19/plugins/compatibility/includes/1.5.2/global.php >> on line 999 >> >> Perhaps the author of newuser_wiz used the compatibility features >> incorrectly >> > > No, it was correct at the time. That was for version 1.x of the > > > Compatibility plugin. >> but it looked to me at a minimum that compatibility code should >> be sqGetGlobalVar (note the capital G) and that the function didn't >> appear to be in scope for compatibility. >> >> Third, I have no idea of the ramifications but attached is a patch to >> newuser wiz that I've tested with SM 1.4.17 & 1.4.19 and the latest >> compatibility. >> >> I have not read the Compatibility README file and updated the plugin per >> that document, sorry. However, if I'm right about the bug in compatibility, >> then fixing that alleviates the need to patch the plugin. >> > > I don't know what "bug in compatibility" means exactly. There is no > bug in the Compatibility plugin regarding this issue. Your patch is > done the right way and is basically an update for the plugin so that > it works with Compatibility 2.x. Thanks. > Happy to help re: the patch. To clarify my statement about a bug in compatibility here is a chain of thought: 1 - newuser_wiz used to work until around version 2.05 of compatibility (based on the author notes) 2 - newuser_wize calls a function compatibility_sqextractGlobalVar() that still has code in the compatibility source functions.php That code is (marked as legacy compatibility code) function compatibility_sqextractGlobalVar ($name) { global $$name; sqgetGlobalVar($name, $$name); } 3 - The code in compatibility throws the error Call to undefined function sqgetGlobalVar() 4 - the function sqgetGlobalVar with the lower case sqget instead of sqGet only exists in the 1.4.0 compatibility global.php. 5 - I viewed the fact that the stubs existed but called functions that didn't exist a bug in compatibility. Perhaps a stub that just says, function deprecated, contact author to use XYZ version would be a good idea. Regards, KAM |