@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make the Phortune Subscription view show "Deleted Payment Method" for deleted payment methods

Summary: Fixes T12224. This brings "Autopay" on the View controller into line with how it works on the Edit controller.

Test Plan:
- Viewed subscriptions with no autopay, valid autopay, and deleted autopay.

{F2750725}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12224

Differential Revision: https://secure.phabricator.com/D17334

+17 -2
+17 -2
src/applications/phortune/controller/PhortuneSubscriptionViewController.php
··· 68 68 69 69 $default_method = $subscription->getDefaultPaymentMethodPHID(); 70 70 if ($default_method) { 71 - $handles = $this->loadViewerHandles(array($default_method)); 72 - $autopay_method = $handles[$default_method]->renderLink(); 71 + $method = id(new PhortunePaymentMethodQuery()) 72 + ->setViewer($viewer) 73 + ->withPHIDs(array($default_method)) 74 + ->withStatuses( 75 + array( 76 + PhortunePaymentMethod::STATUS_ACTIVE, 77 + )) 78 + ->executeOne(); 79 + if ($method) { 80 + $handles = $this->loadViewerHandles(array($default_method)); 81 + $autopay_method = $handles[$default_method]->renderLink(); 82 + } else { 83 + $autopay_method = phutil_tag( 84 + 'em', 85 + array(), 86 + pht('<Deleted Payment Method>')); 87 + } 73 88 } else { 74 89 $autopay_method = phutil_tag( 75 90 'em',