本文整理汇总了PHP中CUrlRewriter::Update方法的典型用法代码示例。如果您正苦于以下问题:PHP CUrlRewriter::Update方法的具体用法?PHP CUrlRewriter::Update怎么用?PHP CUrlRewriter::Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUrlRewriter
的用法示例。
在下文中一共展示了CUrlRewriter::Update方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
if ($REQUEST_METHOD == "POST" && strlen($Update) > 0 && $isAdmin && check_bitrix_sessid()) {
if (StrLen($CONDITION) <= 0) {
$aMsg[] = array("id" => "CONDITION", "text" => GetMessage("MURL_NO_USL"));
}
if (empty($aMsg)) {
if ($CONDITION_OLD != $CONDITION) {
$arResult = CUrlRewriter::GetList(array("SITE_ID" => $site_id, "CONDITION" => $CONDITION));
if (count($arResult) > 0) {
$aMsg[] = array("id" => "CONDITION", "text" => str_replace("#CONDITION#", htmlspecialcharsbx($CONDITION), GetMessage("MURL_DUPL_CONDITION")));
}
}
}
if (empty($aMsg)) {
if (StrLen($CONDITION_OLD) > 0) {
CUrlRewriter::Update(array("SITE_ID" => $site_id, "CONDITION" => $CONDITION_OLD), array("CONDITION" => $CONDITION, "ID" => $ID, "PATH" => $FILE_PATH, "RULE" => $RULE));
} else {
CUrlRewriter::Add(array("SITE_ID" => $site_id, "CONDITION" => $CONDITION, "ID" => $ID, "PATH" => $FILE_PATH, "RULE" => $RULE));
}
}
if (empty($aMsg)) {
if (strlen($apply) <= 0) {
LocalRedirect("/bitrix/admin/urlrewrite_list.php?lang=" . LANG . "&filter_site_id=" . UrlEncode($site_id) . "&" . GetFilterParams("filter_", false));
}
} else {
$message = new CAdminMessage(GetMessage("SAE_ERROR"), new CAdminException($aMsg));
$bVarsFromForm = true;
}
}
if (StrLen($CONDITION) > 0) {
$APPLICATION->SetTitle(GetMessage("MURL_EDIT"));