Skip to content

Commit

Permalink
Make Answer and Question model callbacks conform to parent. Refs #128.
Browse files Browse the repository at this point in the history
  • Loading branch information
simpsonw committed Apr 21, 2015
1 parent 636cf32 commit 9dc1e9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/Model/Answer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Answer extends AppModel {

var $belongsTo = array('Question');

function beforeSave() {
function beforeSave($options = array()) {
$this->data['Answer']['answer'] =
strip_tags($this->data['Answer']['answer'], allowed_tags('strip_tags'));
$this->data['Answer']['response_heading'] =
Expand All @@ -20,4 +20,4 @@ function beforeSave() {
strip_tags($this->data['Answer']['response'], allowed_tags('strip_tags'));
return true;
}
}
}
4 changes: 2 additions & 2 deletions app/Model/Question.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ protected function _parseQuestions($id = null) {
}
}

function beforeSave() {
function beforeSave($options = array()) {
$this->data['Question']['question'] =
strip_tags($this->data['Question']['question'], allowed_tags('strip_tags'));
return true;
}

}
?>
?>

0 comments on commit 9dc1e9b

Please sign in to comment.