Example #1
0
        public ArchiveDto GetArchiveByIdOrAlias(int siteId, string id)
        {
            IContentContainer ic      = this._contentRep.GetContent(siteId);
            IArchive          archive = ic.GetArchive(id);

            if (archive == null)
            {
                return(default(ArchiveDto));
            }

            return(ArchiveDto.ConvertFrom(archive, true, true, true));
        }
Example #2
0
        public bool CheckArchiveAliasAvailable(int siteId, int archiveId, string alias)
        {
            IContentContainer content = this._contentRep.GetContent(siteId);
            IArchive          archive = content.GetArchive(alias);
            bool archiveIsNull        = archive == null;

            if (archiveIsNull)
            {
                return(true);
            }

            if (archiveId <= 0)
            {
                return(archiveIsNull);
            }


            return(archive.Id == archiveId);
        }