I have a question about this section of the forum permission merger for SMF:
$tquery = $db->simple_select('forumpermissions', 'pid', "fid={$fid} AND gid={$mgid}");
if($db->num_rows($tquery) == 0)
{
// We hadn't any permissions for this forum so simply insert one and leave everything to default
$db->insert_query('forumpermissions', array('fid' => $fid, 'gid' => $mgid, 'canview' => 0));
}
else
{
// We had permissions so simply update them
$db->update_query('forumpermissions', array('canview' => 0), "fid={$fid} AND gid={$mgid}");
}
Shouldn't the bottom else block set canview to 1? I don't see anywhere where canview gets set to 1 and the value defaults to 0 so an update shouldn't be required unless you need to allow view access.
The main reason I ask is I'm working on developing a Java merge system designed to handle the conversion of large forums without timeouts, pauses, or slowing up the web service. I have not run the current PHP variant.
I have a question about this section of the forum permission merger for SMF:
Shouldn't the bottom else block set canview to 1? I don't see anywhere where canview gets set to 1 and the value defaults to 0 so an update shouldn't be required unless you need to allow view access.
The main reason I ask is I'm working on developing a Java merge system designed to handle the conversion of large forums without timeouts, pauses, or slowing up the web service. I have not run the current PHP variant.