1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-13 00:01:03 +01:00

Minor, don't show references in diffusion if there isn't any

Summary:
When there are no other references (and there will be none ususally,
if D2891 is accepted), we would show "References:" with empty contents.

Avoid that by testing for empty output after applying stupid filtering.

Test Plan: Looked in a standard repository with no special refs.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2892
This commit is contained in:
David Reuss 2012-06-30 06:26:23 -07:00 committed by epriestley
parent 2391c54c60
commit 19d58564d1

View file

@ -848,6 +848,10 @@ final class DiffusionCommitController extends DiffusionController {
$refs = explode(',', $refs); $refs = explode(',', $refs);
$refs = array_map('trim', $refs); $refs = array_map('trim', $refs);
if (!$refs) {
return null;
}
$ref_links = array(); $ref_links = array();
foreach ($refs as $ref) { foreach ($refs as $ref) {
$ref_links[] = phutil_render_tag( $ref_links[] = phutil_render_tag(