1
0
Fork 0
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:
epriestley 2013-06-05 11:49:32 -07:00
parent 3567f1a1df
commit b483c11d46

View file

@ -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);