Page MenuHomePhabricator

Show "no badges" text in people profiles with archived badges only
ClosedPublic

Authored by lpriestley on Mar 28 2016, 6:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 21, 4:54 PM
Unknown Object (File)
Wed, Dec 18, 7:45 AM
Unknown Object (File)
Fri, Dec 13, 2:44 AM
Unknown Object (File)
Mon, Dec 9, 11:03 PM
Unknown Object (File)
Sat, Dec 7, 6:56 AM
Unknown Object (File)
Sat, Dec 7, 6:16 AM
Unknown Object (File)
Sun, Dec 1, 11:50 AM
Unknown Object (File)
Thu, Nov 28, 10:00 AM
Subscribers

Details

Summary

Fixes T10670, for users with exclusively archived badges, user profile should show "no badges" message instead of blank box

Test Plan

Award badge to user with no badges, archive badge, user profile should show "no badges" message under badges.

Diff Detail

Repository
rP Phabricator
Branch
peoplearchivedbadges
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 11321
Build 14083: Run Core Tests
Build 14082: arc lint + arc unit

Event Timeline

lpriestley retitled this revision from to Show "no badges" text in people profiles with archived badges only.
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
epriestley edited edge metadata.
epriestley added inline comments.
src/applications/people/controller/PhabricatorPeopleProfileViewController.php
192

For consistency and robustness, consider $badges = array(); instead of $badges = null;, so that $badges always has the same type (an array) -- this mostly just makes it less likely that code later will get tripped up if it does something like You have count($badges) badges. or foreach ($badges as ...), which will work correctly if $badges is array() but not if it is null.

This revision is now accepted and ready to land.Mar 28 2016, 6:16 PM
lpriestley edited edge metadata.

empty $badges should be of type array

This revision was automatically updated to reflect the committed changes.