예제 #1
0
 /**
  * @param CGroup $oGroup
  * @param array $aContactIds
  * @return bool
  */
 public function AddContactsToGroup($oGroup, $aContactIds)
 {
     $iResult = 1;
     $sSql = $this->oCommandCreator->RemoveContactsFromGroup($oGroup, $aContactIds);
     $iResult &= 0 < strlen($sSql) ? $this->oConnection->Execute($sSql) : true;
     if ($iResult) {
         $iResult &= $this->oConnection->Execute($this->oCommandCreator->AddContactsToGroup($oGroup, $aContactIds));
     }
     return (bool) $iResult;
 }