/** * Custom handler for config save * * @param Varien_Simplexml_Element $config * @param Enterprise_Logging_Model_Event $eventModel * @param Enterprise_Logging_Model_Processor $processor * @return Enterprise_Logging_Model_Event */ public function postDispatchConfigSave($config, $eventModel, $processor) { $request = Mage::app()->getRequest(); $postData = $request->getPost(); $groupFieldsData = array(); $change = Mage::getModel('enterprise_logging/event_changes'); //Collect skip encrypted fields $encryptedNodeEntriesPaths = Mage::getSingleton('adminhtml/config')->getEncryptedNodeEntriesPaths(true); $skipEncrypted = array(); foreach ($encryptedNodeEntriesPaths as $fieldName) { $skipEncrypted[] = $fieldName['field']; } //For each group of current section creating separated event change if (isset($postData['groups'])) { foreach ($postData['groups'] as $groupName => $groupData) { foreach ($groupData['fields'] as $fieldName => $fieldValueData) { //Clearing config data accordingly to collected skip fields if (!in_array($fieldName, $skipEncrypted) && isset($fieldValueData['value'])) { $groupFieldsData[$fieldName] = $fieldValueData['value']; } } $processor->addEventChanges(clone $change->setSourceName($groupName)->setOriginalData(array())->setResultData($groupFieldsData)); $groupFieldsData = array(); } } $id = $request->getParam('section'); if (!$id) { $id = 'general'; } return $eventModel->setInfo($id); }
/** * Custom log invitation log action * * @deprecated after 1.6.0.0 * * @param Interprise_Invitation_Model_Invitation $model * @param Enterprise_Logging_Model_Processor $processor * @return Enterprise_Logging_Model_Event_Changes */ public function logInvitationSave($model, $processor) { $processor->collectId($model); return Mage::getModel('enterprise_logging/event_changes')->setOrigibalData(array())->setResultData($model->getData()); }