You are here

function _drupalchat_buddylist_diff in DrupalChat 7

Same name and namespace in other branches
  1. 6.2 drupalchat.module \_drupalchat_buddylist_diff()
  2. 6 drupalchat.module \_drupalchat_buddylist_diff()
  3. 7.2 drupalchat.module \_drupalchat_buddylist_diff()
1 call to _drupalchat_buddylist_diff()
drupalchat_poll in ./drupalchat.module
Process and get messages

File

./drupalchat.module, line 1019
Module code for DrupalChat.

Code

function _drupalchat_buddylist_diff($ar1, $ar2) {
  if ($ar1['total'] != $ar2['total']) {
    return FALSE;
  }
  foreach ($ar1 as $key => $value) {
    if (!isset($ar2[$key])) {
      return FALSE;
    }
    if ($value['status'] != $ar2[$key]['status']) {
      return FALSE;
    }
  }
  return TRUE;
}