Importsource: drop run action
This commit is contained in:
parent
c969d4c775
commit
6e4940d712
|
@ -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');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue