1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +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:
Bob Trahan 2012-12-03 09:27:47 -08:00
parent 2b69353519
commit 7154bea03c
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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(