TriggerUpstreaming() public static method

public static TriggerUpstreaming ( ) : void
return void
Esempio n. 1
0
        bool IMovableType.mt_setPostCategories(string postid, string username, string password, newtelligence.DasBlog.Web.Services.MovableType.Category[] categories)
        {
            if (!siteConfig.EnableBloggerApi)
            {
                throw new ServiceDisabledException();
            }
            UserToken token = SiteSecurity.Login(username, password);

            if (token == null)
            {
                throw new System.Security.SecurityException();
            }
            Entry entry = dataService.GetEntryForEdit(postid);

            if (entry != null)
            {
                string cats = "";
                foreach (newtelligence.DasBlog.Web.Services.MovableType.Category mcat in categories)
                {
                    if (cats.Length > 0)
                    {
                        cats += ";";
                    }
                    cats += mcat.categoryId;
                }
                entry.Categories = cats;
                dataService.SaveEntry(entry);
                // give the XSS upstreamer a hint that things have changed
                XSSUpstreamer.TriggerUpstreaming();
                return(true);
            }
            else
            {
                return(false);
            }
        }