Skip to content
Snippets Groups Projects
Commit b333f3fa authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fix path handling in `action_link()`, fixes #1188

Closes #1188

Merge request studip/studip!704
parent cbc5bec6
No related branches found
No related tags found
No related merge requests found
...@@ -740,10 +740,7 @@ abstract class StudipController extends Trails_Controller ...@@ -740,10 +740,7 @@ abstract class StudipController extends Trails_Controller
*/ */
public function action_link($action) public function action_link($action)
{ {
$arguments = func_get_args(); return htmlReady($this->action_url(...func_get_args()));
array_unshift($arguments, $this->controller_path());
return $this->link_for(...$arguments);
} }
/** /**
......
...@@ -76,6 +76,12 @@ final class StudipControllerTest extends Codeception\Test\Unit ...@@ -76,6 +76,12 @@ final class StudipControllerTest extends Codeception\Test\Unit
$expected, $expected,
$this->getRelativeURL($url) $this->getRelativeURL($url)
); );
$link = $this->getController()->action_link(...$args);
$this->assertEquals(
htmlspecialchars($expected),
$this->getRelativeURL($link)
);
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment