Exemple #1
0
 /**
  * Called from popup
  * @param string $entityType
  * @param int $entityId
  * $param array $comment
  */
 public static function OnForumCommentIMNotify($entityType, $entityId, $comment)
 {
     if ($entityType != "WF") {
         return;
     }
     $logQuery = CSocNetLog::getList(array(), array("ID" => $comment["LOG_ID"], "EVENT_ID" => "lists_new_element"), false, false, array("ID", "SOURCE_ID", "URL", "TITLE", "USER_ID", "PARAMS"));
     if (($log = $logQuery->fetch()) && intval($log["SOURCE_ID"]) > 0) {
         $params = unserialize($log["PARAMS"]);
         $title = $log["TITLE"] . " - " . $params["ELEMENT_NAME"];
         CListsLiveFeed::notifyComment(array("LOG_ID" => $log["ID"], "TO_USER_ID" => $log["USER_ID"], "FROM_USER_ID" => $comment["USER_ID"], "URL" => $log["URL"], "TITLE" => $title));
     }
 }
Exemple #2
0
 public static function onWorkflowStatusChange($documentId, $workflowId, $status)
 {
     if ($status == CBPWorkflowStatus::Completed) {
         CListsLiveFeed::setMessageLiveFeed(array(), $documentId, $workflowId, true);
     }
 }
Exemple #3
0
 public static function OnForumCommentIMNotify($entityType, $entityId, $comment)
 {
     return;
     if ($entityType != "WF") {
         return;
     }
     $logQuery = CSocNetLog::getList(array(), array("ID" => $comment["LOG_ID"], "EVENT_ID" => "lists_new_element"), false, false, array("ID", "SOURCE_ID", "URL", "TITLE", "USER_ID"));
     if (($log = $logQuery->fetch()) && intval($log["SOURCE_ID"]) > 0) {
         CListsLiveFeed::notifyComment(array("LOG_ID" => $log["ID"], "TO_USER_ID" => $log["USER_ID"], "FROM_USER_ID" => $comment["USER_ID"], "URL" => $log["URL"], "TITLE" => $log["TITLE"]));
     }
 }