removes uneeded IsDocumentRequest method
This commit is contained in:
@@ -290,24 +290,7 @@ namespace Umbraco.Web
|
||||
|
||||
_previewing = _previewToken.IsNullOrWhiteSpace() == false;
|
||||
}
|
||||
|
||||
private bool? _isDocumentRequest;
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the request is a document request (i.e. one that the module should handle)
|
||||
/// </summary>
|
||||
/// <param name="httpContext"></param>
|
||||
/// <param name="uri"></param>
|
||||
/// <returns></returns>
|
||||
internal bool IsDocumentRequest(RoutableDocumentFilter docLookup)
|
||||
{
|
||||
if (_isDocumentRequest.HasValue)
|
||||
return _isDocumentRequest.Value;
|
||||
|
||||
_isDocumentRequest = docLookup.IsDocumentRequest(HttpContext, OriginalRequestUrl);
|
||||
return _isDocumentRequest.Value;
|
||||
}
|
||||
|
||||
|
||||
// say we render a macro or RTE in a give 'preview' mode that might not be the 'current' one,
|
||||
// then due to the way it all works at the moment, the 'current' published snapshot need to be in the proper
|
||||
// default 'preview' mode - somehow we have to force it. and that could be recursive.
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace Umbraco.Web
|
||||
var reason = EnsureRoutableOutcome.IsRoutable;
|
||||
|
||||
// ensure this is a document request
|
||||
if (!context.IsDocumentRequest(_routableDocumentLookup))
|
||||
if (!_routableDocumentLookup.IsDocumentRequest(httpContext, context.OriginalRequestUrl))
|
||||
{
|
||||
reason = EnsureRoutableOutcome.NotDocumentRequest;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user