Exemple #1
0
        protected override void OnPreInit(EventArgs e)
        {
            base.OnPreInit(e);

            // We don't care about culuture of store at this time.
            // We simply need some non-localizable store settings to initialize thread culture.
            var currentStore = HccRequestContext.Current.CurrentStore;

            if (ForceWizardRedirect && currentStore == null && CurrentTab != AdminTabType.SetupWizard)
            {
                Response.Redirect(WizardPagePath);
            }

            HccRequestContextUtils.UpdateAdminContentCulture(HccRequestContext.Current);

            // Redirect to HTTPS if ssl required
            if (currentStore != null)
            {
                if (currentStore.Settings.ForceAdminSSL && !Request.IsSecureConnection)
                {
                    SSL.SSLRedirect(SSL.SSLRedirectTo.SSL);
                }

                CultureSwitch.SetCulture(currentStore);
            }

            ValidateBasicAccess();

            Localization = Factory.Instance.CreateLocalizationHelper(LocalResourceFile);
        }
Exemple #2
0
        protected override void OnPreInit(EventArgs e)
        {
            base.OnPreInit(e);

            HccRequestContextUtils.UpdateAdminContentCulture(HccRequestContext.Current);

            CultureSwitch.SetCulture(HccRequestContext.Current.CurrentStore);

            ValidatBasicAccess();
        }
Exemple #3
0
        public void ProcessRequest(HttpContext context)
        {
            Localization = Factory.Instance.CreateLocalizationHelper(LocalResourceFile);

            HccRequestContextUtils.UpdateAdminContentCulture(HccRequestContext.Current);

            CultureSwitch.SetCulture(HccRequestContext.Current.CurrentStore);

            var res = HandleAction(context, HotcakesApplication.Current);

            context.Response.ContentType = "application/json";
            context.Response.Write(res.ObjectToJson());
        }