Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
6750fd37
Commit
6750fd37
authored
Feb 09, 2015
by
Robert Lyon
Committed by
Gerrit Code Review
Feb 09, 2015
Browse files
Merge "Fix form submission for no-reply email setting (Bug #946880)"
parents
a824c9eb
1a83b282
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/auth/lib.php
View file @
6750fd37
...
...
@@ -931,10 +931,17 @@ function auth_check_required_fields() {
'name'
=>
'requiredfields'
,
'method'
=>
'post'
,
'action'
=>
''
,
'elements'
=>
$elements
'elements'
=>
$elements
,
'dieaftersubmit'
=>
FALSE
,
'backoutaftersubmit'
=>
TRUE
,
));
}
// Has the form been successfully submitted? Back out and let the requested URL continue.
if
(
$form
===
FALSE
)
{
return
;
}
$smarty
=
smarty
();
if
(
$USER
->
get
(
'parentuser'
))
{
$smarty
->
assign
(
'loginasoverridepasswordchange'
,
...
...
@@ -1103,6 +1110,10 @@ function requiredfields_submit(Pieform $form, $values) {
}
}
if
(
$form
->
get_property
(
'backoutaftersubmit'
))
{
return
;
}
redirect
();
}
...
...
htdocs/lib/pieforms/pieform.php
View file @
6750fd37
...
...
@@ -160,7 +160,12 @@ class Pieform {/*{{{*/
*/
public
static
function
process
(
$data
)
{
/*{{{*/
$form
=
new
Pieform
(
$data
);
return
$form
->
build
();
if
(
$form
->
get_property
(
'backingout'
))
{
return
FALSE
;
}
else
{
return
$form
->
build
();
}
}
/*}}}*/
/**
...
...
@@ -536,6 +541,9 @@ class Pieform {/*{{{*/
}
else
{
// Successful submission, and the user doesn't care about replying, so...
if
(
isset
(
$this
->
data
[
'backoutaftersubmit'
]))
{
$this
->
data
[
'backingout'
]
=
TRUE
;
}
return
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment