if ($actionType == 'readme' || $actionType == 'code' || $actionType == 'modification' || $actionType == 'redirect')
{
// !!! TODO: Make sure the file actually exists? Might not work when testing?
if ($action->exists('@type') && $action->fetch('@type') == 'inline')
{
$filename = $temp_path . '$auto_' . $temp_auto++ . ($actionType == 'readme' || $actionType == 'redirect' ? '.txt' : ($actionType == 'code' ? '.php' : '.mod'));
package_put_contents($filename, $action->fetch('.'));
$filename = strtr($filename, array($temp_path => ''));
}
else
$filename = $action->fetch('.');
$return[] = array(
'type' => $actionType,
'filename' => $filename,
'description' => '',
'reverse' => $action->exists('@reverse') && $action->fetch('@reverse') == 'true',
'boardmod' => $action->exists('@format') && $action->fetch('@format') == 'boardmod',
'redirect_url' => $action->exists('@url') ? $action->fetch('@url') : '',
'redirect_timeout' => $action->exists('@timeout') ? (int) $action->fetch('@timeout') : '',
'parse_bbc' => $action->exists('@parsebbc') && $action->fetch('@parsebbc') == 'true',
);
continue;
}