Page MenuHomePhabricator

D17438.id41935.diff
No OneTemporary

D17438.id41935.diff

diff --git a/src/applications/paste/query/PhabricatorPasteQuery.php b/src/applications/paste/query/PhabricatorPasteQuery.php
--- a/src/applications/paste/query/PhabricatorPasteQuery.php
+++ b/src/applications/paste/query/PhabricatorPasteQuery.php
@@ -185,7 +185,7 @@
$paste->getFilePHID(),
$paste->getLanguage(),
'snippet',
- 'v2',
+ 'v2.1',
PhabricatorHash::digestForIndex($paste->getTitle()),
));
}
@@ -352,6 +352,9 @@
$snippet_type = PhabricatorPasteSnippet::FULL;
$snippet = $paste->getRawContent();
+ $lines = phutil_split_lines($snippet);
+ $line_count = count($lines);
+
if (strlen($snippet) > 1024) {
$snippet_type = PhabricatorPasteSnippet::FIRST_BYTES;
$snippet = id(new PhutilUTF8StringTruncator())
@@ -360,8 +363,6 @@
->truncateString($snippet);
}
- $lines = phutil_split_lines($snippet);
- $line_count = count($lines);
if ($line_count > 5) {
$snippet_type = PhabricatorPasteSnippet::FIRST_LINES;
$snippet = implode('', array_slice($lines, 0, 5));

File Metadata

Mime Type
text/plain
Expires
Wed, Oct 23, 1:30 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6743292
Default Alt Text
D17438.id41935.diff (1 KB)

Event Timeline