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
F14066195: D15538.diff
Tue, Nov 19, 8:44 AM
F14052272: D15538.diff
Fri, Nov 15, 7:59 AM
F14039020: D15538.diff
Mon, Nov 11, 3:18 AM
F14031660: D15538.diff
Sat, Nov 9, 11:40 AM
F14023985: D15538.diff
Thu, Nov 7, 4:42 AM
F14013036: D15538.diff
Fri, Nov 1, 11:35 PM
F13995340: D15538.id.diff
Wed, Oct 23, 12:16 PM
F13992279: D15538.id37456.diff
Tue, Oct 22, 3:34 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.