本文整理汇总了PHP中CSearch::ReIndexModule方法的典型用法代码示例。如果您正苦于以下问题:PHP CSearch::ReIndexModule方法的具体用法?PHP CSearch::ReIndexModule怎么用?PHP CSearch::ReIndexModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSearch
的用法示例。
在下文中一共展示了CSearch::ReIndexModule方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: InstallDB
function InstallDB($install_wizard = true)
{
global $DB, $DBType, $APPLICATION, $install_smiles;
if (!$DB->Query("SELECT 'x' FROM b_blog_user_group", true))
{
$errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/blog/install/".$DBType."/install.sql");
COption::SetOptionString("blog", "socNetNewPerms", "Y");
}
if (empty($errors))
{
$errors = $this->InstallUserFields();
}
if (!empty($errors))
{
$APPLICATION->ThrowException(implode("", $errors));
return false;
}
RegisterModule("blog");
RegisterModuleDependences("search", "OnReindex", "blog", "CBlogSearch", "OnSearchReindex");
RegisterModuleDependences("main", "OnUserDelete", "blog", "CBlogUser", "Delete");
RegisterModuleDependences("main", "OnSiteDelete", "blog", "CBlogSitePath", "DeleteBySiteID");
RegisterModuleDependences("socialnetwork", "OnSocNetGroupDelete", "blog", "CBlogSoNetPost", "OnGroupDelete");
RegisterModuleDependences("socialnetwork", "OnSocNetFeaturesAdd", "blog", "CBlogSearch", "SetSoNetFeatureIndexSearch");
RegisterModuleDependences("socialnetwork", "OnSocNetFeaturesUpdate", "blog", "CBlogSearch", "SetSoNetFeatureIndexSearch");
RegisterModuleDependences("socialnetwork", "OnSocNetFeaturesPermsAdd", "blog", "CBlogSearch", "SetSoNetFeaturePermIndexSearch");
RegisterModuleDependences("socialnetwork", "OnSocNetFeaturesPermsUpdate", "blog", "CBlogSearch", "SetSoNetFeaturePermIndexSearch");
RegisterModuleDependences("main", "OnAfterAddRating", "blog", "CRatingsComponentsBlog", "OnAfterAddRating", 200);
RegisterModuleDependences("main", "OnAfterUpdateRating", "blog", "CRatingsComponentsBlog", "OnAfterUpdateRating", 200);
RegisterModuleDependences("main", "OnSetRatingsConfigs", "blog", "CRatingsComponentsBlog", "OnSetRatingConfigs", 200);
RegisterModuleDependences("main", "OnGetRatingsConfigs", "blog", "CRatingsComponentsBlog", "OnGetRatingConfigs", 200);
RegisterModuleDependences("main", "OnGetRatingsObjects", "blog", "CRatingsComponentsBlog", "OnGetRatingObject", 200);
RegisterModuleDependences("main", "OnGetRatingContentOwner", "blog", "CRatingsComponentsBlog", "OnGetRatingContentOwner", 200);
RegisterModuleDependences("im", "OnGetNotifySchema", "blog", "CBlogNotifySchema", "OnGetNotifySchema");
RegisterModuleDependences("main", "OnAfterRegisterModule", "main", "blog", "installUserFields", 100, "/modules/blog/install/index.php"); // check UF
RegisterModuleDependences('conversion', 'OnGetCounterTypes' , 'blog', '\Bitrix\Blog\Internals\ConversionHandlers', 'onGetCounterTypes');
RegisterModuleDependences('conversion', 'OnGetRateTypes' , 'blog', '\Bitrix\Blog\Internals\ConversionHandlers', 'onGetRateTypes');
RegisterModuleDependences('blog', 'OnPostAdd', 'blog', '\Bitrix\Blog\Internals\ConversionHandlers', 'onPostAdd');
CModule::IncludeModule("blog");
if (CModule::IncludeModule("search"))
CSearch::ReIndexModule("blog");
if($install_smiles == "Y" || $install_wizard)
{
$dbSmile = CBlogSmile::GetList();
if(!($dbSmile->Fetch()))
{
$arSmile = Array(
Array(
"TYPING" => ":D :-D",
"IMAGE" => "icon_biggrin.png",
"FICON_SMILE" => "FICON_BIGGRIN",
"SORT" => "120",
),
Array(
"TYPING" => ":) :-)",
"IMAGE" => "icon_smile.png",
"FICON_SMILE" => "FICON_SMILE",
"SORT" => "100",
),
Array(
"TYPING" => ":( :-(",
"IMAGE" => "icon_sad.png",
"FICON_SMILE" => "FICON_SAD",
"SORT" => "140",
),
Array(
"TYPING" => ":o :-o :shock:",
"IMAGE" => "icon_eek.png",
"FICON_SMILE" => "FICON_EEK",
"SORT" => "180",
),
Array(
"TYPING" => "8) 8-)",
"IMAGE" => "icon_cool.png",
"FICON_SMILE" => "FICON_COOL",
"SORT" => "130",
),
Array(
"TYPING" => ":{} :-{}",
"IMAGE" => "icon_kiss.png",
"FICON_SMILE" => "FICON_KISS",
"SORT" => "200",
),
Array(
"TYPING" => ":oops:",
"IMAGE" => "icon_redface.png",
"FICON_SMILE" => "FICON_REDFACE",
"SORT" => "190",
//.........这里部分代码省略.........
示例2: DoInstall
function DoInstall()
{
$GLOBALS["errors"] = false;
if (IsModuleInstalled("forum")) {
return false;
}
if (!check_bitrix_sessid()) {
return false;
}
$this->errors = false;
$step = IntVal($_REQUEST["step"]);
if ($step != 2) {
$GLOBALS["APPLICATION"]->IncludeAdminFile(GetMessage("FORUM_INSTALL1"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/forum/install/do_install1.php");
} else {
// Check Fatal errors
if (!$this->InstallDB() || !empty($this->errors)) {
$GLOBALS["errors"] = $this->errors;
$GLOBALS["APPLICATION"]->IncludeAdminFile(GetMessage("FORUM_INSTALL2"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/forum/install/do_install2.php");
}
$this->InstallEvents();
$this->InstallFiles();
if ($_REQUEST["install_forum"] == "Y" && $_REQUEST["REINDEX"] == "Y") {
CModule::IncludeModule("forum");
if (CModule::IncludeModule("search")) {
CSearch::ReIndexModule("forum");
}
}
$GLOBALS["errors"] = $this->errors;
$GLOBALS["APPLICATION"]->IncludeAdminFile(GetMessage("FORUM_INSTALL2"), $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/forum/install/do_install2.php");
}
return empty($this->errors);
}
示例3: InstallDB
function InstallDB($install_wizard = true)
{
global $DB, $DBType, $APPLICATION, $install_smiles;
if (!$DB->Query("SELECT 'x' FROM b_sonet_group", true)) {
$errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/socialnetwork/install/db/" . $DBType . "/install.sql");
}
if (!empty($errors)) {
$APPLICATION->ThrowException(implode("", $errors));
return false;
}
RegisterModule("socialnetwork");
RegisterModuleDependences("search", "OnBeforeFullReindexClear", "socialnetwork", "CSocNetSearchReindex", "OnBeforeFullReindexClear");
RegisterModuleDependences("search", "OnBeforeIndexDelete", "socialnetwork", "CSocNetSearchReindex", "OnBeforeIndexDelete");
RegisterModuleDependences("search", "OnReindex", "socialnetwork", "CSocNetSearch", "OnSearchReindex");
RegisterModuleDependences("search", "OnSearchCheckPermissions", "socialnetwork", "CSocNetSearch", "OnSearchCheckPermissions");
RegisterModuleDependences("search", "OnBeforeIndexUpdate", "socialnetwork", "CSocNetSearch", "OnBeforeIndexUpdate");
RegisterModuleDependences("search", "OnAfterIndexAdd", "socialnetwork", "CSocNetSearch", "OnAfterIndexAdd");
RegisterModuleDependences("search", "OnSearchPrepareFilter", "socialnetwork", "CSocNetSearch", "OnSearchPrepareFilter");
RegisterModuleDependences("main", "OnUserDelete", "socialnetwork", "CSocNetUser", "OnUserDelete");
RegisterModuleDependences("main", "OnBeforeUserUpdate", "socialnetwork", "CSocNetUser", "OnBeforeUserUpdate");
RegisterModuleDependences("main", "OnAfterUserUpdate", "socialnetwork", "CSocNetUser", "OnAfterUserUpdate");
RegisterModuleDependences("main", "OnAfterUserAdd", "socialnetwork", "CSocNetUser", "OnAfterUserAdd");
RegisterModuleDependences("main", "OnAfterUserLogout", "socialnetwork", "CSocNetUser", "OnAfterUserLogout");
RegisterModuleDependences("main", "OnBeforeProlog", "main", "", "", 100, "/modules/socialnetwork/prolog_before.php");
RegisterModuleDependences("main", "OnBeforeLangDelete", "socialnetwork", "CSocNetGroup", "OnBeforeLangDelete");
RegisterModuleDependences("socialnetwork", "OnSocNetLogFormatEvent", "socialnetwork", "CSocNetLog", "OnSocNetLogFormatEvent");
RegisterModuleDependences("photogallery", "OnAfterUpload", "socialnetwork", "CSocNetLogTools", "OnAfterPhotoUpload");
RegisterModuleDependences("photogallery", "OnAfterPhotoDrop", "socialnetwork", "CSocNetLogTools", "OnAfterPhotoDrop");
RegisterModuleDependences("photogallery", "OnBeforeSectionDrop", "socialnetwork", "CSocNetLogTools", "OnBeforeSectionDrop");
RegisterModuleDependences("photogallery", "OnAfterSectionDrop", "socialnetwork", "CSocNetLogTools", "OnAfterSectionDrop");
RegisterModuleDependences("photogallery", "OnAfterSectionEdit", "socialnetwork", "CSocNetLogTools", "OnAfterSectionEdit");
RegisterModuleDependences("main", "OnAuthProvidersBuildList", "socialnetwork", "CSocNetGroupAuthProvider", "GetProviders");
RegisterModuleDependences("im", "OnBeforeConfirmNotify", "socialnetwork", "CSocNetUserToGroup", "OnBeforeConfirmNotify");
RegisterModuleDependences("im", "OnBeforeConfirmNotify", "socialnetwork", "CSocNetUserRelations", "OnBeforeConfirmNotify");
RegisterModuleDependences("im", "OnGetNotifySchema", "socialnetwork", "CSocNetNotifySchema", "OnGetNotifySchema");
RegisterModuleDependences("pull", "OnGetDependentModule", "socialnetwork", "CSocNetPullSchema", "OnGetDependentModule");
RegisterModuleDependences("extranet", "OnUserInitialize", "socialnetwork", "CSocNetUser", "OnUserInitialize");
RegisterModuleDependences("blog", "OnBlogDelete", "socialnetwork", "CSocNetLogComments", "OnBlogDelete", 100);
RegisterModuleDependences("blog", "OnBlogDelete", "socialnetwork", "CSocNetLog", "OnBlogDelete", 200);
RegisterModuleDependences("blog", "OnBlogPostMentionNotifyIm", "socialnetwork", "CSocNetLogFollow", "OnBlogPostMentionNotifyIm");
CAgent::AddAgent("CSocNetMessages::SendEventAgent();", "socialnetwork", "N", 600);
CAgent::AddAgent("CSocNetLog::ClearOldAgent();", "socialnetwork", "N", 43200);
$arUserOptions = CUserOptions::GetOption("intranet", "~gadgets_sonet_user", false, 0);
if (!is_array($arUserOptions) || count($arUserOptions) <= 0) {
$sOptions = 'a:1:{s:7:"GADGETS";a:10:{s:18:"SONET_USER_LINKS@1";a:4:{s:6:"COLUMN";i:0;s:3:"ROW";i:0;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:20:"SONET_USER_FRIENDS@2";a:4:{s:6:"COLUMN";i:0;s:3:"ROW";i:1;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:21:"SONET_USER_BIRTHDAY@3";a:4:{s:6:"COLUMN";i:0;s:3:"ROW";i:2;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:19:"SONET_USER_GROUPS@4";a:4:{s:6:"COLUMN";i:0;s:3:"ROW";i:3;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:17:"SONET_USER_HEAD@5";a:4:{s:6:"COLUMN";i:0;s:3:"ROW";i:4;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:19:"SONET_USER_HONOUR@6";a:4:{s:6:"COLUMN";i:0;s:3:"ROW";i:5;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:20:"SONET_USER_ABSENCE@7";a:4:{s:6:"COLUMN";i:0;s:3:"ROW";i:6;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:17:"SONET_USER_DESC@8";a:4:{s:6:"COLUMN";i:1;s:3:"ROW";i:0;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:22:"SONET_USER_ACTIVITY@21";a:3:{s:6:"COLUMN";i:1;s:3:"ROW";i:1;s:4:"HIDE";s:1:"N";}s:7:"TASKS@9";a:4:{s:6:"COLUMN";i:1;s:3:"ROW";i:2;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}}}';
$arOptions = unserialize($sOptions);
CUserOptions::SetOption("intranet", "~gadgets_sonet_user", $arOptions, false, 0);
$sOptions = 'a:1:{s:7:"GADGETS";a:7:{s:18:"SONET_GROUP_DESC@1";a:3:{s:6:"COLUMN";i:0;s:3:"ROW";i:0;s:4:"HIDE";s:1:"N";}s:16:"UPDATES_ENTITY@9";a:3:{s:6:"COLUMN";i:0;s:3:"ROW";i:1;s:4:"HIDE";s:1:"N";}s:7:"TASKS@4";a:3:{s:6:"COLUMN";i:0;s:3:"ROW";i:2;s:4:"HIDE";s:1:"N";}s:18:"SONET_GROUP_TAGS@5";a:3:{s:6:"COLUMN";i:0;s:3:"ROW";i:3;s:4:"HIDE";s:1:"N";}s:19:"SONET_GROUP_LINKS@6";a:3:{s:6:"COLUMN";i:1;s:3:"ROW";i:0;s:4:"HIDE";s:1:"N";}s:19:"SONET_GROUP_USERS@7";a:3:{s:6:"COLUMN";i:1;s:3:"ROW";i:1;s:4:"HIDE";s:1:"N";}s:18:"SONET_GROUP_MODS@8";a:3:{s:6:"COLUMN";i:1;s:3:"ROW";i:2;s:4:"HIDE";s:1:"N";}}}';
$arOptions = unserialize($sOptions);
CUserOptions::SetOption("intranet", "~gadgets_sonet_group", $arOptions, false, 0);
}
$this->__SetLogFilter();
CModule::IncludeModule("socialnetwork");
if (CModule::IncludeModule("search")) {
CSearch::ReIndexModule("socialnetwork");
}
if ($install_smiles == "Y" || $install_wizard) {
$dbSmile = CSocNetSmile::GetList();
if (!$dbSmile->Fetch()) {
$arSmile = array(array("TYPING" => ":D :-D", "IMAGE" => "icon_biggrin.gif", "FICON_SMILE" => "FICON_BIGGRIN"), array("TYPING" => ":) :-)", "IMAGE" => "icon_smile.gif", "FICON_SMILE" => "FICON_SMILE"), array("TYPING" => ":( :-(", "IMAGE" => "icon_sad.gif", "FICON_SMILE" => "FICON_SAD"), array("TYPING" => ":o :-o :shock:", "IMAGE" => "icon_eek.gif", "FICON_SMILE" => "FICON_EEK"), array("TYPING" => "8) 8-)", "IMAGE" => "icon_cool.gif", "FICON_SMILE" => "FICON_COOL"), array("TYPING" => ":{} :-{}", "IMAGE" => "icon_kiss.gif", "FICON_SMILE" => "FICON_KISS"), array("TYPING" => ":oops:", "IMAGE" => "icon_redface.gif", "FICON_SMILE" => "FICON_REDFACE"), array("TYPING" => ":cry: :~(", "IMAGE" => "icon_cry.gif", "FICON_SMILE" => "FICON_CRY"), array("TYPING" => ":evil: >:-<", "IMAGE" => "icon_evil.gif", "FICON_SMILE" => "FICON_EVIL"), array("TYPING" => ";) ;-)", "IMAGE" => "icon_wink.gif", "FICON_SMILE" => "FICON_WINK"), array("TYPING" => ":!:", "IMAGE" => "icon_exclaim.gif", "FICON_SMILE" => "FICON_EXCLAIM"), array("TYPING" => ":?:", "IMAGE" => "icon_question.gif", "FICON_SMILE" => "FICON_QUESTION"), array("TYPING" => ":idea:", "IMAGE" => "icon_idea.gif", "FICON_SMILE" => "FICON_IDEA"), array("TYPING" => ":| :-|", "IMAGE" => "icon_neutral.gif", "FICON_SMILE" => "FICON_NEUTRAL"));
$arLang = array();
$dbLangs = CLanguage::GetList($b = "", $o = "", array("ACTIVE" => "Y"));
while ($arLangs = $dbLangs->Fetch()) {
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/socialnetwork/install/smiles.php", $arLangs["LID"]);
foreach ($arSmile as $key => $val) {
$arSmile[$key]["LANG"][] = array("LID" => $arLangs["LID"], "NAME" => GetMessage($val["FICON_SMILE"]));
}
}
foreach ($arSmile as $val) {
$val["SMILE_TYPE"] = "S";
$val["CLICKABLE"] = "Y";
$val["SORT"] = 150;
$val["IMAGE_WIDTH"] = 16;
$val["IMAGE_HEIGHT"] = 16;
$id = CSocNetSmile::Add($val);
}
}
}
return true;
}