Page MenuHomePhabricator

D16960.diff
No OneTemporary

D16960.diff

diff --git a/src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php b/src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php
--- a/src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php
+++ b/src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php
@@ -347,13 +347,24 @@
$where = '';
}
+ if (strlen($compiled_query)) {
+ $order = '';
+ } else {
+ // When not executing a query, order by document creation date. This
+ // is the default view in object browser dialogs, like "Close Duplicate".
+ $order = qsprintf(
+ $conn,
+ 'ORDER BY document.documentCreated DESC');
+ }
+
return qsprintf(
$conn,
- 'SELECT %Q FROM %T document %Q %Q LIMIT 1000',
+ 'SELECT %Q FROM %T document %Q %Q %Q LIMIT 1000',
$select,
$document_table,
$join,
- $where);
+ $where,
+ $order);
}
protected function joinRelationship(

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 27, 6:49 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705100
Default Alt Text
D16960.diff (1 KB)

Event Timeline