mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Rename setViewer() to setUser() in views
Summary: I prefer consistency. Test Plan: /paste/ Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4249
This commit is contained in:
parent
9c27c7ab60
commit
96e5264f05
12 changed files with 11 additions and 37 deletions
|
@ -6,17 +6,11 @@ final class PhabricatorFeedStoryView extends PhabricatorFeedView {
|
|||
private $image;
|
||||
private $phid;
|
||||
private $epoch;
|
||||
private $viewer;
|
||||
private $viewed;
|
||||
private $href;
|
||||
|
||||
private $oneLine;
|
||||
|
||||
public function setViewer(PhabricatorUser $viewer) {
|
||||
$this->viewer = $viewer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setTitle($title) {
|
||||
$this->title = $title;
|
||||
return $this;
|
||||
|
@ -98,7 +92,7 @@ final class PhabricatorFeedStoryView extends PhabricatorFeedView {
|
|||
$this->renderChildren());
|
||||
|
||||
if ($this->epoch) {
|
||||
$foot = phabricator_datetime($this->epoch, $this->viewer);
|
||||
$foot = phabricator_datetime($this->epoch, $this->user);
|
||||
} else {
|
||||
$foot = '';
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ final class PhabricatorFileListController extends PhabricatorFileController {
|
|||
$highlighted_ids = array_fill_keys($highlighted_ids, true);
|
||||
|
||||
$list_view = id(new PhabricatorObjectItemListView())
|
||||
->setViewer($user);
|
||||
->setUser($user);
|
||||
|
||||
foreach ($files as $file) {
|
||||
$id = $file->getID();
|
||||
|
|
|
@ -56,7 +56,7 @@ final class PhabricatorMacroViewController
|
|||
$engine->process();
|
||||
|
||||
$timeline = id(new PhabricatorApplicationTransactionView())
|
||||
->setViewer($user)
|
||||
->setUser($user)
|
||||
->setTransactions($xactions)
|
||||
->setMarkupEngine($engine);
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ final class PhabricatorPasteListController extends PhabricatorPasteController {
|
|||
$lang_map = PhabricatorEnv::getEnvConfig('pygments.dropdown-choices');
|
||||
|
||||
$list = new PhabricatorObjectItemListView();
|
||||
$list->setViewer($user);
|
||||
$list->setUser($user);
|
||||
foreach ($pastes as $paste) {
|
||||
$created = phabricator_date($paste->getDateCreated(), $user);
|
||||
$author = $this->getHandle($paste->getAuthorPHID())->renderLink();
|
||||
|
|
|
@ -41,7 +41,7 @@ abstract class PhameController extends PhabricatorController {
|
|||
assert_instances_of($posts, 'PhamePost');
|
||||
|
||||
$list = id(new PhabricatorObjectItemListView())
|
||||
->setViewer($user)
|
||||
->setUser($user)
|
||||
->setNoDataString($nodata);
|
||||
|
||||
foreach ($posts as $post) {
|
||||
|
|
|
@ -71,7 +71,7 @@ final class PhameBlogListController extends PhameController {
|
|||
|
||||
$view = new PhabricatorObjectItemListView();
|
||||
$view->setNoDataString($nodata);
|
||||
$view->setViewer($user);
|
||||
$view->setUser($user);
|
||||
foreach ($blogs as $blog) {
|
||||
|
||||
$item = id(new PhabricatorObjectItemView())
|
||||
|
|
|
@ -283,7 +283,7 @@ abstract class PhameBasicBlogSkin extends PhameBlogSkin {
|
|||
$views = array();
|
||||
foreach ($posts as $post) {
|
||||
$view = id(new PhamePostView())
|
||||
->setViewer($user)
|
||||
->setUser($user)
|
||||
->setSkin($this)
|
||||
->setPost($post)
|
||||
->setBody($engine->getOutput($post, PhamePost::MARKUP_FIELD_BODY))
|
||||
|
|
|
@ -7,7 +7,6 @@ final class PhamePostView extends AphrontView {
|
|||
|
||||
private $post;
|
||||
private $author;
|
||||
private $viewer;
|
||||
private $body;
|
||||
private $skin;
|
||||
private $summary;
|
||||
|
@ -22,15 +21,6 @@ final class PhamePostView extends AphrontView {
|
|||
return $this->skin;
|
||||
}
|
||||
|
||||
public function setViewer(PhabricatorUser $viewer) {
|
||||
$this->viewer = $viewer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getViewer() {
|
||||
return $this->viewer;
|
||||
}
|
||||
|
||||
public function setAuthor(PhabricatorObjectHandle $author) {
|
||||
$this->author = $author;
|
||||
return $this;
|
||||
|
@ -93,7 +83,7 @@ final class PhamePostView extends AphrontView {
|
|||
'Published on %s by %s',
|
||||
phabricator_datetime(
|
||||
$this->getPost()->getDatePublished(),
|
||||
$this->getViewer()),
|
||||
$this->getUser()),
|
||||
$this->getAuthor()->getName())));
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ final class PonderFeedController extends PonderController {
|
|||
$user = $this->getRequest()->getUser();
|
||||
|
||||
$view = new PhabricatorObjectItemListView();
|
||||
$view->setViewer($user);
|
||||
$view->setUser($user);
|
||||
$view->setNoDataString(pht('No matching questions.'));
|
||||
foreach ($questions as $question) {
|
||||
$item = new PhabricatorObjectItemView();
|
||||
|
|
|
@ -55,7 +55,7 @@ final class PonderUserProfileView extends AphrontView {
|
|||
$answers = $apagebuttons->sliceResults($answers);
|
||||
|
||||
$view = new PhabricatorObjectItemListView();
|
||||
$view->setViewer($user);
|
||||
$view->setUser($user);
|
||||
$view->setNoDataString(pht('No matching answers.'));
|
||||
|
||||
foreach ($answers as $answer) {
|
||||
|
|
|
@ -60,7 +60,7 @@ final class PhabricatorApplicationTransactionCommentHistoryController
|
|||
}
|
||||
|
||||
$view = id(new PhabricatorApplicationTransactionView())
|
||||
->setViewer($user)
|
||||
->setUser($user)
|
||||
->setTransactions($xactions)
|
||||
->setShowEditActions(false);
|
||||
|
||||
|
|
|
@ -6,16 +6,6 @@ final class PhabricatorObjectItemListView extends AphrontView {
|
|||
private $items;
|
||||
private $pager;
|
||||
private $noDataString;
|
||||
private $viewer;
|
||||
|
||||
public function setViewer($viewer) {
|
||||
$this->viewer = $viewer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getViewer() {
|
||||
return $this->viewer;
|
||||
}
|
||||
|
||||
public function setHeader($header) {
|
||||
$this->header = $header;
|
||||
|
|
Loading…
Reference in a new issue