mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
oop, only update if we have data ...
git-svn-id: file:///svn/phpbb/trunk@4064 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
b6a0ce82d4
commit
208f1e59bf
1 changed files with 20 additions and 18 deletions
|
@ -149,7 +149,7 @@ class ucp_profile extends ucp
|
|||
$validate = array(
|
||||
'match' => array(
|
||||
'icq' => ($data['icq']) ? '#^[0-9]+$#i' : '',
|
||||
'website' => ($data['website']) ? '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]+#i' : '',
|
||||
'website' => ($data['website']) ? '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i' : '',
|
||||
),
|
||||
);
|
||||
$this->validate_data($data, $validate);
|
||||
|
@ -383,6 +383,9 @@ class ucp_profile extends ucp
|
|||
}
|
||||
|
||||
if (!sizeof($this->error))
|
||||
{
|
||||
// Do we actually have any data to update?
|
||||
if (sizeof($data))
|
||||
{
|
||||
$sql_ary = array(
|
||||
'user_avatar' => $data['filename'],
|
||||
|
@ -401,6 +404,7 @@ class ucp_profile extends ucp
|
|||
{
|
||||
$this->avatar_delete();
|
||||
}
|
||||
}
|
||||
|
||||
meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$submode");
|
||||
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&i=$id&mode=$submode\">", '</a>');
|
||||
|
@ -485,8 +489,6 @@ class ucp_profile extends ucp
|
|||
|
||||
$this->display($user->lang['UCP_PROFILE'], 'ucp_profile.html');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Reference in a new issue