當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CPullOptions::getNginxStatus方法代碼示例

本文整理匯總了PHP中CPullOptions::getNginxStatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP CPullOptions::getNginxStatus方法的具體用法?PHP CPullOptions::getNginxStatus怎麽用?PHP CPullOptions::getNginxStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CPullOptions的用法示例。


在下文中一共展示了CPullOptions::getNginxStatus方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: addComment

 public function addComment($authorId, array $data)
 {
     $return = null;
     if (($res = $this->getDataToShow($authorId)) && !empty($res) && ($res2 = $this->getDataToCheck($this->entityId)) && !empty($res2)) {
         list($message, $topic, $forum) = $res2;
         $messageFields = array("POST_MESSAGE" => $data["text"], "PARAM2" => $this->entityId, "APPROVED" => "Y", "PERMISSION_EXTERNAL" => "I", "PERMISSION" => "I");
         if ($forum["DEDUPLICATION"] == "Y") {
             \CForumNew::update($forum["ID"], array("DEDUPLICATION" => "N"), false);
         }
         if (!empty($data['fileId'])) {
             $messageFields['UF_FORUM_MESSAGE_DOC'] = array($data['fileId']);
             $GLOBALS["UF_FORUM_MESSAGE_DOC"] = array($data['fileId']);
         } elseif (!empty($data['versionId'])) {
             $messageFields['UF_FORUM_MESSAGE_VER'] = $data['versionId'];
             $GLOBALS["UF_FORUM_MESSAGE_VER"] = $data['versionId'];
         }
         $comId = ForumAddMessage("REPLY", $message["FORUM_ID"], $message["TOPIC_ID"], 0, $messageFields, $strErrorMessage, $strOKMessage);
         if ($res['DUPLICATE_TO_SOCNET'] == "Y" && $comId > 0 && Loader::includeModule("socialnetwork")) {
             if ($res['DUPLICATE_TO_SOCNET'] == "Y") {
                 $arFieldsForSocnet = array("USER_ID" => $authorId, '=LOG_DATE' => $GLOBALS['DB']->currentTimeFunction(), "ENTITY_TYPE" => $res["ENTITY_TYPE"], "ENTITY_ID" => $res["ENTITY_ID"], "EVENT_ID" => $res["EVENT_ID"], "MESSAGE" => $data["text"], "TEXT_MESSAGE" => $data["text"], "URL" => $res["DETAIL_URL"], "MODULE_ID" => $res["MODULE_ID"], "SOURCE_ID" => $comId, "LOG_ID" => $res["LOG_ID"], "RATING_TYPE_ID" => "FORUM_POST", "RATING_ENTITY_ID" => $comId);
                 if (!empty($data['fileId'])) {
                     $arFieldsForSocnet['UF_SONET_COM_DOC'] = array($data['fileId']);
                     $GLOBALS["UF_SONET_COM_DOC"] = array($data['fileId']);
                 } elseif (!empty($data['versionId'])) {
                     $arFieldsForSocnet['UF_SONET_COM_VER'] = $data['versionId'];
                     $GLOBALS["UF_SONET_COM_VER"] = $data['versionId'];
                 }
                 \CSocNetLogComments::add($arFieldsForSocnet, false, false, false);
             }
         }
         if ($comId > 0 && Loader::includeModule("pull") && \CPullOptions::getNginxStatus() && $res["DETAIL_URL"] !== null) {
             \CPullWatch::addToStack("UNICOMMENTS" . $topic["XML_ID"], array('module_id' => "unicomments", 'command' => "comment", 'params' => array("AUTHOR_ID" => $authorId, "ID" => $comId, "POST_ID" => $this->entityId, "TS" => time(), "ACTION" => "REPLY", "URL" => array("LINK" => str_replace("MID=" . $this->entityId, "MID=" . $comId, $res["DETAIL_URL"])), "ENTITY_XML_ID" => $topic["XML_ID"], "APPROVED" => "Y", "NEED_REQUEST" => "Y")));
         }
     }
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:35,代碼來源:forummessageconnector.php


注:本文中的CPullOptions::getNginxStatus方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。