$varArray = array(); foreach ($wantVariables as $value) { $varArray[$value] = stripslashes($GLOBALS[$value]); } } $store = call_user_func("recipients_" . $plugin . "_store", $varArray); } } } $recipient->store(); // Remove group associations if (isset($_REQUEST["ckbRemove"])) { $oGroupMembers = new RecipientGroupMemberCollection(); foreach ($_REQUEST["ckbRemove"] as $iGroupMemberID) { if (is_numeric($iGroupMemberID)) { $oGroupMembers->delete($iGroupMemberID); } } } } if (count($aMessages) > 0) { $sNotis = $notification->returnNotification("warning", implode("<br>", $aMessages)) . "<br>"; } $oForm = new UI_Table_Form("properties"); $oForm->setVar("frame", $frame); $oForm->setVar("area", $area); $oForm->setVar("action", "recipients_save"); $oForm->setVar("idrecipient", $recipient->get("idnewsrcp")); $oForm->addHeader(i18n("Edit recipient", $plugin_name)); $oTxtName = new cHTMLTextbox("name", $recipient->get("name"), 40); $oTxtEMail = new cHTMLTextbox("email", $recipient->get("email"), 40);
/** * Overridden delete method to remove groups from groupmember table * before deleting group * * @param $itemID int specifies the newsletter recipient group */ public function delete($itemID) { $oAssociations = new RecipientGroupMemberCollection(); $oAssociations->setWhere("idnewsgroup", $itemID); $oAssociations->query(); while ($oItem = $oAssociations->next()) { $oAssociations->delete($oItem->get("idnewsgroupmember")); } parent::delete($itemID); }