|
@@ -492,16 +492,11 @@ class BxBaseModGeneralFormsEntryHelper extends BxDolProfileForms
|
|
|
if(($oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) !== false)
|
|
if(($oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) !== false)
|
|
|
$oPrivacy->deleteGroupCustomByContentId($iContentId);
|
|
$oPrivacy->deleteGroupCustomByContentId($iContentId);
|
|
|
|
|
|
|
|
- $mContextId = isset($CNF['FIELD_ALLOW_VIEW_TO']) && !empty($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]) ? -$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']] : false;
|
|
|
|
|
bx_audit(
|
|
bx_audit(
|
|
|
$iContentId,
|
|
$iContentId,
|
|
|
$this->_oModule->getName(),
|
|
$this->_oModule->getName(),
|
|
|
'_sys_audit_action_detete',
|
|
'_sys_audit_action_detete',
|
|
|
- isset($CNF['FIELD_TITLE']) ? $aContentInfo[$CNF['FIELD_TITLE']] : '',
|
|
|
|
|
- isset($CNF['OBJECT_CONTENT_INFO']) ? $CNF['OBJECT_CONTENT_INFO'] : '',
|
|
|
|
|
- $mContextId,
|
|
|
|
|
- ($mContextId && $mContextId != -3) ? BxDolProfile::getInstance($mContextId)->getDisplayName() : '',
|
|
|
|
|
- $aContentInfo
|
|
|
|
|
|
|
+ $this->_prepareAuditParams($aContentInfo)
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
return '';
|
|
return '';
|
|
@@ -534,16 +529,11 @@ class BxBaseModGeneralFormsEntryHelper extends BxDolProfileForms
|
|
|
if(isset($CNF['FIELD_ALLOW_VIEW_TO']) && !empty($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]) && ($oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) !== false)
|
|
if(isset($CNF['FIELD_ALLOW_VIEW_TO']) && !empty($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]) && ($oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) !== false)
|
|
|
$oPrivacy->reassociateGroupCustomWithContent($oProfile->id(), $iContentId, (int)$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]);
|
|
$oPrivacy->reassociateGroupCustomWithContent($oProfile->id(), $iContentId, (int)$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]);
|
|
|
|
|
|
|
|
- $mContextId = isset($CNF['FIELD_ALLOW_VIEW_TO']) && !empty($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]) ? -$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']] : false;
|
|
|
|
|
bx_audit(
|
|
bx_audit(
|
|
|
$iContentId,
|
|
$iContentId,
|
|
|
$this->_oModule->getName(),
|
|
$this->_oModule->getName(),
|
|
|
'_sys_audit_action_edit',
|
|
'_sys_audit_action_edit',
|
|
|
- isset($CNF['FIELD_TITLE']) ? $aContentInfo[$CNF['FIELD_TITLE']] : '',
|
|
|
|
|
- isset($CNF['OBJECT_CONTENT_INFO']) ? $CNF['OBJECT_CONTENT_INFO'] : '',
|
|
|
|
|
- $mContextId,
|
|
|
|
|
- ($mContextId && $mContextId != -3) ? BxDolProfile::getInstance($mContextId)->getDisplayName() : '',
|
|
|
|
|
- $aContentInfo
|
|
|
|
|
|
|
+ $this->_prepareAuditParams($aContentInfo)
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
return '';
|
|
return '';
|
|
@@ -563,16 +553,11 @@ class BxBaseModGeneralFormsEntryHelper extends BxDolProfileForms
|
|
|
if(isset($CNF['FIELD_ALLOW_VIEW_TO']) && !empty($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]) && ($oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) !== false)
|
|
if(isset($CNF['FIELD_ALLOW_VIEW_TO']) && !empty($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]) && ($oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) !== false)
|
|
|
$oPrivacy->associateGroupCustomWithContent($oProfile->id(), $iContentId, (int)$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]);
|
|
$oPrivacy->associateGroupCustomWithContent($oProfile->id(), $iContentId, (int)$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]);
|
|
|
|
|
|
|
|
- $mContextId = isset($CNF['FIELD_ALLOW_VIEW_TO']) && !empty($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]) ? -$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']] : false;
|
|
|
|
|
bx_audit(
|
|
bx_audit(
|
|
|
$iContentId,
|
|
$iContentId,
|
|
|
$this->_oModule->getName(),
|
|
$this->_oModule->getName(),
|
|
|
'_sys_audit_action_add',
|
|
'_sys_audit_action_add',
|
|
|
- isset($CNF['FIELD_TITLE']) ? $aContentInfo[$CNF['FIELD_TITLE']] : '',
|
|
|
|
|
- isset($CNF['OBJECT_CONTENT_INFO']) ? $CNF['OBJECT_CONTENT_INFO'] : '',
|
|
|
|
|
- $mContextId,
|
|
|
|
|
- ($mContextId && $mContextId != -3) ? BxDolProfile::getInstance($mContextId)->getDisplayName() : '',
|
|
|
|
|
- $aContentInfo
|
|
|
|
|
|
|
+ $this->_prepareAuditParams($aContentInfo)
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
return '';
|
|
return '';
|
|
@@ -603,6 +588,23 @@ class BxBaseModGeneralFormsEntryHelper extends BxDolProfileForms
|
|
|
return $s;
|
|
return $s;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private function _prepareAuditParams($aContentInfo)
|
|
|
|
|
+ {
|
|
|
|
|
+ $CNF = &$this->_oModule->_oConfig->CNF;
|
|
|
|
|
+
|
|
|
|
|
+ $iContextId = isset($CNF['FIELD_ALLOW_VIEW_TO']) && (!empty($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]) && (int)$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']] < 0) ? - $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']] : 0;
|
|
|
|
|
+
|
|
|
|
|
+ $AuditParams = array(
|
|
|
|
|
+ 'content_title' => isset($CNF['FIELD_TITLE']) ? $aContentInfo[$CNF['FIELD_TITLE']] : '',
|
|
|
|
|
+ 'context_profile_id' => $iContextId,
|
|
|
|
|
+ 'content_info_object' => isset($CNF['OBJECT_CONTENT_INFO']) ? $CNF['OBJECT_CONTENT_INFO'] : '',
|
|
|
|
|
+ 'data' => $aContentInfo
|
|
|
|
|
+ );
|
|
|
|
|
+ if ($iContextId > 0)
|
|
|
|
|
+ $AuditParams['context_profile_title'] = BxDolProfile::getInstance($iContextId)->getDisplayName();
|
|
|
|
|
+ return $AuditParams;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
protected function prepareResponse($mixedResponse, $bAsJson = false, $sKey = 'msg', $aAdditional = array())
|
|
protected function prepareResponse($mixedResponse, $bAsJson = false, $sKey = 'msg', $aAdditional = array())
|
|
|
{
|
|
{
|
|
|
if(!$bAsJson)
|
|
if(!$bAsJson)
|