mirror of
https://we.phorge.it/source/phorge.git
synced 2025-04-01 15:08:14 +02:00
Fix a bug where PhabricatorPasteQuery incorrectly rekeys results
Summary: I made changes here recently to improve robustness in the presence of missing files, but accidentally caused the results to re-key. Some callers depend on the mapping, and every other query is consistent about it. Restore the original behavior. Test Plan: `Pnnn` works again in remarkup. Reviewers: dctrwatson, chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D6134
This commit is contained in:
parent
3567f1a1df
commit
b483c11d46
1 changed files with 2 additions and 2 deletions
|
@ -199,7 +199,7 @@ final class PhabricatorPasteQuery
|
|||
$key = $this->getContentCacheKey($paste);
|
||||
if (isset($caches[$key])) {
|
||||
$paste->attachContent(phutil_safe_html($caches[$key]));
|
||||
$results[$key] = $paste;
|
||||
$results[$paste->getID()] = $paste;
|
||||
} else {
|
||||
$need_raw[$key] = $paste;
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ final class PhabricatorPasteQuery
|
|||
$paste->attachContent($content);
|
||||
|
||||
$write_data[$this->getContentCacheKey($paste)] = (string)$content;
|
||||
$results[$key] = $paste;
|
||||
$results[$paste->getID()] = $paste;
|
||||
}
|
||||
|
||||
$cache->setKeys($write_data);
|
||||
|
|
Loading…
Add table
Reference in a new issue