Esempio n. 1
0
        private bool ShouldProcessNode(PageNode node, PublishingSystemEventInfo item = null)
        {
            CultureInfo cultureInfo;

            if (node == null || node.NodeType == NodeType.Group || node.HasLinkedNode() || node.GetPageData(null) == null || !node.IncludeInSearchIndex || node.IsBackend)
            {
                return(false);
            }
            if (item != null && item.ItemAction != "SystemObjectDeleted")
            {
                if (item.Language != null)
                {
                    cultureInfo = CultureInfo.GetCultureInfo(item.Language);
                }
                else
                {
                    cultureInfo = null;
                }
                if (!this.IsPagePublished(node, cultureInfo))
                {
                    return(false);
                }
            }

            // DO not index the "Enrol on Course" pages
            if (node != null && node.Id.Equals("ca070148-08b3-649f-a7d8-ff000079c5aa"))
            {
                return(false);
            }

            return(true);
        }