1
IF eventCoreIncludeFunctionsRedirectheader in system module runs it will exit()
IMO It is a bug in XOOPS255/modules/system/preloads/core.php
IMO exit() should be commented or we should find some way to make sure all other eventCoreIncludeFunctionsRedirectheader events will run before any exit();
if (!headers_sent() && isset($xoopsConfig['redirect_message_ajax']) && $xoopsConfig['redirect_message_ajax']) {
$_SESSION['redirect_message'] = $args[2];
header("Location: " . preg_replace("/[&]amp;/i", '&', $url));
exit(); // IMO exit() should be commented
}
So it is impossible to use eventCoreIncludeFunctionsRedirectheader in another module.
Or we can use return false and then in redirect_header function use exit() if it return false.
In userlog i end up with a tricky solution.
I shift the position of userlog to the top of 'system_modules_active' cache file list.
so now it is like this:
return array (
0 => 'userlog',
1 => 'system',
2 => 'pm',
and because preload class
read/run events in the module order it will run eventCoreIncludeFunctionsRedirectheader event in userlog first and then run it in system module.
PS: please somebody add this to sf.net bug tracker.