mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
fixes two small diffusion bugs
Summary: make sure we only print the fancy tool tip thing if we have all the data we need. (fixes T2136). additionally, default $branches to array() to prevent errors from reset on null. Test Plan: made a checkin for a mercurial repo with user "foo@bar" with no branch. verified name showed up in all views. also noted on commit detail view there was no more error about reset() on null for $branches. Reviewers: epriestley Reviewed By: epriestley CC: chad, aran, Korvin Maniphest Tasks: T2136 Differential Revision: https://secure.phabricator.com/D4065
This commit is contained in:
parent
2b69353519
commit
7154bea03c
2 changed files with 2 additions and 2 deletions
|
@ -254,7 +254,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$change_list->setRepository($repository);
|
||||
$change_list->setUser($user);
|
||||
// pick the first branch for "Browse in Diffusion" View Option
|
||||
$branches = $commit_data->getCommitDetail('seenOnBranches');
|
||||
$branches = $commit_data->getCommitDetail('seenOnBranches', array());
|
||||
$first_branch = reset($branches);
|
||||
$change_list->setBranch($first_branch);
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ abstract class DiffusionView extends AphrontView {
|
|||
|
||||
final protected static function renderName($name) {
|
||||
$email = new PhutilEmailAddress($name);
|
||||
if ($email->getDisplayName() || $email->getDomainName()) {
|
||||
if ($email->getDisplayName() && $email->getDomainName()) {
|
||||
Javelin::initBehavior('phabricator-tooltips', array());
|
||||
require_celerity_resource('aphront-tooltip-css');
|
||||
return javelin_render_tag(
|
||||
|
|
Loading…
Reference in a new issue