Skip to content

Commit 00cb672

Browse files
committed
Changed instantiation of controller to ::create
1 parent 99cf501 commit 00cb672

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

code/extensions/CommentsExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,17 @@ public function CommentsForm() {
107107

108108
// do not include the comments on pages which don't have id's such as security pages
109109
if($this->owner->ID < 0) return false;
110-
111-
$controller = new CommentingController();
110+
111+
$controller = CommentingController::create();
112112
$controller->setOwnerRecord($this->owner);
113113
$controller->setBaseClass($this->ownerBaseClass);
114114
$controller->setOwnerController(Controller::curr());
115115

116116
$moderatedSubmitted = Session::get('CommentsModerated');
117117
Session::clear('CommentsModerated');
118-
118+
119119
$form = ($enabled) ? $controller->CommentsForm() : false;
120-
120+
121121
// a little bit all over the show but to ensure a slightly easier upgrade for users
122122
// return back the same variables as previously done in comments
123123
return $interface->process(new ArrayData(array(

0 commit comments

Comments
 (0)