FIX Make RedirectorPage::Link compatible with SiteTree::Link

This commit is contained in:
Daniel Hensby 2018-05-23 16:18:39 +01:00
parent dfdaac48ca
commit b6dbae8b07
No known key found for this signature in database
GPG Key ID: D8DEBC4C8E7BC8B9

View File

@ -42,10 +42,14 @@ class RedirectorPage extends Page {
* If the redirectorpage has been appropriately configured, then it will return the redirection
* destination, to prevent unnecessary 30x redirections. However, if it's misconfigured, then
* it will return a link to itself, which will then display an error message.
* @param null $action
* @return null|string
*/
public function Link() {
if($link = $this->redirectionLink()) return $link;
else return $this->regularLink();
public function Link($action = null) {
if ($link = $this->redirectionLink()) {
return $link;
}
return $this->regularLink($action);
}
/**