Page MenuHomePhabricator

D12354.id29754.diff
No OneTemporary

D12354.id29754.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
@@ -90,7 +90,7 @@
}
if ($this->needContent) {
- $pastes = $this->loadContent($pastes);
+ $this->loadContent($pastes);
}
return $pastes;
@@ -203,21 +203,19 @@
}
$caches = $cache->getKeys($keys);
- $results = array();
$need_raw = array();
foreach ($pastes as $key => $paste) {
$key = $this->getContentCacheKey($paste);
if (isset($caches[$key])) {
$paste->attachContent(phutil_safe_html($caches[$key]));
- $results[$paste->getID()] = $paste;
} else {
$need_raw[$key] = $paste;
}
}
if (!$need_raw) {
- return $results;
+ return;
}
$write_data = array();
@@ -226,14 +224,10 @@
foreach ($need_raw as $key => $paste) {
$content = $this->buildContent($paste);
$paste->attachContent($content);
-
$write_data[$this->getContentCacheKey($paste)] = (string)$content;
- $results[$paste->getID()] = $paste;
}
$cache->setKeys($write_data);
-
- return $results;
}
private function buildContent(PhabricatorPaste $paste) {

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 2:45 PM (18 h, 39 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6921031
Default Alt Text
D12354.id29754.diff (1 KB)

Event Timeline