Permalink
Browse files

webui: fix invalid url generated in first job

Fixes #974: Submitting job jumps to invalid site
  • Loading branch information...
thraizz authored and franku committed Jul 30, 2018
1 parent 83b9740 commit f665aeaedc491ac8028e8d3eb37cfeb3ede0afbf
Showing with 2 additions and 1 deletion.
  1. +2 −1 webui/module/Job/src/Job/Controller/JobController.php
@@ -361,7 +361,8 @@ public function runAction()
$this->bsock->disconnect();
$s = strrpos($result, "=") + 1;
$jobid = rtrim( substr( $result, $s ) );
return $this->redirect()->toRoute('job', array('action' => 'details', 'id' => $jobid));
preg_match("'\d{1,99}(?=%)?'", $jobid, $filtered);
return $this->redirect()->toRoute('job', array('action' => 'details', 'id' => $filtered[0]));
}
catch(Exception $e) {
echo $e->getMessage();

0 comments on commit f665aea

Please sign in to comment.