From 66f7263f8ad8caaa20ba2b9a66934de146ae5620 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 16 Dec 2010 01:36:08 +0000 Subject: [PATCH] MINOR Added BlogEntry_Controller->PageComments() as a temporary workaround to avoid deprecation warnings from new 'comments' module --- code/BlogEntry.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/BlogEntry.php b/code/BlogEntry.php index 53a9124..b81ab42 100644 --- a/code/BlogEntry.php +++ b/code/BlogEntry.php @@ -263,5 +263,16 @@ class BlogEntry_Controller extends Page_Controller { Director::redirect($this->getParent()->Link()); } } + + /** + * Temporary workaround for compatibility with 'comments' module + * (has been extracted from sapphire/trunk in 12/2010). + * + * @return Form + */ + function PageComments() { + if($this->hasMethod('CommentsForm')) return $this->CommentsForm(); + else return parent::PageComments(); + } }