From 5ff81a3e512b19ab5e14dc494d643aa2a4741213 Mon Sep 17 00:00:00 2001 From: Andrew Short Date: Sun, 11 Oct 2009 00:08:03 +0000 Subject: [PATCH] BUGFIX #3724: Updated Link() methods to accept an action parameter. From: Andrew Short git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@88512 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/ModelAdmin.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 code/ModelAdmin.php diff --git a/code/ModelAdmin.php b/code/ModelAdmin.php old mode 100644 new mode 100755 index 307bdeb0..49edb598 --- a/code/ModelAdmin.php +++ b/code/ModelAdmin.php @@ -297,10 +297,11 @@ class ModelAdmin_CollectionController extends Controller { /** * Appends the model class to the URL. * - * @return unknown + * @param string $action + * @return string */ - function Link() { - return Controller::join_links($this->parentController->Link(), "$this->modelClass"); + function Link($action = null) { + $this->parentController->Link(Controller::join_links($this->modelClass, $action)); } /** @@ -853,10 +854,9 @@ class ModelAdmin_RecordController extends Controller { /** * Link fragment - appends the current record ID to the URL. - * */ - function Link() { - return Controller::join_links($this->parentController->Link(), "/{$this->currentRecord->ID}"); + public function Link($action = null) { + return $this->parentController->Link(Controller::join_links($this->currentRecord->ID, $action)); } /////////////////////////////////////////////////////////////////////////////////////////////////////////