1
Umm...
Today,
I added spaw editor and koivi editor to my newbb(Ver1.0 Not 2.x).
btw, during this job, I found some weird code.
( newbb/post.php )
// prevent hacking of nohtml value
if (!empty($HTTP_POST_VARS['nohtml']) && $forumdata['allow_html']) {
$forumpost->setNohtml(0);
} else {
$forumpost->setNohtml(1);
}
Is this intentional to prevent to any hacking or just a mistake??
anyway....this prevents all allow_html posts regardless of the value of nohtml
I think this code should be like this! ( 0 -> 1, 1-> 0 )
// prevent hacking of nohtml value
if (!empty($HTTP_POST_VARS['nohtml']) && $forumdata['allow_html']) {
$forumpost->setNohtml(1);
} else {
$forumpost->setNohtml(0);
}
Or ( just delete ! in !empty)
// prevent hacking of nohtml value
if (empty($HTTP_POST_VARS['nohtml']) && $forumdata['allow_html']) {
$forumpost->setNohtml(0);
} else {
$forumpost->setNohtml(1);
}
Umm..
I think the latter is reasonable.