function Update($ID, $arFields) { global $DB; $ID = intval($ID); if (is_set($arFields, "TITLE")) { $arFields["TITLE"] = trim($arFields["TITLE"]); } if (is_set($arFields, "TYPE")) { $arFields["TYPE"] = strtoupper(trim($arFields["TYPE"])); if ($arFields["TYPE"] != "T") { $arFields["TYPE"] = "W"; } } if ($ID > 0 && CFilterDictionary::CheckFields($arFields, "UPDATE")) { $strUpdate = $DB->PrepareUpdate("b_forum_dictionary", $arFields); $res = $DB->Query("UPDATE b_forum_dictionary SET " . $strUpdate . " WHERE ID=" . $ID); return $res; } return false; }