Permalink
Browse files

MINOR Allow extension of LeftAndMain->Link()

  • Loading branch information...
1 parent b1104da commit 8e39e7dfba7a603dec59cfcf4d3edae9b0144bc1 @chillu chillu committed May 15, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 admin/code/LeftAndMain.php
@@ -384,14 +384,16 @@ function ShowSwitchView() {
*/
public function Link($action = null) {
// Handle missing url_segments
- if(!$this->stat('url_segment', true))
- self::$url_segment = $this->class;
- return Controller::join_links(
+ if(!$this->stat('url_segment', true)) self::$url_segment = $this->class;
+
+ $link = Controller::join_links(
$this->stat('url_base', true),
$this->stat('url_segment', true),
'/', // trailing slash needed if $action is null!
"$action"
);
+ $this->extend('updateLink', $link);
+ return $link;
}
/**

0 comments on commit 8e39e7d

Please sign in to comment.