Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13979869
D16465.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
956 B
Referenced Files
None
Subscribers
None
D16465.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D16465: Properly display number of lines for paste list view
Attached
Detach File
Event Timeline
Log In to Comment