Page MenuHomePhabricator

D12354.diff
No OneTemporary

D12354.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, May 13, 10:33 PM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6277845
Default Alt Text
D12354.diff (1 KB)

Event Timeline