aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-02-02 21:05:44 +0100
committerMarc Alexander <admin@m-a-styles.de>2015-02-02 21:05:44 +0100
commit5182d02da51f95e26b7e9c00881aa8251e1bdcbd (patch)
tree3b98a92a66a15d82a95d0c7d52f0137b26828d27
parent9f59aa59d92c6641308a0c1d51a5d4e41d37b2ec (diff)
parent0cfa9779532e820ee9d0e40376f7587634dc2417 (diff)
downloadforums-5182d02da51f95e26b7e9c00881aa8251e1bdcbd.tar
forums-5182d02da51f95e26b7e9c00881aa8251e1bdcbd.tar.gz
forums-5182d02da51f95e26b7e9c00881aa8251e1bdcbd.tar.bz2
forums-5182d02da51f95e26b7e9c00881aa8251e1bdcbd.tar.xz
forums-5182d02da51f95e26b7e9c00881aa8251e1bdcbd.zip
Merge pull request #3334 from paul999/ticket/13542
[ticket/13542] Update core.ucp_prefs_personal_data to include $error
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index 2195500b57..1d3fb19f67 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -67,9 +67,11 @@ class ucp_prefs
* @var bool submit Do we display the form only
* or did the user press submit
* @var array data Array with current ucp options data
+ * @var array error Array with list of errors
* @since 3.1.0-a1
+ * @changed 3.1.4-rc1 Added error variable to the event
*/
- $vars = array('submit', 'data');
+ $vars = array('submit', 'data', 'error');
extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_personal_data', compact($vars)));
if ($submit)
@@ -83,11 +85,11 @@ class ucp_prefs
$data['user_style'] = (int) $user->data['user_style'];
}
- $error = validate_data($data, array(
+ $error = array_merge(validate_data($data, array(
'dateformat' => array('string', false, 1, 30),
'lang' => array('language_iso_name'),
'tz' => array('timezone'),
- ));
+ )), $error);
if (!check_form_key('ucp_prefs_personal'))
{