Carrotware.CMS.UI.Admin.c3_admin.CMS.ValidateUniqueCategory C# (CSharp) Method

ValidateUniqueCategory() private method

private ValidateUniqueCategory ( string TheSlug, string ItemID ) : string
TheSlug string
ItemID string
return string
        public string ValidateUniqueCategory(string TheSlug, string ItemID)
        {
            try {
                Guid CurrentItemGuid = new Guid(ItemID);
                TheSlug = CMSConfigHelper.DecodeBase64(TheSlug);
                TheSlug = ContentPageHelper.ScrubSlug(TheSlug);

                if (String.IsNullOrEmpty(TheSlug)) {
                    return "FAIL";
                }
                if (TheSlug.Length < 1) {
                    return "FAIL";
                }

                int iCount = ContentCategory.GetSimilar(SiteData.CurrentSite.SiteID, CurrentItemGuid, TheSlug);

                if (iCount < 1) {
                    return "OK";
                }

                return "FAIL";
            } catch (Exception ex) {
                SiteData.WriteDebugException("webservice", ex);

                return ex.ToString();
            }
        }