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:
parent
1c04532852
commit
12c7c399ce
1 changed files with 10 additions and 6 deletions
|
@ -52,6 +52,15 @@ final class DiffusionPushLogListView extends AphrontView {
|
||||||
$event_id = $log->getPushEvent()->getID();
|
$event_id = $log->getPushEvent()->getID();
|
||||||
|
|
||||||
$callsign = $log->getRepository()->getCallsign();
|
$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(
|
$rows[] = array(
|
||||||
phutil_tag(
|
phutil_tag(
|
||||||
'a',
|
'a',
|
||||||
|
@ -70,12 +79,7 @@ final class DiffusionPushLogListView extends AphrontView {
|
||||||
$log->getPushEvent()->getRemoteProtocol(),
|
$log->getPushEvent()->getRemoteProtocol(),
|
||||||
$log->getRefType(),
|
$log->getRefType(),
|
||||||
$log->getRefName(),
|
$log->getRefName(),
|
||||||
phutil_tag(
|
$old_ref_link,
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'href' => '/r'.$callsign.$log->getRefOld(),
|
|
||||||
),
|
|
||||||
$log->getRefOldShort()),
|
|
||||||
phutil_tag(
|
phutil_tag(
|
||||||
'a',
|
'a',
|
||||||
array(
|
array(
|
||||||
|
|
Loading…
Reference in a new issue