Fix the other two places that used the array_diff_assoc incorrectly (by simply removing it)

This commit is contained in:
james 2011-02-01 21:59:06 +00:00
parent b4d018f771
commit ebc7d7ad1d

View File

@ -734,8 +734,7 @@ function user_save(&$u)
if(mysql_error() != '') return "SQLERR3: " . mysql_error();
if( // if this user has an altered available judging times selection, we need to save it
array_key_exists('available_times', $u) &&
count(array_diff_assoc($u['available_times'], $u['orig']['available_times'])) > 0
array_key_exists('available_times', $u)
){
mysql_query("DELETE FROM judges_availability WHERE users_id='{$u['id']}'");
@ -758,8 +757,7 @@ function user_save(&$u)
if(mysql_error() != '') return "SQLERR3: " . mysql_error();
if( // if this user has an altered event availability selection, we need to save it
array_key_exists('available_events', $u) &&
count(array_diff_assoc($u['available_events'], $u['orig']['available_events'])) > 0
array_key_exists('available_events', $u)
){
mysql_query("DELETE FROM schedule_users_availability_link WHERE users_id = {$u['id']}");
if(count($u['available_events']) > 0){