mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-12 15:51:04 +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:
parent
2391c54c60
commit
19d58564d1
1 changed files with 4 additions and 0 deletions
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue