$res = ""; foreach ($ml->getEmails() as $email) { if (strlen($res) > 0) { $res .= ", "; } $res .= $email->toString(); if (strlen($res) > $threshold) { $res = substr($res, 0, $threshold) . "..."; break; } } return $res; } function deleteMailingList($mlName) { global $groupService, $firephp, $domainId; $firephp->log('deleting mailing list ' . $mlName . ' from domain ' . $domainId); $groupService->deleteMailingList($domainId, $mlName); } function changeMailingListStatus($mlName, $enabled) { global $groupService, $domainId; $groupService->changeMailingListStatus($domainId, $mlName, $enabled); } require_once "PHPLiveX.php"; if (!isset($ajax)) { $ajax = new PHPLiveX(); } // Ajaxify Your PHP Functions $ajax->Ajaxify(array("getMailingListEmails", "deleteMailingList", "changeMailingListStatus")); //$ajax->AjaxifyObjectMethods(array("groupService" => array("deleteMailingList", "changeMailingListStatus")));