当前位置: 首页>>代码示例>>PHP>>正文


PHP CIBlockElement::WF_GetSqlLimit方法代码示例

本文整理汇总了PHP中CIBlockElement::WF_GetSqlLimit方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockElement::WF_GetSqlLimit方法的具体用法?PHP CIBlockElement::WF_GetSqlLimit怎么用?PHP CIBlockElement::WF_GetSqlLimit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CIBlockElement的用法示例。


在下文中一共展示了CIBlockElement::WF_GetSqlLimit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: UpdateSearch

 function UpdateSearch($ID, $bOverWrite = false)
 {
     if (!CModule::IncludeModule("search")) {
         return;
     }
     global $DB;
     $ID = Intval($ID);
     static $strElementSql = false;
     if (!$strElementSql) {
         $strElementSql = "\n\t\t\t\tSELECT BE.ID, BE.NAME, BE.XML_ID as EXTERNAL_ID,\n\t\t\t\t\tBE.PREVIEW_TEXT_TYPE, BE.PREVIEW_TEXT, BE.CODE,\n\t\t\t\t\tBE.TAGS,\n\t\t\t\t\tBE.DETAIL_TEXT_TYPE, BE.DETAIL_TEXT, BE.IBLOCK_ID, B.IBLOCK_TYPE_ID,\n\t\t\t\t\t" . $DB->DateToCharFunction("BE.TIMESTAMP_X") . " as LAST_MODIFIED,\n\t\t\t\t\t" . $DB->DateToCharFunction("BE.ACTIVE_FROM") . " as DATE_FROM,\n\t\t\t\t\t" . $DB->DateToCharFunction("BE.ACTIVE_TO") . " as DATE_TO,\n\t\t\t\t\tBE.IBLOCK_SECTION_ID,\n\t\t\t\t\tB.CODE as IBLOCK_CODE, B.XML_ID as IBLOCK_EXTERNAL_ID, B.DETAIL_PAGE_URL,\n\t\t\t\t\tB.VERSION, B.RIGHTS_MODE, B.SOCNET_GROUP_ID\n\t\t\t\tFROM b_iblock_element BE, b_iblock B\n\t\t\t\tWHERE BE.IBLOCK_ID=B.ID\n\t\t\t\t\tAND B.ACTIVE='Y'\n\t\t\t\t\tAND BE.ACTIVE='Y'\n\t\t\t\t\tAND B.INDEX_ELEMENT='Y'\n\t\t\t\t\t" . CIBlockElement::WF_GetSqlLimit("BE.", "N") . "\n\t\t\t\t\tAND BE.ID=";
     }
     $dbrIBlockElement = $DB->Query($strElementSql . $ID);
     if ($arIBlockElement = $dbrIBlockElement->Fetch()) {
         $IBLOCK_ID = $arIBlockElement["IBLOCK_ID"];
         $DETAIL_URL = "=ID=" . urlencode($arIBlockElement["ID"]) . "&EXTERNAL_ID=" . urlencode($arIBlockElement["EXTERNAL_ID"]) . "&IBLOCK_SECTION_ID=" . urlencode($arIBlockElement["IBLOCK_SECTION_ID"]) . "&IBLOCK_TYPE_ID=" . urlencode($arIBlockElement["IBLOCK_TYPE_ID"]) . "&IBLOCK_ID=" . urlencode($arIBlockElement["IBLOCK_ID"]) . "&IBLOCK_CODE=" . urlencode($arIBlockElement["IBLOCK_CODE"]) . "&IBLOCK_EXTERNAL_ID=" . urlencode($arIBlockElement["IBLOCK_EXTERNAL_ID"]) . "&CODE=" . urlencode($arIBlockElement["CODE"]);
         static $arGroups = array();
         if (!array_key_exists($IBLOCK_ID, $arGroups)) {
             $arGroups[$IBLOCK_ID] = array();
             $strSql = "SELECT GROUP_ID " . "FROM b_iblock_group " . "WHERE IBLOCK_ID= " . $IBLOCK_ID . " " . "\tAND PERMISSION>='R' " . "ORDER BY GROUP_ID";
             $dbrIBlockGroup = $DB->Query($strSql);
             while ($arIBlockGroup = $dbrIBlockGroup->Fetch()) {
                 $arGroups[$IBLOCK_ID][] = $arIBlockGroup["GROUP_ID"];
                 if ($arIBlockGroup["GROUP_ID"] == 2) {
                     break;
                 }
             }
         }
         static $arSITE = array();
         if (!array_key_exists($IBLOCK_ID, $arSITE)) {
             $arSITE[$IBLOCK_ID] = array();
             $strSql = "SELECT SITE_ID " . "FROM b_iblock_site " . "WHERE IBLOCK_ID= " . $IBLOCK_ID;
             $dbrIBlockSite = $DB->Query($strSql);
             while ($arIBlockSite = $dbrIBlockSite->Fetch()) {
                 $arSITE[$IBLOCK_ID][] = $arIBlockSite["SITE_ID"];
             }
         }
         $BODY = ($arIBlockElement["PREVIEW_TEXT_TYPE"] == "html" ? CSearch::KillTags($arIBlockElement["PREVIEW_TEXT"]) : $arIBlockElement["PREVIEW_TEXT"]) . "\r\n" . ($arIBlockElement["DETAIL_TEXT_TYPE"] == "html" ? CSearch::KillTags($arIBlockElement["DETAIL_TEXT"]) : $arIBlockElement["DETAIL_TEXT"]);
         static $arProperties = array();
         if (!array_key_exists($IBLOCK_ID, $arProperties)) {
             $arProperties[$IBLOCK_ID] = array();
             $rsProperties = CIBlockProperty::GetList(array("sort" => "asc", "id" => "asc"), array("IBLOCK_ID" => $IBLOCK_ID, "ACTIVE" => "Y", "SEARCHABLE" => "Y", "CHECK_PERMISSIONS" => "N"));
             while ($ar = $rsProperties->Fetch()) {
                 if (strlen($ar["USER_TYPE"]) > 0) {
                     $arUT = CIBlockProperty::GetUserType($ar["USER_TYPE"]);
                     if (array_key_exists("GetSearchContent", $arUT)) {
                         $ar["GetSearchContent"] = $arUT["GetSearchContent"];
                     } elseif (array_key_exists("GetPublicViewHTML", $arUT)) {
                         $ar["GetSearchContent"] = $arUT["GetPublicViewHTML"];
                     }
                 }
                 $arProperties[$IBLOCK_ID][$ar["ID"]] = $ar;
             }
         }
         //Read current property values from database
         $strProperties = "";
         if (count($arProperties[$IBLOCK_ID]) > 0) {
             if ($arIBlockElement["VERSION"] == 1) {
                 $rs = $DB->Query("\n\t\t\t\t\t\tselect *\n\t\t\t\t\t\tfrom b_iblock_element_property\n\t\t\t\t\t\twhere IBLOCK_ELEMENT_ID=" . $arIBlockElement["ID"] . "\n\t\t\t\t\t\tAND IBLOCK_PROPERTY_ID in (" . implode(", ", array_keys($arProperties[$IBLOCK_ID])) . ")\n\t\t\t\t\t");
                 while ($ar = $rs->Fetch()) {
                     $strProperties .= "\r\n";
                     $arProperty = $arProperties[$IBLOCK_ID][$ar["IBLOCK_PROPERTY_ID"]];
                     if ($arProperty["GetSearchContent"]) {
                         $strProperties .= CSearch::KillTags(call_user_func_array($arProperty["GetSearchContent"], array($arProperty, array("VALUE" => $ar["VALUE"]), array())));
                     } elseif ($arProperty["PROPERTY_TYPE"] == 'L') {
                         $arEnum = CIBlockPropertyEnum::GetByID($ar["VALUE"]);
                         if ($arEnum !== false) {
                             $strProperties .= $arEnum["VALUE"];
                         }
                     } elseif ($arProperty["PROPERTY_TYPE"] == 'F') {
                         $arFile = CIBlockElement::__GetFileContent($ar["VALUE"]);
                         if (is_array($arFile)) {
                             $strProperties .= $arFile["CONTENT"];
                             $arIBlockElement["TAGS"] .= "," . $arFile["PROPERTIES"][COption::GetOptionString("search", "page_tag_property")];
                         }
                     } else {
                         $strProperties .= $ar["VALUE"];
                     }
                 }
             } else {
                 $rs = $DB->Query("\n\t\t\t\t\t\tselect *\n\t\t\t\t\t\tfrom b_iblock_element_prop_m" . $IBLOCK_ID . "\n\t\t\t\t\t\twhere IBLOCK_ELEMENT_ID=" . $arIBlockElement["ID"] . "\n\t\t\t\t\t\tAND IBLOCK_PROPERTY_ID in (" . implode(", ", array_keys($arProperties[$IBLOCK_ID])) . ")\n\t\t\t\t\t");
                 while ($ar = $rs->Fetch()) {
                     $strProperties .= "\r\n";
                     $arProperty = $arProperties[$IBLOCK_ID][$ar["IBLOCK_PROPERTY_ID"]];
                     if ($arProperty["GetSearchContent"]) {
                         $strProperties .= CSearch::KillTags(call_user_func_array($arProperty["GetSearchContent"], array($arProperty, array("VALUE" => $ar["VALUE"]), array())));
                     } elseif ($arProperty["PROPERTY_TYPE"] == 'L') {
                         $arEnum = CIBlockPropertyEnum::GetByID($ar["VALUE"]);
                         if ($arEnum !== false) {
                             $strProperties .= $arEnum["VALUE"];
                         }
                     } elseif ($arProperty["PROPERTY_TYPE"] == 'F') {
                         $arFile = CIBlockElement::__GetFileContent($ar["VALUE"]);
                         if (is_array($arFile)) {
                             $strProperties .= $arFile["CONTENT"];
                             $arIBlockElement["TAGS"] .= "," . $arFile["PROPERTIES"][COption::GetOptionString("search", "page_tag_property")];
                         }
                     } else {
                         $strProperties .= $ar["VALUE"];
                     }
                 }
//.........这里部分代码省略.........
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:101,代码来源:iblockelement.php

示例2: GetListEx

	public static function GetListEx($arOrder=array("SORT"=>"ASC"), $arFilter=array())
	{
		return false;
		global $DB, $USER;

		$arSqlSearch = CIBlockElement::MkFilter($arFilter);
		$bSections = false;
		if($arSqlSearch["SECTION"]=="Y")
		{
			$bSections = true;
			unset($arSqlSearch["SECTION"]);
		}
		$strSqlSearch = "";
		for ($i = 0, $intCount = count($arSqlSearch); $i < $intCount; $i++)
			$strSqlSearch .= " AND (".$arSqlSearch[$i].") ";

		$MAX_LOCK = intval(COption::GetOptionString("workflow", "MAX_LOCK_TIME", "60"));
		$uid = intval($USER->GetID());

		$db_groups = CCatalogGroup::GetList(array("SORT" => "ASC"));
		$strSelectPart = "";
		$strFromPart = "";
		$i = -1;
		while ($groups = $db_groups->Fetch())
		{
			$i++;
			$strSelectPart .= ", P".$i.".PRICE as PRICE".$i.", P".$i.".CURRENCY as CURRENCY".$i.", P".$i.".CATALOG_GROUP_ID as CATALOG_GROUP_ID".$i.", P".$i.".ID as PRICE_ID".$i." ";
			$strFromPart .= " LEFT JOIN b_catalog_price P".$i." ON (P".$i.".PRODUCT_ID = BE.ID AND P".$i.".CATALOG_GROUP_ID = ".$groups["ID"].") ";
		}
		$maxInd = $i;

		if (!$USER->IsAdmin())
		{
			$strSql =
				"SELECT DISTINCT BE.*, ".
				"	".$DB->DateToCharFunction("BE.TIMESTAMP_X")." as TIMESTAMP_X, ".
				"	".$DB->DateToCharFunction("BE.ACTIVE_FROM", "SHORT")." as ACTIVE_FROM, ".
				"	".$DB->DateToCharFunction("BE.ACTIVE_TO", "SHORT")." as ACTIVE_TO, ".
				"	".$DB->DateToCharFunction("BE.WF_DATE_LOCK")." as WF_DATE_LOCK, ".
				"	L.DIR as LANG_DIR, B.DETAIL_PAGE_URL, B.LIST_PAGE_URL, ".
				"	CAP.QUANTITY, CAP.QUANTITY_RESERVED, IF (CAP.QUANTITY_TRACE = 'D', '".$DB->ForSql(COption::GetOptionString('catalog','default_quantity_trace','N'))."', CAP.QUANTITY_TRACE) as QUANTITY_TRACE, CAP.WEIGHT, ".
				"   IF (CAP.CAN_BUY_ZERO = 'D', '".$DB->ForSql(COption::GetOptionString('catalog','default_can_buy_zero','N'))."', CAP.CAN_BUY_ZERO) as CAN_BUY_ZERO, ".
				"   IF (CAP.NEGATIVE_AMOUNT_TRACE = 'D', '".$DB->ForSql(COption::GetOptionString('catalog','allow_negative_amount','N'))."', CAP.NEGATIVE_AMOUNT_TRACE) as NEGATIVE_AMOUNT_TRACE, ".
				"	CAP.VAT_ID, CAP.VAT_INCLUDED, ".
				"	CAP.PRICE_TYPE, CAP.RECUR_SCHEME_TYPE, CAP.RECUR_SCHEME_LENGTH, CAP.TRIAL_PRICE_ID, ".
				"	CAP.WITHOUT_ORDER, CAP.SELECT_BEST_PRICE, CAP.PURCHASING_PRICE, CAP.PURCHASING_CURRENCY, CAP.BARCODE_MULTI, ".
				"	CAP.TMP_ID ".
				"	".$strSelectPart." ".
				"FROM b_iblock_element BE, b_lang L, ".
				($bSections?"b_iblock_section_element BSE,":"").
				"	b_iblock B ".
				"	LEFT JOIN b_iblock_group IBG ON IBG.IBLOCK_ID = B.ID ".
				"	LEFT JOIN b_catalog_product CAP ON BE.ID = CAP.ID ".
				"	".$strFromPart." ".
				"WHERE BE.IBLOCK_ID = B.ID ".
				"	AND B.LID = L.LID ".
				($bSections?"	AND BSE.IBLOCK_ELEMENT_ID = BE.ID ":"").
				"	AND IBG.GROUP_ID IN (".$USER->GetGroups().") ".
				"	".CIBlockElement::WF_GetSqlLimit("BE.", $SHOW_NEW)." ".
				"	AND IBG.PERMISSION>='".(strlen($arFilter["MIN_PERMISSION"])==1 ? $arFilter["MIN_PERMISSION"] : "R")."' ".
				"	AND (IBG.PERMISSION='X' OR B.ACTIVE='Y') ".
				"	".$strSqlSearch." ";
		}
		else
		{
			$strSql =
				"SELECT BE.*, ".
				"	".$DB->DateToCharFunction("BE.TIMESTAMP_X")." as TIMESTAMP_X, ".
				"	".$DB->DateToCharFunction("BE.ACTIVE_FROM", "SHORT")." as ACTIVE_FROM, ".
				"	".$DB->DateToCharFunction("BE.ACTIVE_TO", "SHORT")." as ACTIVE_TO, ".
				"	".$DB->DateToCharFunction("BE.WF_DATE_LOCK")." as WF_DATE_LOCK, ".
				"	L.DIR as LANG_DIR, B.DETAIL_PAGE_URL, B.LIST_PAGE_URL, ".
				"	CAP.QUANTITY, CAP.QUANTITY_RESERVED, IF (CAP.QUANTITY_TRACE = 'D', '".$DB->ForSql(COption::GetOptionString('catalog','default_quantity_trace','N'))."', CAP.QUANTITY_TRACE)  as QUANTITY_TRACE, CAP.WEIGHT, ".
				"   IF (CAP.CAN_BUY_ZERO = 'D', '".$DB->ForSql(COption::GetOptionString('catalog','default_can_buy_zero','N'))."', CAP.CAN_BUY_ZERO) as CAN_BUY_ZERO, ".
				"   IF (CAP.NEGATIVE_AMOUNT_TRACE = 'D', '".$DB->ForSql(COption::GetOptionString('catalog','allow_negative_amount','N'))."', CAP.NEGATIVE_AMOUNT_TRACE) as NEGATIVE_AMOUNT_TRACE, ".
				"	CAP.VAT_ID, CAP.VAT_INCLUDED, ".
				"	CAP.PRICE_TYPE, CAP.RECUR_SCHEME_TYPE, CAP.RECUR_SCHEME_LENGTH, CAP.TRIAL_PRICE_ID, ".
				"	CAP.WITHOUT_ORDER, CAP.SELECT_BEST_PRICE, CAP.PURCHASING_PRICE, CAP.PURCHASING_CURRENCY, CAP.BARCODE_MULTI, ".
				"	CAP.TMP_ID ".
				"	".$strSelectPart." ".
				"FROM  b_iblock B, b_lang L, ".
				($bSections?"b_iblock_section_element BSE,":"").
				"	b_iblock_element BE ".
				"	LEFT JOIN b_catalog_product CAP ON BE.ID = CAP.ID ".
				"	".$strFromPart." ".
				"WHERE BE.IBLOCK_ID = B.ID ".
				($bSections?"	AND BSE.IBLOCK_ELEMENT_ID = BE.ID ":"").
				"	".CIBlockElement::WF_GetSqlLimit("BE.",$SHOW_NEW)." ".
				"	AND B.LID = L.LID ".
				"	".$strSqlSearch." ";
		}

		$arSqlOrder = array();
		foreach($arOrder as $by=>$order)
		{
			$by = strtoupper($by);
			$order = strtoupper($order);
			if ($order!="ASC") $order = "DESC";

			if ($by == "ID")				$arSqlOrder[] = " BE.ID ".$order." ";
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:101,代码来源:product.php

示例3: OnSearchReindex

 public static function OnSearchReindex($NS = array(), $oCallback = NULL, $callback_method = "")
 {
     /** @global CUserTypeManager $USER_FIELD_MANAGER */
     global $USER_FIELD_MANAGER;
     /** $global CDatabase $DB */
     global $DB;
     $strNSJoin1 = "";
     $strNSFilter1 = "";
     $strNSFilter2 = "";
     $strNSFilter3 = "";
     $arResult = array();
     if ($NS["MODULE"] == "iblock" && strlen($NS["ID"]) > 0) {
         $arrTmp = explode(".", $NS["ID"]);
         $strNSFilter1 = " AND B.ID>=" . IntVal($arrTmp[0]) . " ";
         if (substr($arrTmp[1], 0, 1) != 'S') {
             $strNSFilter2 = " AND BE.ID>" . IntVal($arrTmp[1]) . " ";
         } else {
             $strNSFilter2 = false;
             $strNSFilter3 = " AND BS.ID>" . IntVal(substr($arrTmp[1], 1)) . " ";
         }
     }
     if ($NS["SITE_ID"] != "") {
         $strNSJoin1 .= " INNER JOIN b_iblock_site BS ON BS.IBLOCK_ID=B.ID ";
         $strNSFilter1 .= " AND BS.SITE_ID='" . $DB->ForSQL($NS["SITE_ID"]) . "' ";
     }
     $strSql = "\n\t\t\tSELECT B.ID, B.IBLOCK_TYPE_ID, B.INDEX_ELEMENT, B.INDEX_SECTION, B.RIGHTS_MODE,\n\t\t\t\tB.IBLOCK_TYPE_ID, B.CODE as IBLOCK_CODE, B.XML_ID as IBLOCK_EXTERNAL_ID\n\t\t\tFROM b_iblock B\n\t\t\t" . $strNSJoin1 . "\n\t\t\tWHERE B.ACTIVE = 'Y'\n\t\t\t\tAND (B.INDEX_ELEMENT='Y' OR B.INDEX_SECTION='Y')\n\t\t\t\t" . $strNSFilter1 . "\n\t\t\tORDER BY B.ID\n\t\t";
     $dbrIBlock = $DB->Query($strSql);
     while ($arIBlock = $dbrIBlock->Fetch()) {
         $IBLOCK_ID = $arIBlock["ID"];
         $arGroups = array();
         $strSql = "SELECT GROUP_ID " . "FROM b_iblock_group " . "WHERE IBLOCK_ID= " . $IBLOCK_ID . " " . "\tAND PERMISSION>='R' " . "\tAND GROUP_ID>1 " . "ORDER BY GROUP_ID";
         $dbrIBlockGroup = $DB->Query($strSql);
         while ($arIBlockGroup = $dbrIBlockGroup->Fetch()) {
             $arGroups[] = $arIBlockGroup["GROUP_ID"];
             if ($arIBlockGroup["GROUP_ID"] == 2) {
                 break;
             }
         }
         $arSITE = array();
         $strSql = "SELECT SITE_ID " . "FROM b_iblock_site " . "WHERE IBLOCK_ID= " . $IBLOCK_ID;
         $dbrIBlockSite = $DB->Query($strSql);
         while ($arIBlockSite = $dbrIBlockSite->Fetch()) {
             $arSITE[] = $arIBlockSite["SITE_ID"];
         }
         if ($arIBlock["INDEX_ELEMENT"] == 'Y' && $strNSFilter2 !== false) {
             $strSql = "SELECT BE.ID, BE.NAME, BE.TAGS, " . "\t" . $DB->DateToCharFunction("BE.ACTIVE_FROM") . " as DATE_FROM, " . "\t" . $DB->DateToCharFunction("BE.ACTIVE_TO") . " as DATE_TO, " . "\t" . $DB->DateToCharFunction("BE.TIMESTAMP_X") . " as LAST_MODIFIED, " . "\tBE.PREVIEW_TEXT_TYPE, BE.PREVIEW_TEXT, " . "\tBE.DETAIL_TEXT_TYPE, BE.DETAIL_TEXT, " . "\tBE.XML_ID as EXTERNAL_ID, BE.CODE, " . "\tBE.IBLOCK_SECTION_ID " . "FROM b_iblock_element BE " . "WHERE BE.IBLOCK_ID=" . $IBLOCK_ID . " " . "\tAND BE.ACTIVE='Y' " . CIBlockElement::WF_GetSqlLimit("BE.", "N") . $strNSFilter2 . "ORDER BY BE.ID ";
             //For MySQL we have to solve client out of memory
             //problem by limiting the query
             if ($DB->type == "MYSQL") {
                 $limit = 1000;
                 $strSql .= " LIMIT " . $limit;
             } else {
                 $limit = false;
             }
             $dbrIBlockElement = $DB->Query($strSql);
             while ($arIBlockElement = $dbrIBlockElement->Fetch()) {
                 $DETAIL_URL = "=ID=" . $arIBlockElement["ID"] . "&EXTERNAL_ID=" . $arIBlockElement["EXTERNAL_ID"] . "&CODE=" . $arIBlockElement["CODE"] . "&IBLOCK_SECTION_ID=" . $arIBlockElement["IBLOCK_SECTION_ID"] . "&IBLOCK_TYPE_ID=" . $arIBlock["IBLOCK_TYPE_ID"] . "&IBLOCK_ID=" . $IBLOCK_ID . "&IBLOCK_CODE=" . $arIBlock["IBLOCK_CODE"] . "&IBLOCK_EXTERNAL_ID=" . $arIBlock["IBLOCK_EXTERNAL_ID"];
                 $BODY = ($arIBlockElement["PREVIEW_TEXT_TYPE"] == "html" ? CSearch::KillTags($arIBlockElement["PREVIEW_TEXT"]) : $arIBlockElement["PREVIEW_TEXT"]) . "\r\n" . ($arIBlockElement["DETAIL_TEXT_TYPE"] == "html" ? CSearch::KillTags($arIBlockElement["DETAIL_TEXT"]) : $arIBlockElement["DETAIL_TEXT"]);
                 $dbrProperties = CIBlockElement::GetProperty($IBLOCK_ID, $arIBlockElement["ID"], "sort", "asc", array("ACTIVE" => "Y", "SEARCHABLE" => "Y"));
                 while ($arProperties = $dbrProperties->Fetch()) {
                     $BODY .= "\r\n";
                     if (strlen($arProperties["USER_TYPE"]) > 0) {
                         $UserType = CIBlockProperty::GetUserType($arProperties["USER_TYPE"]);
                     } else {
                         $UserType = array();
                     }
                     if (array_key_exists("GetSearchContent", $UserType)) {
                         $BODY .= CSearch::KillTags(call_user_func_array($UserType["GetSearchContent"], array($arProperties['ID'], array("VALUE" => $arProperties["VALUE"]), array())));
                     } elseif (array_key_exists("GetPublicViewHTML", $UserType)) {
                         $BODY .= CSearch::KillTags(call_user_func_array($UserType["GetPublicViewHTML"], array($arProperties['ID'], array("VALUE" => $arProperties["VALUE"]), array())));
                     } elseif ($arProperties["PROPERTY_TYPE"] == 'L') {
                         $BODY .= $arProperties["VALUE_ENUM"];
                     } elseif ($arProperties["PROPERTY_TYPE"] == 'F') {
                         $arFile = CIBlockElement::__GetFileContent($arProperties["VALUE"]);
                         if (is_array($arFile)) {
                             $BODY .= $arFile["CONTENT"];
                             $arIBlockElement["TAGS"] .= "," . $arFile["PROPERTIES"][COption::GetOptionString("search", "page_tag_property")];
                         }
                     } else {
                         $BODY .= $arProperties["VALUE"];
                     }
                 }
                 if ($arIBlock["RIGHTS_MODE"] !== "E") {
                     $arPermissions = $arGroups;
                 } else {
                     $obElementRights = new CIBlockElementRights($IBLOCK_ID, $arIBlockElement["ID"]);
                     $arPermissions = $obElementRights->GetGroups(array("element_read"));
                 }
                 $Result = array("ID" => $arIBlockElement["ID"], "LAST_MODIFIED" => strlen($arIBlockElement["DATE_FROM"]) > 0 ? $arIBlockElement["DATE_FROM"] : $arIBlockElement["LAST_MODIFIED"], "TITLE" => $arIBlockElement["NAME"], "BODY" => $BODY, "TAGS" => $arIBlockElement["TAGS"], "SITE_ID" => $arSITE, "PARAM1" => $arIBlock["IBLOCK_TYPE_ID"], "PARAM2" => $IBLOCK_ID, "DATE_FROM" => strlen($arIBlockElement["DATE_FROM"]) > 0 ? $arIBlockElement["DATE_FROM"] : false, "DATE_TO" => strlen($arIBlockElement["DATE_TO"]) > 0 ? $arIBlockElement["DATE_TO"] : false, "PERMISSIONS" => $arPermissions, "URL" => $DETAIL_URL);
                 if ($oCallback) {
                     $res = call_user_func(array($oCallback, $callback_method), $Result);
                     if (!$res) {
                         return $IBLOCK_ID . "." . $arIBlockElement["ID"];
                     }
                 } else {
                     $arResult[] = $Result;
                 }
                 if ($limit !== false) {
                     $limit--;
                     if ($limit <= 0) {
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:101,代码来源:iblock.php


注:本文中的CIBlockElement::WF_GetSqlLimit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。