Page MenuHomePhabricator

D16465.id.diff
No OneTemporary

D16465.id.diff

diff --git a/src/applications/paste/query/PhabricatorPasteSearchEngine.php b/src/applications/paste/query/PhabricatorPasteSearchEngine.php
--- a/src/applications/paste/query/PhabricatorPasteSearchEngine.php
+++ b/src/applications/paste/query/PhabricatorPasteSearchEngine.php
@@ -13,6 +13,7 @@
public function newQuery() {
return id(new PhabricatorPasteQuery())
+ ->needContent(true)
->needSnippets(true);
}
@@ -166,7 +167,11 @@
$preview);
$created = phabricator_datetime($paste->getDateCreated(), $viewer);
- $line_count = count($lines);
+ // Get all of the file contents so we can correctly
+ // show the number of lines in the file since getSnippet
+ // limits the max number of lines to five.
+ $full_lines = phutil_split_lines($paste->getContent());
+ $line_count = count($full_lines);
$line_count = pht(
'%s Line(s)',
new PhutilNumber($line_count));

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 20, 6:59 AM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6735567
Default Alt Text
D16465.id.diff (956 B)

Event Timeline