A function is another way of handling it, but actually the way I solved it was by simply using a new var like this:
PHP Code:
global $sc_typeset;
if ($sc_typeset == 'sc_typetask' OR $sc_typeset == 'sc_typeevent')
{
if (THIS_SCRIPT == 'newthread')
{
$scdata = $post;
}
else if (THIS_SCRIPT == 'editpost')
{
$scdata = $edit;
}
$dataman->set('sc_typeset', $scdata['sc_typeset']);
$dataman->setr('dateline_from', $scdata['dateline_from']);
$dataman->setr('dateline_to', $scdata['dateline_to']);
$dataman->setr('sc_description', $scdata['sc_description']);
$dataman->setr('sc_location', $scdata['sc_location']);
}
It's silly now, as the solution was so simple i couldn't see it last night - just goes to show me that my brain doesn't really work all that well after 14+ hours of coding, lol.