Merge pull request #2174 from dhensby/pulls/3/redirector-link

FIX Make RedirectorPage::Link compatible with SiteTree::Link
This commit is contained in:
Robbie Averill 2018-05-24 09:16:17 +12:00 committed by GitHub
commit 12826b2ace
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}
/**