diff --git a/control/Controller.php b/control/Controller.php index ee2d9e8bd..1c1975347 100644 --- a/control/Controller.php +++ b/control/Controller.php @@ -84,6 +84,13 @@ class Controller extends RequestHandler { $this->baseInitCalled = true; } + /** + * Returns a link to this controller. Overload with your own Link rules if they exist. + */ + function Link() { + return get_class($this) .'/'; + } + /** * Executes this controller, and return an {@link SS_HTTPResponse} object with the result. * diff --git a/security/Security.php b/security/Security.php index 74acb4982..657f00c48 100644 --- a/security/Security.php +++ b/security/Security.php @@ -297,7 +297,7 @@ class Security extends Controller { * @param string $action Name of the action * @return string Returns the link to the given action */ - public static function Link($action = null) { + public function Link($action = null) { return "Security/$action"; }