@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix an issue where pastes could be reordered as a side effect of cache fills

Summary: Ref T7803. Pastes which needed a cache fill would incorrectly be dropped to the bottom of the list. Stop doing that.

Test Plan: Loaded a list of pastes with some that needed cache fills, saw them appear in the correct order.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7803

Differential Revision: https://secure.phabricator.com/D12354

+2 -8
+2 -8
src/applications/paste/query/PhabricatorPasteQuery.php
··· 90 90 } 91 91 92 92 if ($this->needContent) { 93 - $pastes = $this->loadContent($pastes); 93 + $this->loadContent($pastes); 94 94 } 95 95 96 96 return $pastes; ··· 203 203 } 204 204 205 205 $caches = $cache->getKeys($keys); 206 - $results = array(); 207 206 208 207 $need_raw = array(); 209 208 foreach ($pastes as $key => $paste) { 210 209 $key = $this->getContentCacheKey($paste); 211 210 if (isset($caches[$key])) { 212 211 $paste->attachContent(phutil_safe_html($caches[$key])); 213 - $results[$paste->getID()] = $paste; 214 212 } else { 215 213 $need_raw[$key] = $paste; 216 214 } 217 215 } 218 216 219 217 if (!$need_raw) { 220 - return $results; 218 + return; 221 219 } 222 220 223 221 $write_data = array(); ··· 226 224 foreach ($need_raw as $key => $paste) { 227 225 $content = $this->buildContent($paste); 228 226 $paste->attachContent($content); 229 - 230 227 $write_data[$this->getContentCacheKey($paste)] = (string)$content; 231 - $results[$paste->getID()] = $paste; 232 228 } 233 229 234 230 $cache->setKeys($write_data); 235 - 236 - return $results; 237 231 } 238 232 239 233 private function buildContent(PhabricatorPaste $paste) {