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

Use user's timezone in repo history

Test Plan: Looked at repo overview, repo history and commit detail.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

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

vrana ebe2a58f ef214e94

+15 -10
+1
src/applications/diffusion/controller/DiffusionCommitController.php
··· 782 782 } 783 783 784 784 $history_table = new DiffusionHistoryTableView(); 785 + $history_table->setUser($this->getRequest()->getUser()); 785 786 $history_table->setDiffusionRequest($drequest); 786 787 $history_table->setHistory($merges); 787 788 $history_table->loadRevisions();
+1
src/applications/diffusion/controller/DiffusionHistoryController.php
··· 56 56 phutil_escape_html($button_title)); 57 57 58 58 $history_table = new DiffusionHistoryTableView(); 59 + $history_table->setUser($request->getUser()); 59 60 $history_table->setDiffusionRequest($drequest); 60 61 $history_table->setHistory($history); 61 62 $history_table->loadRevisions();
+4 -2
src/applications/diffusion/controller/DiffusionLastModifiedController.php
··· 23 23 $phids = array_keys($phids); 24 24 $handles = $this->loadViewerHandles($phids); 25 25 26 - $output = DiffusionBrowseTableView::renderLastModifiedColumns( 27 - $drequest, 26 + $view = new DiffusionBrowseTableView(); 27 + $view->setUser($request->getUser()); 28 + $view->setDiffusionRequest($drequest); 29 + $output = $view->renderLastModifiedColumns( 28 30 $handles, 29 31 $commit, 30 32 $commit_data);
+1
src/applications/diffusion/controller/DiffusionRepositoryController.php
··· 51 51 $handles = $this->loadViewerHandles($phids); 52 52 53 53 $history_table = new DiffusionHistoryTableView(); 54 + $history_table->setUser($this->getRequest()->getUser()); 54 55 $history_table->setDiffusionRequest($drequest); 55 56 $history_table->setHandles($handles); 56 57 $history_table->setHistory($history);
+6 -6
src/applications/diffusion/view/DiffusionBrowseTableView.php
··· 17 17 return $this; 18 18 } 19 19 20 - public static function renderLastModifiedColumns( 21 - DiffusionRequest $drequest, 20 + public function renderLastModifiedColumns( 22 21 array $handles, 23 22 PhabricatorRepositoryCommit $commit = null, 24 23 PhabricatorRepositoryCommitData $data = null) { 25 24 assert_instances_of($handles, 'PhabricatorObjectHandle'); 25 + 26 + $drequest = $this->getDiffusionRequest(); 26 27 27 28 if ($commit) { 28 29 $epoch = $commit->getEpoch(); 29 30 $modified = DiffusionView::linkCommit( 30 31 $drequest->getRepository(), 31 32 $commit->getCommitIdentifier()); 32 - $date = date('M j, Y', $epoch); 33 - $time = date('g:i A', $epoch); 33 + $date = phabricator_date($epoch, $this->user); 34 + $time = phabricator_time($epoch, $this->user); 34 35 } else { 35 36 $modified = ''; 36 37 $date = ''; ··· 169 170 if ($commit) { 170 171 $drequest = clone $request; 171 172 $drequest->setPath($request->getPath().$path->getPath().$dir_slash); 172 - $dict = self::renderLastModifiedColumns( 173 - $drequest, 173 + $dict = $this->renderLastModifiedColumns( 174 174 $this->handles, 175 175 $commit, 176 176 $path->getLastCommitData());
+2 -2
src/applications/diffusion/view/DiffusionHistoryTableView.php
··· 74 74 $epoch = $history->getEpoch(); 75 75 76 76 if ($epoch) { 77 - $date = date('M j, Y', $epoch); 78 - $time = date('g:i A', $epoch); 77 + $date = phabricator_date($epoch, $this->user); 78 + $time = phabricator_time($epoch, $this->user); 79 79 } else { 80 80 $date = null; 81 81 $time = null;