1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-18 10:41:08 +01:00

Diffusion - fix first "old ref" in push log

Summary: This is a fake hash of many 0s which ends up being a bad link. Detect the fake hash and don't print a link. Fixes T6826.

Test Plan: looked at push log and no longer saw a many 0 entry for the first old ref.

Reviewers: epriestley, chad

Reviewed By: chad

Subscribers: Korvin, epriestley

Maniphest Tasks: T6826

Differential Revision: https://secure.phabricator.com/D11096
This commit is contained in:
Bob Trahan 2014-12-30 15:17:49 -08:00
parent 1c04532852
commit 12c7c399ce

View file

@ -52,6 +52,15 @@ final class DiffusionPushLogListView extends AphrontView {
$event_id = $log->getPushEvent()->getID();
$callsign = $log->getRepository()->getCallsign();
$old_ref_link = null;
if ($log->getRefOld() != DiffusionCommitHookEngine::EMPTY_HASH) {
$old_ref_link = phutil_tag(
'a',
array(
'href' => '/r'.$callsign.$log->getRefOld(),
),
$log->getRefOldShort());
}
$rows[] = array(
phutil_tag(
'a',
@ -70,12 +79,7 @@ final class DiffusionPushLogListView extends AphrontView {
$log->getPushEvent()->getRemoteProtocol(),
$log->getRefType(),
$log->getRefName(),
phutil_tag(
'a',
array(
'href' => '/r'.$callsign.$log->getRefOld(),
),
$log->getRefOldShort()),
$old_ref_link,
phutil_tag(
'a',
array(