Skip to content

Commit c632900

Browse files
committed
style: remove dead code
Signed-off-by: Thierry Bugier <[email protected]>
1 parent 23f104e commit c632900

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

inc/form.class.php

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,51 +1403,6 @@ private function updateValidators() {
14031403
}
14041404
}
14051405

1406-
// /**
1407-
// * Validates answers of a form and saves them in database
1408-
// *
1409-
// * @param array $input fields from the HTML form
1410-
// * @return integer|boolean ID of the formanswer if success, false otherwise
1411-
// */
1412-
// public function saveForm($input) {
1413-
// $valid = true;
1414-
// $fieldValidities = [];
1415-
1416-
// $fields = $this->getFields();
1417-
// foreach ($fields as $id => $question) {
1418-
// $fieldValidities[$id] = $fields[$id]->parseAnswerValues($input);
1419-
// }
1420-
// // any invalid field will invalidate the answers
1421-
// $valid = !in_array(false, $fieldValidities, true);
1422-
1423-
// if ($valid) {
1424-
// foreach ($fields as $id => $question) {
1425-
// if (!$fields[$id]->isPrerequisites()) {
1426-
// continue;
1427-
// }
1428-
// if (PluginFormcreatorFields::isVisible($id, $fields) && !$fields[$id]->isValid()) {
1429-
// $valid = false;
1430-
// break;
1431-
// }
1432-
// }
1433-
// }
1434-
1435-
// // Check required_validator
1436-
// if ($this->fields['validation_required'] && empty($input['formcreator_validator'])) {
1437-
// Session::addMessageAfterRedirect(__('You must select validator!', 'formcreator'), false, ERROR);
1438-
// $valid = false;
1439-
// }
1440-
1441-
// if (!$valid) {
1442-
// // Save answers in session to display it again with the same values
1443-
// $_SESSION['formcreator']['data'] = Toolbox::stripslashes_deep($input);
1444-
// return false;
1445-
// }
1446-
1447-
// $formanswer = new PluginFormcreatorFormAnswer();
1448-
// return $formanswer->saveAnswers($this, $input, $fields);
1449-
// }
1450-
14511406
public function increaseUsageCount() {
14521407
// Increase usage count of the form
14531408
$this->update([

0 commit comments

Comments
 (0)