Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P2115
panel_fix_pagination.patch
Active
Public
Actions
Authored by
jbrownEP
on Apr 2 2019, 1:16 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F6330212: raw.txt
Apr 2 2019, 1:16 AM
2019-04-02 01:16:51 (UTC+0)
Subscribers
None
diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
index a71263b27..95324ef26 100644
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
@@ -136,30 +136,32 @@ final class PhabricatorDashboardQueryPanelType
$results_view->setContent($content);
}
- if ($pager->getHasMoreResults()) {
- $item_list = $results_view->getObjectList();
-
- $more_href = $engine->getQueryResultsPageURI($key);
- if ($item_list) {
- $item_list->newTailButton()
- ->setHref($more_href);
- } else {
- // For search engines that do not return an object list, add a fake
- // one to the end so we can render a "View All Results" button that
- // looks like it does in normal applications. At time of writing,
- // several major applications like Maniphest (which has group headers)
- // and Feed (which uses custom rendering) don't return simple lists.
-
- $content = $results_view->getContent();
-
- $more_list = id(new PHUIObjectItemListView())
- ->setAllowEmptyList(true);
-
- $more_list->newTailButton()
- ->setHref($more_href);
-
- $content = array($content, $more_list);
- $results_view->setContent($content);
+ if (!$engine->shouldUseOffsetPaging()) {
+ if ($pager->getHasMoreResults()) {
+ $item_list = $results_view->getObjectList();
+
+ $more_href = $engine->getQueryResultsPageURI($key);
+ if ($item_list) {
+ $item_list->newTailButton()
+ ->setHref($more_href);
+ } else {
+ // For search engines that do not return an object list, add a fake
+ // one to the end so we can render a "View All Results" button that
+ // looks like it does in normal applications. At time of writing,
+ // several major applications like Maniphest (which has group headers)
+ // and Feed (which uses custom rendering) don't return simple lists.
+
+ $content = $results_view->getContent();
+
+ $more_list = id(new PHUIObjectItemListView())
+ ->setAllowEmptyList(true);
+
+ $more_list->newTailButton()
+ ->setHref($more_href);
+
+ $content = array($content, $more_list);
+ $results_view->setContent($content);
+ }
}
}
Event Timeline
jbrownEP
edited the content of this paste.
(Show Details)
Apr 2 2019, 1:16 AM
2019-04-02 01:16:51 (UTC+0)
jbrownEP
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
jbrownEP
changed the title of this paste from
Masterwork From Distant Lands
to
panel_fix_pagination.patch
.
Apr 2 2019, 2:14 AM
2019-04-02 02:14:24 (UTC+0)
Log In to Comment