示例#1
0
        private void SysteAutoSet_Click(object sender, EventArgs e)
        {
            if (base.CheckCookie())
            {
                //AdminForums.SetForumslayer();
                AdminForums.SetForumsSubForumCountAndDispalyorder();
                //AdminForums.SetForumsPathList();
                //AdminForums.SetForumsStatus();

                // 修正论坛数据
                var list = XForum.Root.AllChilds;
                //foreach (var item in list)
                //{
                //    item.Layer = item.Deepth;
                //}
                foreach (var item in list)
                {
                    // 所有非顶级论坛,都让它的子孙跟随它隐藏
                    if (item.Layer > 0 && !item.Visible)
                    {
                        foreach (var elm in item.Childs)
                        {
                            elm.Visible = item.Visible;
                        }
                    }
                }
                // 统一保存
                list.Save();

                Caches.ReSetForumLinkList();
                Caches.ReSetForumList();
                Caches.ReSetForumListBoxOptions();
                base.RegisterStartupScript("", "<script language=javascript>clearflag();</script>");
            }
        }
示例#2
0
        private void SysteAutoSet_Click(object sender, EventArgs e)
        {
            #region 系统调整论坛版块

            if (this.CheckCookie())
            {
                AdminForums.SetForumslayer();
                AdminForums.SetForumsSubForumCountAndDispalyorder();
                AdminForums.SetForumsPathList();
                AdminForums.SetForumsStatus();
                AdminCaches.ReSetForumLinkList();
                AdminCaches.ReSetForumList();
                AdminCaches.ReSetForumListBoxOptions();

                base.RegisterStartupScript("", "<script language=javascript>clearflag();</script>");
            }

            #endregion
        }