private void CheckApplicationState(SiteDeletionLog delLog) { if (ApplicationInstanceGUID == SystemHelper.ApplicationInstanceGUID) { return; } // Restart of the application LogStatusEnum progressLog = delLog.GetProgressState(); if (progressLog != LogStatusEnum.Finish) { delLog.LogDeletionState(LogStatusEnum.UnexpectedFinish, ResHelper.GetAPIString("Site_Delete.Applicationrestarted", "<strong>Application has been restarted and the logging of the site delete process has been terminated. Please make sure that the site is deleted. If it is not, please repeate the deletion process.</strong><br />")); } }
protected void Page_Load(object sender, EventArgs e) { // Register script for pendingCallbacks repair ScriptHelper.FixPendingCallbacks(Page); if (RequestHelper.IsCallback()) { return; } if (!RequestHelper.IsPostBack()) { SiteDeletionLog = new SiteDeletionLog(); SiteDeletionLog.PersistentLogKey = PersistentLogKey; } // Register the script to perform get flags for showing buttons retrieval callback ScriptHelper.RegisterClientScriptBlock(this, GetType(), "GetState", ScriptHelper.GetScript("function GetState(cancel){ return " + Page.ClientScript.GetCallbackEventReference(this, "cancel", "SetStateMssg", null) + " } \n")); // Setup page title text and image PageTitle.TitleText = GetString("Site_Edit.DeleteSite"); mBackToSiteListUrl = UIContextHelper.GetElementUrl(ModuleName.CMS, "Sites", false); PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem { Text = GetString("general.sites"), RedirectUrl = mBackToSiteListUrl, Target = "cmsdesktop", }); PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem { Text = GetString("Site_Edit.DeleteSite"), }); mSiteInfo = SiteInfoProvider.GetSiteInfo(QueryHelper.GetInteger("siteId", 0)); if (mSiteInfo != null) { var siteDisplayName = HTMLHelper.HTMLEncode(ResHelper.LocalizeString(mSiteInfo.DisplayName)); ucHeader.Header = String.Format(GetString("Site_Delete.Header"), siteDisplayName); ucHeaderConfirm.Header = GetString("Site_Delete.HeaderConfirm"); headConfirmation.Text = String.Format(GetString("Site_Edit.Confirmation"), siteDisplayName); } RegisterScripts(); }