当前位置: 首页>>代码示例>>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;未经允许,请勿转载。