-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(river): no longer needlessly render river responses
For river items that cannot receive comments, we explicitly pass a `responses` option to the river layout, which bypasses the bulk of river/elements/responses rendering. Notably a `countComments()` query is no longer performed and an empty form is no longer rendered for each of these items. For BC, the `div.elgg-river-responses` wrapper is still created, but contains only whitespace. In the river/elements/responses view, we also now correctly check for comments (and their subclasses like ElggDiscussionReply) so we don't render these. The core river views do not reach to this point due to changes in this PR, so this is mainly for plugins that may have overridden those views. Fixes Elgg#9046
- Loading branch information
Showing
8 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ | |
echo elgg_view('river/elements/layout', array( | ||
'item' => $item, | ||
'message' => $excerpt, | ||
'responses' => ' ', | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ | |
|
||
echo elgg_view('river/elements/layout', array( | ||
'item' => $vars['item'], | ||
'responses' => ' ', | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,5 @@ | |
'item' => $item, | ||
'message' => $excerpt, | ||
'summary' => $summary, | ||
'responses' => ' ', | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,5 @@ | |
'use_hover' => false, | ||
'use_link' => false, | ||
)), | ||
'responses' => ' ', | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,5 @@ | |
echo elgg_view('river/elements/layout', array( | ||
'item' => $item, | ||
'summary' => $string, | ||
'responses' => ' ', | ||
)); |