mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#21054: Fixing issue with null UrlReferer.
I still think an issue is outstanding with AdminFilter. Work Item: 21054
This commit is contained in:
@@ -28,7 +28,10 @@ namespace Orchard.Localization.Selectors {
|
||||
// Attempt to determine culture by previous route if by POST
|
||||
string path;
|
||||
if (context.Request.HttpMethod.Equals(HttpVerbs.Post.ToString(), StringComparison.OrdinalIgnoreCase)) {
|
||||
path = context.Request.UrlReferrer.AbsolutePath;
|
||||
if (context.Request.UrlReferrer != null)
|
||||
path = context.Request.UrlReferrer.AbsolutePath;
|
||||
else
|
||||
path = context.Request.Path;
|
||||
}
|
||||
else {
|
||||
path = context.Request.Path;
|
||||
|
Reference in New Issue
Block a user