aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-08 15:42:55 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-08 15:42:55 +0200
commit6e90311550657acf20630f66906e19ee4ba7ff2d (patch)
tree62e46a2419d3493a25fe783ad4353cbdfcdb36f7 /phpBB/includes
parent4f356661c552cbdb94d6076270345adf4b6320f9 (diff)
parent542498e457c5e354a39c7cf3eb11f66f263acd59 (diff)
downloadforums-6e90311550657acf20630f66906e19ee4ba7ff2d.tar
forums-6e90311550657acf20630f66906e19ee4ba7ff2d.tar.gz
forums-6e90311550657acf20630f66906e19ee4ba7ff2d.tar.bz2
forums-6e90311550657acf20630f66906e19ee4ba7ff2d.tar.xz
forums-6e90311550657acf20630f66906e19ee4ba7ff2d.zip
Merge branch '3.1.x'
* 3.1.x: [ticket/13960] Profile field validation breaks ACP
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_profile.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 9b4fdaf993..c60e203040 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -543,13 +543,14 @@ class acp_profile
}
}
- $step = (isset($_REQUEST['next'])) ? $step + 1 : ((isset($_REQUEST['prev'])) ? $step - 1 : $step);
-
if (sizeof($error))
{
- $step--;
$submit = false;
}
+ else
+ {
+ $step = (isset($_REQUEST['next'])) ? $step + 1 : ((isset($_REQUEST['prev'])) ? $step - 1 : $step);
+ }
// Build up the specific hidden fields
foreach ($exclude as $num => $key_ary)
@@ -567,7 +568,7 @@ class acp_profile
$var = $profile_field->prepare_hidden_fields($step, $key, $action, $field_data);
if ($var !== null)
{
- $_new_key_ary[$key] = $profile_field->prepare_hidden_fields($step, $key, $action, $field_data);
+ $_new_key_ary[$key] = $var;
}
}
$cp->vars = $field_data;
@@ -577,11 +578,7 @@ class acp_profile
if (!sizeof($error))
{
- if ($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save))
- {
- $this->save_profile_field($cp, $field_type, $action);
- }
- else if ($action == 'edit' && $save)
+ if (($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save)) || ($action == 'edit' && $save))
{
$this->save_profile_field($cp, $field_type, $action);
}