|
@@ -133,19 +133,11 @@ class BxBaseModTextFormsEntryHelper extends BxBaseModGeneralFormsEntryHelper
|
|
|
$iId = (int)$aContentInfo[$CNF['FIELD_ID']];
|
|
$iId = (int)$aContentInfo[$CNF['FIELD_ID']];
|
|
|
$iAuthorId = (int)$aContentInfo[$CNF['FIELD_AUTHOR']];
|
|
$iAuthorId = (int)$aContentInfo[$CNF['FIELD_AUTHOR']];
|
|
|
|
|
|
|
|
- $aParams = array('object_author_id' => $iAuthorId);
|
|
|
|
|
- if(isset($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]))
|
|
|
|
|
- $aParams['privacy_view'] = $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']];
|
|
|
|
|
- if(!empty($CNF['OBJECT_METATAGS']))
|
|
|
|
|
- $aParams['timeline_group'] = array(
|
|
|
|
|
- 'by' => $this->_oModule->_oConfig->getName() . '_' . $iAuthorId . '_' . $iId,
|
|
|
|
|
- 'field' => 'owner_id'
|
|
|
|
|
- );
|
|
|
|
|
-
|
|
|
|
|
$sAction = 'added';
|
|
$sAction = 'added';
|
|
|
if(isset($CNF['FIELD_STATUS']) && isset($aContentInfo[$CNF['FIELD_STATUS']]) && $aContentInfo[$CNF['FIELD_STATUS']] == 'awaiting')
|
|
if(isset($CNF['FIELD_STATUS']) && isset($aContentInfo[$CNF['FIELD_STATUS']]) && $aContentInfo[$CNF['FIELD_STATUS']] == 'awaiting')
|
|
|
$sAction = 'deferred';
|
|
$sAction = 'deferred';
|
|
|
|
|
|
|
|
|
|
+ $aParams = $this->_alertParams($aContentInfo);
|
|
|
bx_alert($this->_oModule->getName(), $sAction, $iId, $iAuthorId, $aParams);
|
|
bx_alert($this->_oModule->getName(), $sAction, $iId, $iAuthorId, $aParams);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -153,11 +145,34 @@ class BxBaseModTextFormsEntryHelper extends BxBaseModGeneralFormsEntryHelper
|
|
|
{
|
|
{
|
|
|
$CNF = &$this->_oModule->_oConfig->CNF;
|
|
$CNF = &$this->_oModule->_oConfig->CNF;
|
|
|
|
|
|
|
|
- $aParams = array('object_author_id' => $aContentInfo[$CNF['FIELD_AUTHOR']]);
|
|
|
|
|
|
|
+ $iId = (int)$aContentInfo[$CNF['FIELD_ID']];
|
|
|
|
|
+
|
|
|
|
|
+ $aParams = $this->_alertParams($aContentInfo);
|
|
|
|
|
+ bx_alert($this->_oModule->getName(), 'edited', $iId, false, $aParams);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Get array of params to be passed in Add/Edit Alert.
|
|
|
|
|
+ */
|
|
|
|
|
+ protected function _alertParams($aContentInfo)
|
|
|
|
|
+ {
|
|
|
|
|
+ $CNF = &$this->_oModule->_oConfig->CNF;
|
|
|
|
|
+
|
|
|
|
|
+ $iId = (int)$aContentInfo[$CNF['FIELD_ID']];
|
|
|
|
|
+ $iAuthorId = (int)$aContentInfo[$CNF['FIELD_AUTHOR']];
|
|
|
|
|
+
|
|
|
|
|
+ $aParams = array(
|
|
|
|
|
+ 'object_author_id' => $iAuthorId
|
|
|
|
|
+ );
|
|
|
if(isset($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]))
|
|
if(isset($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]))
|
|
|
- $aParams['privacy_view'] = $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']];
|
|
|
|
|
|
|
+ $aParams['privacy_view'] = $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']];
|
|
|
|
|
+ if(!empty($CNF['OBJECT_METATAGS']))
|
|
|
|
|
+ $aParams['timeline_group'] = array(
|
|
|
|
|
+ 'by' => $this->_oModule->_oConfig->getName() . '_' . $iAuthorId . '_' . $iId,
|
|
|
|
|
+ 'field' => 'owner_id'
|
|
|
|
|
+ );
|
|
|
|
|
|
|
|
- bx_alert($this->_oModule->getName(), 'edited', $aContentInfo[$CNF['FIELD_ID']], false, $aParams);
|
|
|
|
|
|
|
+ return $aParams;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|