Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-26825 do not return any form data if form cancelled

  • Loading branch information...
commit d2b322ae3cf2551961876cf38488abce9c73ec0d 1 parent 56babbc
@skodak skodak authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/formslib.php
View
4 lib/formslib.php
@@ -476,12 +476,12 @@ function is_cancelled(){
*
* note: $slashed param removed
*
- * @return object submitted data; NULL if not valid or not submitted
+ * @return object submitted data; NULL if not valid or not submitted or cancelled
*/
function get_data() {
$mform =& $this->_form;
- if ($this->is_submitted() and $this->is_validated()) {
+ if (!$this->is_cancelled() and $this->is_submitted() and $this->is_validated()) {
$data = $mform->exportValues();
unset($data['sesskey']); // we do not need to return sesskey
unset($data['_qf__'.$this->_formname]); // we do not need the submission marker too
Please sign in to comment.
Something went wrong with that request. Please try again.