Skip to content

Commit 68ad543

Browse files
committed
Fixup merge conflict error
1 parent c3388f8 commit 68ad543

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

src/controllers/PartialUserFormController.php

+2-31
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ class PartialUserFormController extends UserDefinedFormController
4545
* Partial form
4646
*
4747
* @param HTTPRequest $request
48-
* @return DBHTMLText|void
49-
* @throws HTTPResponse_Exception
5048
* @return HTTPResponse|DBHTMLText|void
49+
* @throws HTTPResponse_Exception
5150
* @throws Exception
5251
*/
5352
public function partial(HTTPRequest $request)
@@ -135,35 +134,7 @@ public function setData($request)
135134
$this->dataRecord = DataObject::get_by_id($partial->UserDefinedFormClass, $partial->UserDefinedFormID);
136135
$this->setFailover($this->dataRecord);
137136

138-
$form = $this->Form();
139-
$fields = $partial->PartialFields()->map('Name', 'Value')->toArray();
140-
$form->loadDataFrom($fields);
141-
142-
// Copied from {@link UserDefinedFormController}
143-
if ($this->Content && $form && !$this->config()->disable_form_content_shortcode) {
144-
$hasLocation = stristr($this->Content, '$UserDefinedForm');
145-
if ($hasLocation) {
146-
/** @see Requirements_Backend::escapeReplacement */
147-
$formEscapedForRegex = addcslashes($form->forTemplate(), '\\$');
148-
$content = preg_replace(
149-
'/(<p[^>]*>)?\\$UserDefinedForm(<\\/p>)?/i',
150-
$formEscapedForRegex,
151-
$this->Content
152-
);
153-
154-
return $this->customise([
155-
'Content' => DBField::create_field('HTMLText', $content),
156-
'Form' => '',
157-
'PartialLink' => $partial->getPartialLink()
158-
])->renderWith([static::class, Page::class]);
159-
}
160-
}
161-
162-
return $this->customise([
163-
'Content' => DBField::create_field('HTMLText', $this->Content),
164-
'Form' => $form,
165-
'PartialLink' => $partial->getPartialLink()
166-
])->renderWith([static::class, Page::class]);
137+
return $partial;
167138
}
168139

169140
/**

0 commit comments

Comments
 (0)