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

Remove some dead Phortune code

Summary: Ref T2787. This stuff is now irrelevant and/or has no callsites.

Test Plan: `grep`, poked around

Reviewers: chad, btrahan

Reviewed By: chad, btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

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

-90
-2
src/__phutil_library_map__.php
··· 2627 2627 'PhortunePurchase' => 'applications/phortune/storage/PhortunePurchase.php', 2628 2628 'PhortunePurchasePHIDType' => 'applications/phortune/phid/PhortunePurchasePHIDType.php', 2629 2629 'PhortunePurchaseQuery' => 'applications/phortune/query/PhortunePurchaseQuery.php', 2630 - 'PhortunePurchaseViewController' => 'applications/phortune/controller/PhortunePurchaseViewController.php', 2631 2630 'PhortuneSchemaSpec' => 'applications/phortune/storage/PhortuneSchemaSpec.php', 2632 2631 'PhortuneStripePaymentProvider' => 'applications/phortune/provider/PhortuneStripePaymentProvider.php', 2633 2632 'PhortuneTestPaymentProvider' => 'applications/phortune/provider/PhortuneTestPaymentProvider.php', ··· 5705 5704 ), 5706 5705 'PhortunePurchasePHIDType' => 'PhabricatorPHIDType', 5707 5706 'PhortunePurchaseQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 5708 - 'PhortunePurchaseViewController' => 'PhortuneController', 5709 5707 'PhortuneSchemaSpec' => 'PhabricatorConfigSchemaSpec', 5710 5708 'PhortuneStripePaymentProvider' => 'PhortunePaymentProvider', 5711 5709 'PhortuneTestPaymentProvider' => 'PhortunePaymentProvider',
-1
src/applications/phortune/application/PhabricatorPhortuneApplication.php
··· 39 39 'card/' => array( 40 40 'new/' => 'PhortunePaymentMethodCreateController', 41 41 ), 42 - 'buy/(?P<productID>\d+)/' => 'PhortuneProductPurchaseController', 43 42 ), 44 43 'card/(?P<id>\d+)/' => array( 45 44 'edit/' => 'PhortunePaymentMethodEditController',
-6
src/applications/phortune/controller/PhortuneController.php
··· 2 2 3 3 abstract class PhortuneController extends PhabricatorController { 4 4 5 - protected function loadActiveAccount(PhabricatorUser $user) { 6 - return PhortuneAccountQuery::loadActiveAccountForUser( 7 - $user, 8 - PhabricatorContentSource::newFromRequest($this->getRequest())); 9 - } 10 - 11 5 protected function buildChargesTable(array $charges, $show_cart = true) { 12 6 $request = $this->getRequest(); 13 7 $viewer = $request->getUser();
-5
src/applications/phortune/controller/PhortuneProductViewController.php
··· 16 16 ->setViewer($user) 17 17 ->withIDs(array($this->productID)) 18 18 ->executeOne(); 19 - 20 19 if (!$product) { 21 20 return new Aphront404Response(); 22 21 } ··· 26 25 $header = id(new PHUIHeaderView()) 27 26 ->setHeader($product->getProductName()); 28 27 29 - $account = $this->loadActiveAccount($user); 30 - 31 28 $edit_uri = $this->getApplicationURI('product/edit/'.$product->getID().'/'); 32 - $cart_uri = $this->getApplicationURI( 33 - $account->getID().'/buy/'.$product->getID().'/'); 34 29 35 30 $actions = id(new PhabricatorActionListView()) 36 31 ->setUser($user)
-58
src/applications/phortune/controller/PhortunePurchaseViewController.php
··· 1 - <?php 2 - 3 - final class PhortunePurchaseViewController extends PhortuneController { 4 - 5 - private $purchaseID; 6 - 7 - public function willProcessRequest(array $data) { 8 - $this->purchaseID = $data['id']; 9 - } 10 - 11 - public function processRequest() { 12 - $request = $this->getRequest(); 13 - $viewer = $request->getUser(); 14 - 15 - $account = $this->loadActiveAccount($viewer); 16 - 17 - $purchase = id(new PhortunePurchaseQuery()) 18 - ->setViewer($viewer) 19 - ->withIDs(array($this->purchaseID)) 20 - ->executeOne(); 21 - if (!$purchase) { 22 - return new Aphront404Response(); 23 - } 24 - $cart = $purchase->getCart(); 25 - 26 - $title = pht('Purchase: %s', $purchase->getFullDisplayName()); 27 - 28 - $header = id(new PHUIHeaderView()) 29 - ->setHeader($purchase->getFullDisplayName()); 30 - 31 - $crumbs = $this->buildApplicationCrumbs(); 32 - $this->addAccountCrumb($crumbs, $account); 33 - $crumbs->addTextCrumb( 34 - pht('Cart %d', $cart->getID()), 35 - $this->getApplicationURI('cart/'.$cart->getID().'/')); 36 - $crumbs->addTextCrumb( 37 - pht('Purchase %d', $purchase->getID()), 38 - $this->getApplicationURI('purchase/'.$purchase->getID().'/')); 39 - 40 - $properties = id(new PHUIPropertyListView()) 41 - ->setUser($viewer) 42 - ->addProperty(pht('Status'), $purchase->getStatus()); 43 - 44 - $object_box = id(new PHUIObjectBoxView()) 45 - ->setHeader($header) 46 - ->addPropertyList($properties); 47 - 48 - return $this->buildApplicationPage( 49 - array( 50 - $crumbs, 51 - $object_box, 52 - ), 53 - array( 54 - 'title' => $title, 55 - )); 56 - } 57 - 58 - }
-18
src/applications/phortune/query/PhortuneAccountQuery.php
··· 27 27 return $accounts; 28 28 } 29 29 30 - public static function loadActiveAccountForUser( 31 - PhabricatorUser $user, 32 - PhabricatorContentSource $content_source) { 33 - 34 - $accounts = id(new PhortuneAccountQuery()) 35 - ->setViewer($user) 36 - ->withMemberPHIDs(array($user->getPHID())) 37 - ->execute(); 38 - 39 - if (!$accounts) { 40 - return PhortuneAccount::createNewAccount($user, $content_source); 41 - } else if (count($accounts) == 1) { 42 - return head($accounts); 43 - } else { 44 - throw new Exception('TODO: No account selection yet.'); 45 - } 46 - } 47 - 48 30 public function withIDs(array $ids) { 49 31 $this->ids = $ids; 50 32 return $this;