mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing wrong random queries cacheable flag assignment
--HG-- branch : 1.x
This commit is contained in:
@@ -219,12 +219,12 @@ namespace Orchard.ContentManagement {
|
||||
sort.Item2(sortFactory);
|
||||
|
||||
if (!sortFactory.Randomize) {
|
||||
cacheable = false;
|
||||
sb.Append(", ");
|
||||
sb.Append(sort.Item1.Name).Append(".").Append(sortFactory.PropertyName);
|
||||
}
|
||||
else {
|
||||
// select distinct can't be used with newid()
|
||||
cacheable = false;
|
||||
sb.Replace("select distinct", "select ");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user