public function initialize()
{
if ($this->GenerateSQL()) {
$this->SQL->CaptureModifications = true;
Gdn::structure()->CaptureOnly = true;
$this->Database->CapturedSql = array();
$SQLPath = $this->data('SQLPath');
if (!$SQLPath) {
$SQLPath = 'import/import_' . date('Y-m-d_His') . '.sql';
$this->data('SQLPath', $SQLPath);
}
} else {
// Importing will overwrite our System user record.
// Our CustomFinalization step (e.g. vbulletinimportmodel) needs this to be regenerated.
RemoveFromConfig('Garden.SystemUserID');
}
return true;
}