Importsource: drop run action

This commit is contained in:
Thomas Gelf 2016-06-26 15:56:35 +02:00
parent c969d4c775
commit 6e4940d712
1 changed files with 0 additions and 19 deletions

View File

@ -57,29 +57,10 @@ class ImportsourceController extends ActionController
$this->setViewScript('object/form'); $this->setViewScript('object/form');
} }
public function runAction()
{
$id = $this->params->get('id');
$import = new Import(ImportSource::load($id, $this->db()));
if ($runId = $import->run()) {
Notification::success('Import succeeded');
$this->redirectNow(Url::fromPath('director/importrun', array('id' => $runId)));
} else {
Notification::success('Import skipped, no changes detected');
$this->redirectNow('director/list/importrun');
}
}
public function previewAction() public function previewAction()
{ {
$id = $this->params->get('id'); $id = $this->params->get('id');
$this->view->addLink = $this->view->qlink(
$this->translate('Run'),
'director/importsource/run',
array('id' => $id)
);
$source = ImportSource::load($id, $this->db()); $source = ImportSource::load($id, $this->db());
$this->prepareTabs($id)->activate('preview'); $this->prepareTabs($id)->activate('preview');