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

Rename Releeph "Project" transactions to "Product"

Summary: Ref T3549. This table isn't written to yet; rename it and the DAOs and modernize the history controller.

Test Plan: Viewed history page for a product.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T3549

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

+26 -24
+2
resources/sql/autopatches/20140328.releeph.1.productxaction.sql
··· 1 + ALTER TABLE {$NAMESPACE}_releeph.releeph_projecttransaction 2 + RENAME {$NAMESPACE}_releeph.releeph_producttransaction;
+5 -5
src/__phutil_library_map__.php
··· 2516 2516 'ReleephPHIDTypeRequest' => 'applications/releeph/phid/ReleephPHIDTypeRequest.php', 2517 2517 'ReleephProductActionController' => 'applications/releeph/controller/project/ReleephProductActionController.php', 2518 2518 'ReleephProductController' => 'applications/releeph/controller/project/ReleephProductController.php', 2519 + 'ReleephProductTransaction' => 'applications/releeph/storage/ReleephProductTransaction.php', 2520 + 'ReleephProductTransactionQuery' => 'applications/releeph/query/ReleephProductTransactionQuery.php', 2519 2521 'ReleephProject' => 'applications/releeph/storage/ReleephProject.php', 2520 2522 'ReleephProjectController' => 'applications/releeph/controller/ReleephProjectController.php', 2521 2523 'ReleephProjectCreateController' => 'applications/releeph/controller/project/ReleephProjectCreateController.php', ··· 2524 2526 'ReleephProjectListController' => 'applications/releeph/controller/project/ReleephProjectListController.php', 2525 2527 'ReleephProjectQuery' => 'applications/releeph/query/ReleephProjectQuery.php', 2526 2528 'ReleephProjectSearchEngine' => 'applications/releeph/query/ReleephProjectSearchEngine.php', 2527 - 'ReleephProjectTransaction' => 'applications/releeph/storage/ReleephProjectTransaction.php', 2528 - 'ReleephProjectTransactionQuery' => 'applications/releeph/query/ReleephProjectTransactionQuery.php', 2529 2529 'ReleephProjectViewController' => 'applications/releeph/controller/project/ReleephProjectViewController.php', 2530 2530 'ReleephReasonFieldSpecification' => 'applications/releeph/field/specification/ReleephReasonFieldSpecification.php', 2531 2531 'ReleephRequest' => 'applications/releeph/storage/ReleephRequest.php', ··· 5490 5490 'ReleephPHIDTypeRequest' => 'PhabricatorPHIDType', 5491 5491 'ReleephProductActionController' => 'ReleephProductController', 5492 5492 'ReleephProductController' => 'ReleephController', 5493 + 'ReleephProductTransaction' => 'PhabricatorApplicationTransaction', 5494 + 'ReleephProductTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 5493 5495 'ReleephProject' => 5494 5496 array( 5495 5497 0 => 'ReleephDAO', ··· 5498 5500 'ReleephProjectController' => 'ReleephController', 5499 5501 'ReleephProjectCreateController' => 'ReleephProjectController', 5500 5502 'ReleephProjectEditController' => 'ReleephProjectController', 5501 - 'ReleephProjectHistoryController' => 'ReleephProjectController', 5503 + 'ReleephProjectHistoryController' => 'ReleephProductController', 5502 5504 'ReleephProjectListController' => 5503 5505 array( 5504 5506 0 => 'ReleephController', ··· 5506 5508 ), 5507 5509 'ReleephProjectQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 5508 5510 'ReleephProjectSearchEngine' => 'PhabricatorApplicationSearchEngine', 5509 - 'ReleephProjectTransaction' => 'PhabricatorApplicationTransaction', 5510 - 'ReleephProjectTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 5511 5511 'ReleephProjectViewController' => 5512 5512 array( 5513 5513 0 => 'ReleephProjectController',
+8 -8
src/applications/releeph/controller/project/ReleephProjectHistoryController.php
··· 1 1 <?php 2 2 3 - final class ReleephProjectHistoryController extends ReleephProjectController { 3 + final class ReleephProjectHistoryController extends ReleephProductController { 4 4 5 5 private $id; 6 6 7 7 public function willProcessRequest(array $data) { 8 8 $this->id = $data['projectID']; 9 - parent::willProcessRequest($data); 10 9 } 11 10 12 11 public function processRequest() { 13 12 $request = $this->getRequest(); 14 13 $viewer = $request->getUser(); 15 14 16 - $project = id(new ReleephProjectQuery()) 15 + $product = id(new ReleephProjectQuery()) 17 16 ->setViewer($viewer) 18 17 ->withIDs(array($this->id)) 19 18 ->executeOne(); 20 - if (!$project) { 19 + if (!$product) { 21 20 return new Aphront404Response(); 22 21 } 22 + $this->setProduct($product); 23 23 24 - $xactions = id(new ReleephProjectTransactionQuery()) 24 + $xactions = id(new ReleephProductTransactionQuery()) 25 25 ->setViewer($viewer) 26 - ->withObjectPHIDs(array($project->getPHID())) 26 + ->withObjectPHIDs(array($product->getPHID())) 27 27 ->execute(); 28 28 29 29 $timeline = id(new PhabricatorApplicationTransactionView()) 30 30 ->setUser($viewer) 31 - ->setObjectPHID($project->getPHID()) 31 + ->setObjectPHID($product->getPHID()) 32 32 ->setTransactions($xactions); 33 33 34 34 $crumbs = $this->buildApplicationCrumbs(); ··· 40 40 $timeline, 41 41 ), 42 42 array( 43 - 'title' => pht('Project History'), 43 + 'title' => pht('Product History'), 44 44 'device' => true, 45 45 )); 46 46 }
+10
src/applications/releeph/query/ReleephProductTransactionQuery.php
··· 1 + <?php 2 + 3 + final class ReleephProductTransactionQuery 4 + extends PhabricatorApplicationTransactionQuery { 5 + 6 + public function getTemplateApplicationTransaction() { 7 + return new ReleephProductTransaction(); 8 + } 9 + 10 + }
-10
src/applications/releeph/query/ReleephProjectTransactionQuery.php
··· 1 - <?php 2 - 3 - final class ReleephProjectTransactionQuery 4 - extends PhabricatorApplicationTransactionQuery { 5 - 6 - public function getTemplateApplicationTransaction() { 7 - return new ReleephProjectTransaction(); 8 - } 9 - 10 - }
+1 -1
src/applications/releeph/storage/ReleephProjectTransaction.php src/applications/releeph/storage/ReleephProductTransaction.php
··· 1 1 <?php 2 2 3 - final class ReleephProjectTransaction 3 + final class ReleephProductTransaction 4 4 extends PhabricatorApplicationTransaction { 5 5 6 6 public function getApplicationName() {