diff --git a/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php b/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php index 110d7b8618..5d1d923d0c 100644 --- a/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php +++ b/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php @@ -66,7 +66,7 @@ final class PhabricatorHighSecurityRequestExceptionHandler } $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle($title) ->setShortTitle(pht('Security Checkpoint')) ->setWidth(AphrontDialogView::WIDTH_FORM) diff --git a/src/aphront/handler/PhabricatorRateLimitRequestExceptionHandler.php b/src/aphront/handler/PhabricatorRateLimitRequestExceptionHandler.php index 07cbe10ebe..78dad564b4 100644 --- a/src/aphront/handler/PhabricatorRateLimitRequestExceptionHandler.php +++ b/src/aphront/handler/PhabricatorRateLimitRequestExceptionHandler.php @@ -32,7 +32,7 @@ final class PhabricatorRateLimitRequestExceptionHandler return id(new AphrontDialogView()) ->setTitle(pht('Slow Down!')) - ->setViewer($viewer) + ->setUser($viewer) ->setErrors(array(pht('You are being rate limited.'))) ->appendParagraph($throwable->getMessage()) ->appendParagraph($throwable->getRateExplanation()) diff --git a/src/aphront/response/Aphront403Response.php b/src/aphront/response/Aphront403Response.php index 45e58c55d0..3d3d5c9457 100644 --- a/src/aphront/response/Aphront403Response.php +++ b/src/aphront/response/Aphront403Response.php @@ -26,7 +26,7 @@ final class Aphront403Response extends AphrontHTMLResponse { $user = $request->getUser(); $dialog = id(new AphrontDialogView()) - ->setViewer($user) + ->setUser($user) ->setTitle(pht('403 Forbidden')) ->addCancelButton('/', pht('Yikes!')) ->appendParagraph($forbidden_text); diff --git a/src/aphront/response/AphrontRedirectResponse.php b/src/aphront/response/AphrontRedirectResponse.php index 6c617b3466..5494d3e0e3 100644 --- a/src/aphront/response/AphrontRedirectResponse.php +++ b/src/aphront/response/AphrontRedirectResponse.php @@ -68,7 +68,7 @@ class AphrontRedirectResponse extends AphrontResponse { $view->setTitle(pht('Stopped on Redirect')); $dialog = new AphrontDialogView(); - $dialog->setViewer($viewer); + $dialog->setUser($viewer); $dialog->setTitle(pht('Stopped on Redirect')); $dialog->appendParagraph( @@ -87,7 +87,7 @@ class AphrontRedirectResponse extends AphrontResponse { $dialog->appendChild( id(new AphrontStackTraceView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTrace($this->stackWhenCreated)); $dialog->setIsStandalone(true); diff --git a/src/applications/almanac/controller/AlmanacBindingEditController.php b/src/applications/almanac/controller/AlmanacBindingEditController.php index f67389db4b..f33bf73ccb 100644 --- a/src/applications/almanac/controller/AlmanacBindingEditController.php +++ b/src/applications/almanac/controller/AlmanacBindingEditController.php @@ -83,7 +83,7 @@ final class AlmanacBindingEditController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendControl( id(new AphrontFormTokenizerControl()) ->setName('interfacePHIDs') diff --git a/src/applications/almanac/controller/AlmanacBindingViewController.php b/src/applications/almanac/controller/AlmanacBindingViewController.php index a4f5b7b475..d1ed2178d2 100644 --- a/src/applications/almanac/controller/AlmanacBindingViewController.php +++ b/src/applications/almanac/controller/AlmanacBindingViewController.php @@ -31,7 +31,7 @@ final class AlmanacBindingViewController $curtain = $this->buildCurtain($binding); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($title) ->setPolicyObject($binding) ->setHeaderIcon('fa-object-group'); @@ -83,7 +83,7 @@ final class AlmanacBindingViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $properties->addProperty( pht('Service'), @@ -108,7 +108,7 @@ final class AlmanacBindingViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($binding); $properties->invokeWillRenderEvent(); diff --git a/src/applications/almanac/controller/AlmanacDeviceViewController.php b/src/applications/almanac/controller/AlmanacDeviceViewController.php index fe7ae31297..39939abfa7 100644 --- a/src/applications/almanac/controller/AlmanacDeviceViewController.php +++ b/src/applications/almanac/controller/AlmanacDeviceViewController.php @@ -26,7 +26,7 @@ final class AlmanacDeviceViewController $curtain = $this->buildCurtain($device); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($device->getName()) ->setPolicyObject($device) ->setHeaderIcon('fa-server'); @@ -120,7 +120,7 @@ final class AlmanacDeviceViewController ->execute(); $table = id(new AlmanacInterfaceTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setInterfaces($interfaces) ->setCanEdit($can_edit); @@ -158,7 +158,7 @@ final class AlmanacDeviceViewController ->execute(); $table = id(new PhabricatorAuthSSHKeyTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setKeys($keys) ->setCanEdit($can_edit) ->setShowID(true) diff --git a/src/applications/almanac/controller/AlmanacNamespaceViewController.php b/src/applications/almanac/controller/AlmanacNamespaceViewController.php index 242e955e07..a673bdf648 100644 --- a/src/applications/almanac/controller/AlmanacNamespaceViewController.php +++ b/src/applications/almanac/controller/AlmanacNamespaceViewController.php @@ -24,7 +24,7 @@ final class AlmanacNamespaceViewController $curtain = $this->buildCurtain($namespace); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($namespace->getName()) ->setPolicyObject($namespace) ->setHeaderIcon('fa-asterisk'); diff --git a/src/applications/almanac/controller/AlmanacNetworkViewController.php b/src/applications/almanac/controller/AlmanacNetworkViewController.php index 48c60dcda4..271ae1a0fb 100644 --- a/src/applications/almanac/controller/AlmanacNetworkViewController.php +++ b/src/applications/almanac/controller/AlmanacNetworkViewController.php @@ -24,7 +24,7 @@ final class AlmanacNetworkViewController $curtain = $this->buildCurtain($network); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($network->getName()) ->setHeaderIcon('fa-globe') ->setPolicyObject($network); diff --git a/src/applications/almanac/controller/AlmanacPropertyEditController.php b/src/applications/almanac/controller/AlmanacPropertyEditController.php index 1067ae6b67..ef587e5b05 100644 --- a/src/applications/almanac/controller/AlmanacPropertyEditController.php +++ b/src/applications/almanac/controller/AlmanacPropertyEditController.php @@ -70,7 +70,7 @@ final class AlmanacPropertyEditController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormTextControl()) ->setName('key') diff --git a/src/applications/almanac/controller/AlmanacServiceEditController.php b/src/applications/almanac/controller/AlmanacServiceEditController.php index 4fffcfadaf..710e27a966 100644 --- a/src/applications/almanac/controller/AlmanacServiceEditController.php +++ b/src/applications/almanac/controller/AlmanacServiceEditController.php @@ -83,7 +83,7 @@ final class AlmanacServiceEditController ->setHeaderIcon('fa-plus-square'); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild($type_control) ->appendChild( id(new AphrontFormSubmitControl()) diff --git a/src/applications/almanac/controller/AlmanacServiceViewController.php b/src/applications/almanac/controller/AlmanacServiceViewController.php index ca4a34375e..3cb7451463 100644 --- a/src/applications/almanac/controller/AlmanacServiceViewController.php +++ b/src/applications/almanac/controller/AlmanacServiceViewController.php @@ -27,7 +27,7 @@ final class AlmanacServiceViewController $details = $this->buildPropertySection($service); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($service->getName()) ->setPolicyObject($service) ->setHeaderIcon('fa-plug'); @@ -74,7 +74,7 @@ final class AlmanacServiceViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $properties->addProperty( pht('Service Type'), @@ -127,7 +127,7 @@ final class AlmanacServiceViewController $table = id(new AlmanacBindingTableView()) ->setNoDataString( pht('This service has not been bound to any device interfaces yet.')) - ->setViewer($viewer) + ->setUser($viewer) ->setBindings($bindings) ->setHideServiceColumn(true); diff --git a/src/applications/almanac/query/AlmanacDeviceSearchEngine.php b/src/applications/almanac/query/AlmanacDeviceSearchEngine.php index a7277bd389..a3e8af7243 100644 --- a/src/applications/almanac/query/AlmanacDeviceSearchEngine.php +++ b/src/applications/almanac/query/AlmanacDeviceSearchEngine.php @@ -107,7 +107,7 @@ final class AlmanacDeviceSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($devices as $device) { $item = id(new PHUIObjectItemView()) ->setObjectName(pht('Device %d', $device->getID())) diff --git a/src/applications/almanac/query/AlmanacNamespaceSearchEngine.php b/src/applications/almanac/query/AlmanacNamespaceSearchEngine.php index 23853ce6d4..3ac2b76ee0 100644 --- a/src/applications/almanac/query/AlmanacNamespaceSearchEngine.php +++ b/src/applications/almanac/query/AlmanacNamespaceSearchEngine.php @@ -73,7 +73,7 @@ final class AlmanacNamespaceSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($namespaces as $namespace) { $id = $namespace->getID(); diff --git a/src/applications/almanac/query/AlmanacNetworkSearchEngine.php b/src/applications/almanac/query/AlmanacNetworkSearchEngine.php index f66abcc5e3..941d648d67 100644 --- a/src/applications/almanac/query/AlmanacNetworkSearchEngine.php +++ b/src/applications/almanac/query/AlmanacNetworkSearchEngine.php @@ -73,7 +73,7 @@ final class AlmanacNetworkSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($networks as $network) { $id = $network->getID(); diff --git a/src/applications/almanac/query/AlmanacServiceSearchEngine.php b/src/applications/almanac/query/AlmanacServiceSearchEngine.php index 1fb798ab43..5f0da6b59e 100644 --- a/src/applications/almanac/query/AlmanacServiceSearchEngine.php +++ b/src/applications/almanac/query/AlmanacServiceSearchEngine.php @@ -100,7 +100,7 @@ final class AlmanacServiceSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($services as $service) { $item = id(new PHUIObjectItemView()) ->setObjectName(pht('Service %d', $service->getID())) diff --git a/src/applications/almanac/view/AlmanacBindingTableView.php b/src/applications/almanac/view/AlmanacBindingTableView.php index 275bfe449e..a74cb4f9c3 100644 --- a/src/applications/almanac/view/AlmanacBindingTableView.php +++ b/src/applications/almanac/view/AlmanacBindingTableView.php @@ -36,7 +36,7 @@ final class AlmanacBindingTableView extends AphrontView { public function render() { $bindings = $this->getBindings(); - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $phids = array(); foreach ($bindings as $binding) { diff --git a/src/applications/almanac/view/AlmanacInterfaceTableView.php b/src/applications/almanac/view/AlmanacInterfaceTableView.php index a657fa6887..1fdcd0bf35 100644 --- a/src/applications/almanac/view/AlmanacInterfaceTableView.php +++ b/src/applications/almanac/view/AlmanacInterfaceTableView.php @@ -25,7 +25,7 @@ final class AlmanacInterfaceTableView extends AphrontView { public function render() { $interfaces = $this->getInterfaces(); - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $can_edit = $this->getCanEdit(); diff --git a/src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php b/src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php index a42827c20f..3d79bcfb81 100644 --- a/src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php +++ b/src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php @@ -59,7 +59,7 @@ final class PhabricatorAuthConfirmLinkController PlatformSymbols::getPlatformServerName()))) ->appendChild( id(new PhabricatorAuthAccountView()) - ->setViewer($viewer) + ->setUser($viewer) ->setExternalAccount($account) ->setAuthProvider($provider)); diff --git a/src/applications/auth/controller/PhabricatorAuthLoginController.php b/src/applications/auth/controller/PhabricatorAuthLoginController.php index 43aaa3a681..2a1ecf97c4 100644 --- a/src/applications/auth/controller/PhabricatorAuthLoginController.php +++ b/src/applications/auth/controller/PhabricatorAuthLoginController.php @@ -52,7 +52,7 @@ final class PhabricatorAuthLoginController // User explicitly hit "Cancel". $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Authentication Canceled')) ->appendChild( pht('You canceled authentication.')) diff --git a/src/applications/auth/controller/PhabricatorAuthRegisterController.php b/src/applications/auth/controller/PhabricatorAuthRegisterController.php index 25e0b68723..9b1eafd415 100644 --- a/src/applications/auth/controller/PhabricatorAuthRegisterController.php +++ b/src/applications/auth/controller/PhabricatorAuthRegisterController.php @@ -510,7 +510,7 @@ final class PhabricatorAuthRegisterController } $form = id(new AphrontFormView()) - ->setViewer($request->getUser()) + ->setUser($request->getUser()) ->addHiddenInput('phase', 2); if (!$is_default) { @@ -519,7 +519,7 @@ final class PhabricatorAuthRegisterController ->setLabel(pht('External Account')) ->setValue( id(new PhabricatorAuthAccountView()) - ->setViewer($request->getUser()) + ->setUser($request->getUser()) ->setExternalAccount($account) ->setAuthProvider($provider))); } diff --git a/src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php b/src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php index 980c2f9c2c..88bbcb5f8e 100644 --- a/src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php +++ b/src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php @@ -102,7 +102,7 @@ final class PhabricatorAuthSSHKeyEditController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormTextControl()) ->setLabel(pht('Name')) diff --git a/src/applications/auth/controller/PhabricatorAuthSSHKeyViewController.php b/src/applications/auth/controller/PhabricatorAuthSSHKeyViewController.php index 86dc8e8296..591b835d62 100644 --- a/src/applications/auth/controller/PhabricatorAuthSSHKeyViewController.php +++ b/src/applications/auth/controller/PhabricatorAuthSSHKeyViewController.php @@ -28,7 +28,7 @@ final class PhabricatorAuthSSHKeyViewController $details = $this->buildPropertySection($ssh_key); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($ssh_key->getName()) ->setHeaderIcon('fa-key'); @@ -108,7 +108,7 @@ final class PhabricatorAuthSSHKeyViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $properties->addProperty(pht('Public Key'), $ssh_key->getEntireKey()); $properties->addProperty( diff --git a/src/applications/auth/controller/PhabricatorEmailVerificationController.php b/src/applications/auth/controller/PhabricatorEmailVerificationController.php index b3dd707387..996795eb94 100644 --- a/src/applications/auth/controller/PhabricatorEmailVerificationController.php +++ b/src/applications/auth/controller/PhabricatorEmailVerificationController.php @@ -66,7 +66,7 @@ final class PhabricatorEmailVerificationController } $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle($title) ->addCancelButton('/', $continue) ->appendChild($content); diff --git a/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php b/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php index 04d717d8ee..2f15460eac 100644 --- a/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php +++ b/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php @@ -42,7 +42,7 @@ final class PhabricatorMustVerifyEmailController 'to try sending another one.'); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Check Your Email')) ->appendParagraph($must_verify) ->appendParagraph($send_again) diff --git a/src/applications/auth/controller/config/PhabricatorAuthEditController.php b/src/applications/auth/controller/config/PhabricatorAuthEditController.php index c3f4fcc05a..e105a3fd2b 100644 --- a/src/applications/auth/controller/config/PhabricatorAuthEditController.php +++ b/src/applications/auth/controller/config/PhabricatorAuthEditController.php @@ -59,7 +59,7 @@ final class PhabricatorAuthEditController if ($configs) { $id = head($configs)->getID(); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setMethod('GET') ->setSubmitURI($this->getApplicationURI('config/edit/'.$id.'/')) ->setTitle(pht('Provider Already Configured')) @@ -277,7 +277,7 @@ final class PhabricatorAuthEditController 'the only available provider.')); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('provider', $provider_class) ->appendChild( id(new AphrontFormCheckboxControl()) diff --git a/src/applications/auth/controller/config/PhabricatorAuthNewController.php b/src/applications/auth/controller/config/PhabricatorAuthNewController.php index ce833e8158..cb1c537ca8 100644 --- a/src/applications/auth/controller/config/PhabricatorAuthNewController.php +++ b/src/applications/auth/controller/config/PhabricatorAuthNewController.php @@ -25,7 +25,7 @@ final class PhabricatorAuthNewController $locked_config_key)); return $this->newDialog() - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Authentication Config Locked')) ->appendChild($message) ->addCancelButton($cancel_uri); diff --git a/src/applications/auth/controller/mfa/PhabricatorAuthFactorProviderEditController.php b/src/applications/auth/controller/mfa/PhabricatorAuthFactorProviderEditController.php index 6039de7b25..a1636396ac 100644 --- a/src/applications/auth/controller/mfa/PhabricatorAuthFactorProviderEditController.php +++ b/src/applications/auth/controller/mfa/PhabricatorAuthFactorProviderEditController.php @@ -37,7 +37,7 @@ final class PhabricatorAuthFactorProviderEditController $factors = PhabricatorAuthFactor::getAllFactors(); $menu = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setBig(true) ->setFlush(true); diff --git a/src/applications/auth/engine/PhabricatorAuthSessionEngine.php b/src/applications/auth/engine/PhabricatorAuthSessionEngine.php index 571039c412..0a62103ef7 100644 --- a/src/applications/auth/engine/PhabricatorAuthSessionEngine.php +++ b/src/applications/auth/engine/PhabricatorAuthSessionEngine.php @@ -755,7 +755,7 @@ final class PhabricatorAuthSessionEngine extends Phobject { PhabricatorAuthFactorResult::class); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions(''); $answered = array(); diff --git a/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php b/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php index 1a4bf0c0fd..c0a3b8ce7d 100644 --- a/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php +++ b/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php @@ -72,7 +72,7 @@ final class PhabricatorLDAPAuthProvider extends PhabricatorAuthProvider { $dialog = id(new AphrontDialogView()) ->setSubmitURI($this->getLoginURI()) - ->setViewer($viewer); + ->setUser($viewer); if ($mode == 'link') { $dialog->setTitle(pht('Link LDAP Account')); @@ -110,7 +110,7 @@ final class PhabricatorLDAPAuthProvider extends PhabricatorAuthProvider { } $form = id(new PHUIFormLayoutView()) - ->setViewer($viewer) + ->setUser($viewer) ->setFullWidth(true) ->appendChild( id(new AphrontFormTextControl()) diff --git a/src/applications/auth/provider/PhabricatorPasswordAuthProvider.php b/src/applications/auth/provider/PhabricatorPasswordAuthProvider.php index e862be998a..4513787d89 100644 --- a/src/applications/auth/provider/PhabricatorPasswordAuthProvider.php +++ b/src/applications/auth/provider/PhabricatorPasswordAuthProvider.php @@ -142,7 +142,7 @@ final class PhabricatorPasswordAuthProvider extends PhabricatorAuthProvider { $viewer = $request->getViewer(); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('invite', true) ->appendChild( id(new AphrontFormTextControl()) @@ -150,7 +150,7 @@ final class PhabricatorPasswordAuthProvider extends PhabricatorAuthProvider { ->setName('username')); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Register an Account')) ->appendForm($form) ->setSubmitURI('/auth/register/') @@ -172,7 +172,7 @@ final class PhabricatorPasswordAuthProvider extends PhabricatorAuthProvider { $dialog = id(new AphrontDialogView()) ->setSubmitURI($this->getLoginURI()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Log In')) ->addSubmitButton(pht('Log In')); diff --git a/src/applications/auth/query/PhabricatorAuthSSHKeySearchEngine.php b/src/applications/auth/query/PhabricatorAuthSSHKeySearchEngine.php index 2ea39865a3..f0421d7466 100644 --- a/src/applications/auth/query/PhabricatorAuthSSHKeySearchEngine.php +++ b/src/applications/auth/query/PhabricatorAuthSSHKeySearchEngine.php @@ -87,7 +87,7 @@ final class PhabricatorAuthSSHKeySearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($keys as $key) { $item = id(new PHUIObjectItemView()) ->setObjectName(pht('SSH Key %d', $key->getID())) diff --git a/src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php b/src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php index a7c8e53418..b9e3f56e86 100644 --- a/src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php +++ b/src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php @@ -31,7 +31,7 @@ final class PhabricatorAuthSSHKeyTableView extends AphrontView { $view_uri = "/auth/sshkey/for/{$object_phid}/"; $action_view = id(new PhabricatorActionListView()) - ->setViewer($viewer) + ->setUser($viewer) ->addAction( id(new PhabricatorActionView()) ->setHref($upload_uri) @@ -91,7 +91,7 @@ final class PhabricatorAuthSSHKeyTableView extends AphrontView { public function render() { $keys = $this->keys; - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $trusted_icon = id(new PHUIIconView()) ->setIcon('fa-star blue'); diff --git a/src/applications/badges/controller/PhabricatorBadgesAwardController.php b/src/applications/badges/controller/PhabricatorBadgesAwardController.php index 8ed6e0389e..1a31584a51 100644 --- a/src/applications/badges/controller/PhabricatorBadgesAwardController.php +++ b/src/applications/badges/controller/PhabricatorBadgesAwardController.php @@ -59,7 +59,7 @@ final class PhabricatorBadgesAwardController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendControl( id(new AphrontFormTokenizerControl()) ->setLabel(pht('Badge')) diff --git a/src/applications/badges/controller/PhabricatorBadgesEditRecipientsController.php b/src/applications/badges/controller/PhabricatorBadgesEditRecipientsController.php index 24052b5f6f..f25fd93542 100644 --- a/src/applications/badges/controller/PhabricatorBadgesEditRecipientsController.php +++ b/src/applications/badges/controller/PhabricatorBadgesEditRecipientsController.php @@ -58,7 +58,7 @@ final class PhabricatorBadgesEditRecipientsController $form = new AphrontFormView(); $form - ->setViewer($viewer) + ->setUser($viewer) ->setFullWidth(true) ->appendControl( id(new AphrontFormTokenizerControl()) @@ -68,7 +68,7 @@ final class PhabricatorBadgesEditRecipientsController ->setDatasource(new PhabricatorPeopleDatasource())); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Add Recipients')) ->appendForm($form) ->addCancelButton($view_uri) diff --git a/src/applications/badges/controller/PhabricatorBadgesProfileController.php b/src/applications/badges/controller/PhabricatorBadgesProfileController.php index 77f0160c27..97d4b11b93 100644 --- a/src/applications/badges/controller/PhabricatorBadgesProfileController.php +++ b/src/applications/badges/controller/PhabricatorBadgesProfileController.php @@ -36,7 +36,7 @@ abstract class PhabricatorBadgesProfileController return id(new PHUIHeaderView()) ->setHeader($badge->getName()) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($badge) ->setStatus($status_icon, $status_color, $status_name) ->setHeaderIcon('fa-trophy'); diff --git a/src/applications/badges/controller/PhabricatorBadgesRecipientsController.php b/src/applications/badges/controller/PhabricatorBadgesRecipientsController.php index 9cac1870e2..a28a37ac30 100644 --- a/src/applications/badges/controller/PhabricatorBadgesRecipientsController.php +++ b/src/applications/badges/controller/PhabricatorBadgesRecipientsController.php @@ -40,7 +40,7 @@ final class PhabricatorBadgesRecipientsController ->setBadge($badge) ->setAwards($awards) ->setHandles($handles) - ->setViewer($viewer); + ->setUser($viewer); $view = id(new PHUITwoColumnView()) ->setHeader($header) diff --git a/src/applications/badges/controller/PhabricatorBadgesRemoveRecipientsController.php b/src/applications/badges/controller/PhabricatorBadgesRemoveRecipientsController.php index 4117538c31..4901bf955d 100644 --- a/src/applications/badges/controller/PhabricatorBadgesRemoveRecipientsController.php +++ b/src/applications/badges/controller/PhabricatorBadgesRemoveRecipientsController.php @@ -47,7 +47,7 @@ final class PhabricatorBadgesRemoveRecipientsController ->executeOne(); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Really Revoke Badge?')) ->appendParagraph( pht( diff --git a/src/applications/badges/controller/PhabricatorBadgesViewController.php b/src/applications/badges/controller/PhabricatorBadgesViewController.php index 3173258f6a..a5390ea5f4 100644 --- a/src/applications/badges/controller/PhabricatorBadgesViewController.php +++ b/src/applications/badges/controller/PhabricatorBadgesViewController.php @@ -60,7 +60,7 @@ final class PhabricatorBadgesViewController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $description = $badge->getDescription(); if (strlen($description)) { diff --git a/src/applications/calendar/controller/PhabricatorCalendarExportViewController.php b/src/applications/calendar/controller/PhabricatorCalendarExportViewController.php index cf17e88fa6..1dc2a8d1be 100644 --- a/src/applications/calendar/controller/PhabricatorCalendarExportViewController.php +++ b/src/applications/calendar/controller/PhabricatorCalendarExportViewController.php @@ -64,7 +64,7 @@ final class PhabricatorCalendarExportViewController } $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($export->getName()) ->setStatus($icon, $color, $status) ->setPolicyObject($export); @@ -128,7 +128,7 @@ final class PhabricatorCalendarExportViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $mode = $export->getPolicyMode(); diff --git a/src/applications/calendar/controller/PhabricatorCalendarImportEditController.php b/src/applications/calendar/controller/PhabricatorCalendarImportEditController.php index 1367cb040c..9acbd0f2d2 100644 --- a/src/applications/calendar/controller/PhabricatorCalendarImportEditController.php +++ b/src/applications/calendar/controller/PhabricatorCalendarImportEditController.php @@ -90,7 +90,7 @@ final class PhabricatorCalendarImportEditController ->setHeaderIcon('fa-upload'); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild($type_control) ->appendChild( id(new AphrontFormSubmitControl()) diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php index d1da9dbad8..84810a6505 100644 --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -317,7 +317,7 @@ final class PhabricatorCalendarEventSearchEngine } $item = id(new PHUIObjectItemView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($event) ->setObjectName($monogram) ->setHeader($event->getName()) @@ -448,7 +448,7 @@ final class PhabricatorCalendarEventSearchEngine $start_day)) ->setQuery($query->getQueryKey()); - $day_view->setViewer($viewer); + $day_view->setUser($viewer); $phids = mpull($events, 'getHostPHID'); diff --git a/src/applications/conduit/controller/PhabricatorConduitConsoleController.php b/src/applications/conduit/controller/PhabricatorConduitConsoleController.php index 998d175ea4..aa9a8c2796 100644 --- a/src/applications/conduit/controller/PhabricatorConduitConsoleController.php +++ b/src/applications/conduit/controller/PhabricatorConduitConsoleController.php @@ -27,7 +27,7 @@ final class PhabricatorConduitConsoleController $form = id(new AphrontFormView()) ->setAction($call_uri) - ->setViewer($request->getUser()) + ->setUser($request->getUser()) ->appendRemarkupInstructions( pht( 'Enter parameters using **JSON**. For instance, to enter a '. @@ -67,7 +67,7 @@ final class PhabricatorConduitConsoleController } $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($method->getAPIMethodName()) ->setHeaderIcon('fa-tty'); diff --git a/src/applications/conduit/controller/PhabricatorConduitTokenController.php b/src/applications/conduit/controller/PhabricatorConduitTokenController.php index 66995a9c35..fe6d676b68 100644 --- a/src/applications/conduit/controller/PhabricatorConduitTokenController.php +++ b/src/applications/conduit/controller/PhabricatorConduitTokenController.php @@ -42,7 +42,7 @@ final class PhabricatorConduitTokenController Javelin::initBehavior('select-on-click'); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions($pre_instructions) ->appendChild( id(new AphrontFormTextAreaControl()) diff --git a/src/applications/conduit/controller/PhabricatorConduitTokenEditController.php b/src/applications/conduit/controller/PhabricatorConduitTokenEditController.php index cce9874b0b..745706d97f 100644 --- a/src/applications/conduit/controller/PhabricatorConduitTokenEditController.php +++ b/src/applications/conduit/controller/PhabricatorConduitTokenEditController.php @@ -90,7 +90,7 @@ final class PhabricatorConduitTokenEditController } else { Javelin::initBehavior('select-on-click'); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormTextControl()) ->setLabel(pht('Token')) diff --git a/src/applications/conduit/controller/PhabricatorConduitTokenHandshakeController.php b/src/applications/conduit/controller/PhabricatorConduitTokenHandshakeController.php index fcac74c64a..aa640502c7 100644 --- a/src/applications/conduit/controller/PhabricatorConduitTokenHandshakeController.php +++ b/src/applications/conduit/controller/PhabricatorConduitTokenHandshakeController.php @@ -19,7 +19,7 @@ final class PhabricatorConduitTokenHandshakeController unset($unguarded); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions( pht( 'Copy-paste the API Token below to grant access to your account.')) diff --git a/src/applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php b/src/applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php index 6ae9794169..40c4cfdf8c 100644 --- a/src/applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php +++ b/src/applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php @@ -780,7 +780,7 @@ final class PhabricatorConfigDatabaseStatusController private function buildProperties(array $properties, array $issues) { $view = id(new PHUIPropertyListView()) - ->setViewer($this->getRequest()->getUser()); + ->setUser($this->getRequest()->getUser()); foreach ($properties as $property) { list($key, $value) = $property; diff --git a/src/applications/config/controller/services/PhabricatorConfigPurgeCacheController.php b/src/applications/config/controller/services/PhabricatorConfigPurgeCacheController.php index 060a2d7e08..9f40453fde 100644 --- a/src/applications/config/controller/services/PhabricatorConfigPurgeCacheController.php +++ b/src/applications/config/controller/services/PhabricatorConfigPurgeCacheController.php @@ -34,7 +34,7 @@ final class PhabricatorConfigPurgeCacheController } $caches = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); if ($opcode_clearable) { $caches->addProperty( diff --git a/src/applications/config/controller/settings/PhabricatorConfigEditController.php b/src/applications/config/controller/settings/PhabricatorConfigEditController.php index 8fcc27570e..38c592efca 100644 --- a/src/applications/config/controller/settings/PhabricatorConfigEditController.php +++ b/src/applications/config/controller/settings/PhabricatorConfigEditController.php @@ -152,7 +152,7 @@ final class PhabricatorConfigEditController } $form - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('issue', $request->getStr('issue')); $description = $option->newDescriptionRemarkupView($viewer); diff --git a/src/applications/conpherence/controller/ConpherenceColumnViewController.php b/src/applications/conpherence/controller/ConpherenceColumnViewController.php index 123e3f54f7..3bd0c6b111 100644 --- a/src/applications/conpherence/controller/ConpherenceColumnViewController.php +++ b/src/applications/conpherence/controller/ConpherenceColumnViewController.php @@ -48,7 +48,7 @@ final class ConpherenceColumnViewController extends } $durable_column = id(new ConpherenceDurableColumnView()) - ->setViewer($user) + ->setUser($user) ->setVisible(true); if (!$conpherence) { if ($should_404) { diff --git a/src/applications/conpherence/controller/ConpherenceListController.php b/src/applications/conpherence/controller/ConpherenceListController.php index 76c795ce76..008f32f816 100644 --- a/src/applications/conpherence/controller/ConpherenceListController.php +++ b/src/applications/conpherence/controller/ConpherenceListController.php @@ -115,7 +115,7 @@ final class ConpherenceListController extends ConpherenceController { case self::UNSELECTED_MODE: default: $layout = id(new ConpherenceLayoutView()) - ->setViewer($user) + ->setUser($user) ->setBaseURI($this->getApplicationURI()) ->setThreadView($thread_view) ->setRole('list'); diff --git a/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php b/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php index d2805a666b..8458a9d5c4 100644 --- a/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php +++ b/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php @@ -48,7 +48,7 @@ final class ConpherenceNotificationPanelController $image = $d_data['image']; $msg_view = id(new ConpherenceMenuItemView()) - ->setViewer($user) + ->setUser($user) ->setTitle($title) ->setSubtitle($subtitle) ->setHref($uri) diff --git a/src/applications/conpherence/controller/ConpherenceRoomPictureController.php b/src/applications/conpherence/controller/ConpherenceRoomPictureController.php index 87e9963183..47a0576d70 100644 --- a/src/applications/conpherence/controller/ConpherenceRoomPictureController.php +++ b/src/applications/conpherence/controller/ConpherenceRoomPictureController.php @@ -99,7 +99,7 @@ final class ConpherenceRoomPictureController $title = pht('Edit Room Picture'); $form = id(new PHUIFormLayoutView()) - ->setViewer($viewer); + ->setUser($viewer); $default_image = PhabricatorFile::loadBuiltin($viewer, 'conpherence.png'); @@ -192,7 +192,7 @@ final class ConpherenceRoomPictureController ->setForm($form); $upload_form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setEncType('multipart/form-data') ->appendChild( id(new AphrontFormFileControl()) diff --git a/src/applications/conpherence/controller/ConpherenceRoomPreferencesController.php b/src/applications/conpherence/controller/ConpherenceRoomPreferencesController.php index db95d360cc..c868684389 100644 --- a/src/applications/conpherence/controller/ConpherenceRoomPreferencesController.php +++ b/src/applications/conpherence/controller/ConpherenceRoomPreferencesController.php @@ -74,7 +74,7 @@ final class ConpherenceRoomPreferencesController $map[ConpherenceRoomSettings::SOUND_MENTION]); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendControl( id(new AphrontFormRadioButtonControl()) ->setLabel(pht('Notify')) diff --git a/src/applications/conpherence/controller/ConpherenceUpdateController.php b/src/applications/conpherence/controller/ConpherenceUpdateController.php index e38095731c..9a4643ddf2 100644 --- a/src/applications/conpherence/controller/ConpherenceUpdateController.php +++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php @@ -202,7 +202,7 @@ final class ConpherenceUpdateController return $dialog - ->setViewer($user) + ->setUser($user) ->setWidth(AphrontDialogView::WIDTH_FORM) ->setSubmitURI($this->getApplicationURI('update/'.$conpherence_id.'/')) ->addSubmitButton() @@ -218,12 +218,12 @@ final class ConpherenceUpdateController $add_person = $request->getStr('add_person'); $form = id(new AphrontFormView()) - ->setViewer($user) + ->setUser($user) ->setFullWidth(true) ->appendControl( id(new AphrontFormTokenizerControl()) ->setName('add_person') - ->setViewer($user) + ->setUser($user) ->setDatasource(new PhabricatorPeopleDatasource())); $view = id(new AphrontDialogView()) @@ -378,7 +378,7 @@ final class ConpherenceUpdateController switch ($action) { case ConpherenceUpdateActions::ADD_PERSON: $people_widget = id(new ConpherenceParticipantView()) - ->setViewer($user) + ->setUser($user) ->setConpherence($conpherence) ->setUpdateURI($update_uri); $people_widget = hsprintf('%s', $people_widget->render()); diff --git a/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php b/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php index 17b187e124..f716c82ec1 100644 --- a/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php +++ b/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php @@ -146,7 +146,7 @@ final class ConpherenceThreadSearchEngine $content = array(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($conpherences as $conpherence_phid => $conpherence) { $created = phabricator_date($conpherence->getDateCreated(), $viewer); $title = $conpherence->getTitle(); @@ -190,7 +190,7 @@ final class ConpherenceThreadSearchEngine } $view = id(new ConpherenceTransactionView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHandles($handles) ->setMarkupEngine($engines[$conpherence_phid]) ->setConpherenceThread($conpherence) diff --git a/src/applications/conpherence/view/ConpherenceDurableColumnView.php b/src/applications/conpherence/view/ConpherenceDurableColumnView.php index c26b349fff..556754557c 100644 --- a/src/applications/conpherence/view/ConpherenceDurableColumnView.php +++ b/src/applications/conpherence/view/ConpherenceDurableColumnView.php @@ -141,7 +141,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { )); $policy_objects = ConpherenceThread::loadViewPolicyObjects( - $this->getViewer(), + $this->getUser(), $this->getConpherences()); $this->setPolicyObjects($policy_objects); @@ -218,7 +218,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { if ($selected_conpherence->getID() == $conpherence->getID()) { $classes[] = 'selected'; } - $data = $conpherence->getDisplayData($this->getViewer()); + $data = $conpherence->getDisplayData($this->getUser()); $thread_title = phutil_tag( 'span', array(), @@ -320,7 +320,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { ->addClass('phabricator-application-menu'); if ($conpherence) { - $data = $conpherence->getDisplayData($this->getViewer()); + $data = $conpherence->getDisplayData($this->getUser()); $header = phutil_tag( 'span', array(), @@ -359,7 +359,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { $actions = array(); if ($conpherence) { $can_edit = PhabricatorPolicyFilter::hasCapability( - $this->getViewer(), + $this->getUser(), $conpherence, PhabricatorPolicyCapability::CAN_EDIT); $actions[] = array( @@ -421,7 +421,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { } $data = ConpherenceTransactionRenderer::renderTransactions( - $this->getViewer(), + $this->getUser(), $conpherence); $messages = ConpherenceTransactionRenderer::renderMessagePaneContent( $data['transactions'], @@ -463,7 +463,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { )); $id = $conpherence->getID(); return phabricator_form( - $this->getViewer(), + $this->getUser(), array( 'method' => 'POST', 'action' => '/conpherence/update/'.$id.'/', diff --git a/src/applications/conpherence/view/ConpherenceLayoutView.php b/src/applications/conpherence/view/ConpherenceLayoutView.php index 34fe4c4293..3382a9ba87 100644 --- a/src/applications/conpherence/view/ConpherenceLayoutView.php +++ b/src/applications/conpherence/view/ConpherenceLayoutView.php @@ -96,7 +96,7 @@ final class ConpherenceLayoutView extends AphrontTagView { $selected_thread_id = $this->thread->getID(); $selected_thread_phid = $this->thread->getPHID(); $can_edit_selected = PhabricatorPolicyFilter::hasCapability( - $this->getViewer(), + $this->getUser(), $this->thread, PhabricatorPolicyCapability::CAN_EDIT); } else { diff --git a/src/applications/conpherence/view/ConpherenceThreadListView.php b/src/applications/conpherence/view/ConpherenceThreadListView.php index f05ece104d..f3efc96621 100644 --- a/src/applications/conpherence/view/ConpherenceThreadListView.php +++ b/src/applications/conpherence/view/ConpherenceThreadListView.php @@ -69,7 +69,7 @@ final class ConpherenceThreadListView extends AphrontView { private function renderThreadItem( ConpherenceThread $thread) { - $user = $this->getViewer(); + $user = $this->getUser(); $data = $thread->getDisplayData($user); $dom_id = $thread->getPHID().'-nav-item'; diff --git a/src/applications/conpherence/view/ConpherenceTransactionView.php b/src/applications/conpherence/view/ConpherenceTransactionView.php index d818221613..d1d4c1b392 100644 --- a/src/applications/conpherence/view/ConpherenceTransactionView.php +++ b/src/applications/conpherence/view/ConpherenceTransactionView.php @@ -61,7 +61,7 @@ final class ConpherenceTransactionView extends AphrontView { } public function render() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); if (!$viewer) { throw new PhutilInvalidStateException('setUser'); } @@ -122,7 +122,7 @@ final class ConpherenceTransactionView extends AphrontView { } private function renderTransactionInfo() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $thread = $this->getConpherenceThread(); $transaction = $this->getConpherenceTransaction(); $info = array(); diff --git a/src/applications/countdown/controller/PhabricatorCountdownViewController.php b/src/applications/countdown/controller/PhabricatorCountdownViewController.php index 74d55d6f5d..db63613df2 100644 --- a/src/applications/countdown/controller/PhabricatorCountdownViewController.php +++ b/src/applications/countdown/controller/PhabricatorCountdownViewController.php @@ -20,7 +20,7 @@ final class PhabricatorCountdownViewController } $countdown_view = id(new PhabricatorCountdownView()) - ->setViewer($viewer) + ->setUser($viewer) ->setCountdown($countdown); $id = $countdown->getID(); @@ -44,7 +44,7 @@ final class PhabricatorCountdownViewController $header = id(new PHUIHeaderView()) ->setHeader($title) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($countdown) ->setStatus($icon, $color, $status) ->setHeaderIcon('fa-rocket'); diff --git a/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php b/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php index 1351a92ed0..bf98b41308 100644 --- a/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php +++ b/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php @@ -103,7 +103,7 @@ final class PhabricatorCountdownSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($countdowns as $countdown) { $id = $countdown->getID(); $ended = false; @@ -113,7 +113,7 @@ final class PhabricatorCountdownSearchEngine } $item = id(new PHUIObjectItemView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($countdown) ->setObjectName($countdown->getMonogram()) ->setHeader($countdown->getTitle()) diff --git a/src/applications/countdown/remarkup/PhabricatorCountdownRemarkupRule.php b/src/applications/countdown/remarkup/PhabricatorCountdownRemarkupRule.php index 735adf71ce..7952ab6d7d 100644 --- a/src/applications/countdown/remarkup/PhabricatorCountdownRemarkupRule.php +++ b/src/applications/countdown/remarkup/PhabricatorCountdownRemarkupRule.php @@ -24,7 +24,7 @@ final class PhabricatorCountdownRemarkupRule return id(new PhabricatorCountdownView()) ->setCountdown($object) - ->setViewer($viewer); + ->setUser($viewer); } } diff --git a/src/applications/countdown/view/PhabricatorCountdownView.php b/src/applications/countdown/view/PhabricatorCountdownView.php index eab1b96f1f..f88c5a9d9c 100644 --- a/src/applications/countdown/view/PhabricatorCountdownView.php +++ b/src/applications/countdown/view/PhabricatorCountdownView.php @@ -42,7 +42,7 @@ final class PhabricatorCountdownView extends AphrontView { ); $epoch = $countdown->getEpoch(); - $launch_date = phabricator_datetime($epoch, $this->getViewer()); + $launch_date = phabricator_datetime($epoch, $this->getUser()); $foot = phutil_tag( 'td', array( @@ -53,7 +53,7 @@ final class PhabricatorCountdownView extends AphrontView { $description = $countdown->getDescription(); if (strlen($description)) { - $description = new PHUIRemarkupView($this->getViewer(), $description); + $description = new PHUIRemarkupView($this->getUser(), $description); $description = phutil_tag( 'div', array( diff --git a/src/applications/daemon/controller/PhabricatorDaemonBulkJobViewController.php b/src/applications/daemon/controller/PhabricatorDaemonBulkJobViewController.php index e0caa54a3c..00fb297fe0 100644 --- a/src/applications/daemon/controller/PhabricatorDaemonBulkJobViewController.php +++ b/src/applications/daemon/controller/PhabricatorDaemonBulkJobViewController.php @@ -55,7 +55,7 @@ final class PhabricatorDaemonBulkJobViewController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($job); $view->addProperty( diff --git a/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php b/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php index ed48c46643..8d9a9986e4 100644 --- a/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php +++ b/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php @@ -144,7 +144,7 @@ final class PhabricatorDaemonConsoleController ->setTable($completed_table); $daemon_table = id(new PhabricatorDaemonLogListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setDaemonLogs($logs); $daemon_panel = id(new PHUIObjectBoxView()) diff --git a/src/applications/daemon/controller/PhabricatorDaemonLogViewController.php b/src/applications/daemon/controller/PhabricatorDaemonLogViewController.php index 505088b2fb..253a3d5190 100644 --- a/src/applications/daemon/controller/PhabricatorDaemonLogViewController.php +++ b/src/applications/daemon/controller/PhabricatorDaemonLogViewController.php @@ -88,7 +88,7 @@ final class PhabricatorDaemonLogViewController $viewer = $request->getUser(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $id = $daemon->getID(); $c_epoch = $daemon->getDateCreated(); diff --git a/src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php b/src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php index 514790ac4b..dbfc7df465 100644 --- a/src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php +++ b/src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php @@ -11,7 +11,7 @@ final class PhabricatorDashboardConsoleController $viewer = $request->getViewer(); $menu = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setBig(true); $menu->addItem( diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php index e8ea22b9b2..078df3261c 100644 --- a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php +++ b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php @@ -80,7 +80,7 @@ final class PhabricatorDashboardQueryPanelType if (!$viewer->isLoggedIn()) { // If user is not logged in, authored/assigned/etc queries are empty. return id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setNoDataString(pht('You must log in to access this panel.')); } throw new Exception( diff --git a/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php b/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php index 00d40c672f..c4b30652b9 100644 --- a/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php +++ b/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php @@ -113,7 +113,7 @@ final class PhabricatorDashboardPanelSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($panels as $panel) { $item = id(new PHUIObjectItemView()) ->setObjectName($panel->getMonogram()) diff --git a/src/applications/dashboard/query/PhabricatorDashboardPortalSearchEngine.php b/src/applications/dashboard/query/PhabricatorDashboardPortalSearchEngine.php index ac4d26076d..a6006c1112 100644 --- a/src/applications/dashboard/query/PhabricatorDashboardPortalSearchEngine.php +++ b/src/applications/dashboard/query/PhabricatorDashboardPortalSearchEngine.php @@ -64,7 +64,7 @@ final class PhabricatorDashboardPortalSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($portals as $portal) { $item = id(new PHUIObjectItemView()) ->setObjectName($portal->getObjectName()) diff --git a/src/applications/differential/controller/DifferentialChangesetViewController.php b/src/applications/differential/controller/DifferentialChangesetViewController.php index 5ec5bb9f75..c4722e8d37 100644 --- a/src/applications/differential/controller/DifferentialChangesetViewController.php +++ b/src/applications/differential/controller/DifferentialChangesetViewController.php @@ -277,7 +277,7 @@ final class DifferentialChangesetViewController extends DifferentialController { } $detail = id(new DifferentialChangesetListView()) - ->setViewer($this->getViewer()) + ->setUser($this->getViewer()) ->setChangesets(array($changeset)) ->setVisibleChangesets(array($changeset)) ->setRenderingReferences(array($rendering_reference)) diff --git a/src/applications/differential/controller/DifferentialDiffViewController.php b/src/applications/differential/controller/DifferentialDiffViewController.php index 1aea5ec12d..ff6623efe3 100644 --- a/src/applications/differential/controller/DifferentialDiffViewController.php +++ b/src/applications/differential/controller/DifferentialDiffViewController.php @@ -138,7 +138,7 @@ final class DifferentialDiffViewController extends DifferentialController { ->setDiff($diff) ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->setTitle(pht('Diff %d', $diff->getID())) - ->setViewer($request->getUser()); + ->setUser($request->getUser()); $title = pht('Diff %d', $diff->getID()); $crumbs = $this->buildApplicationCrumbs(); diff --git a/src/applications/differential/controller/DifferentialRevisionCloseDetailsController.php b/src/applications/differential/controller/DifferentialRevisionCloseDetailsController.php index f2b6c04dd9..d405125c8e 100644 --- a/src/applications/differential/controller/DifferentialRevisionCloseDetailsController.php +++ b/src/applications/differential/controller/DifferentialRevisionCloseDetailsController.php @@ -25,7 +25,7 @@ final class DifferentialRevisionCloseDetailsController $obj_handle); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Commit Close Explanation')) ->appendParagraph($body) ->addCancelButton($obj_handle->getURI()); diff --git a/src/applications/differential/controller/DifferentialRevisionInlinesController.php b/src/applications/differential/controller/DifferentialRevisionInlinesController.php index a6a933e1d1..da96fed069 100644 --- a/src/applications/differential/controller/DifferentialRevisionInlinesController.php +++ b/src/applications/differential/controller/DifferentialRevisionInlinesController.php @@ -64,7 +64,7 @@ final class DifferentialRevisionInlinesController return id(new PHUIHeaderView()) ->setHeader($revision->getTitle()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeaderIcon('fa-cog') ->addActionLink($button); } diff --git a/src/applications/differential/controller/DifferentialRevisionOperationController.php b/src/applications/differential/controller/DifferentialRevisionOperationController.php index 298521329c..feeb6770b8 100644 --- a/src/applications/differential/controller/DifferentialRevisionOperationController.php +++ b/src/applications/differential/controller/DifferentialRevisionOperationController.php @@ -91,7 +91,7 @@ final class DifferentialRevisionOperationController )); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions( pht( '(NOTE) This feature is new and experimental.')) diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index e2e2b534bb..8a32988bce 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -1329,7 +1329,7 @@ final class DifferentialRevisionViewController ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); return id(new DrydockRepositoryOperationStatusView()) - ->setViewer($viewer) + ->setUser($viewer) ->setBoxView($box_view) ->setOperation($operation); } diff --git a/src/applications/differential/customfield/DifferentialProjectReviewersField.php b/src/applications/differential/customfield/DifferentialProjectReviewersField.php index 64d0b961c2..4e0bb13986 100644 --- a/src/applications/differential/customfield/DifferentialProjectReviewersField.php +++ b/src/applications/differential/customfield/DifferentialProjectReviewersField.php @@ -38,7 +38,7 @@ final class DifferentialProjectReviewersField } $view = id(new DifferentialReviewersView()) - ->setViewer($this->getViewer()) + ->setUser($this->getViewer()) ->setReviewers($reviewers) ->setHandles($handles); diff --git a/src/applications/differential/customfield/DifferentialRevertPlanField.php b/src/applications/differential/customfield/DifferentialRevertPlanField.php index 3d9e7d29cc..ca13788294 100644 --- a/src/applications/differential/customfield/DifferentialRevertPlanField.php +++ b/src/applications/differential/customfield/DifferentialRevertPlanField.php @@ -80,7 +80,7 @@ final class DifferentialRevertPlanField public function renderEditControl(array $handles) { return id(new PhabricatorRemarkupControl()) - ->setViewer($this->getViewer()) + ->setUser($this->getViewer()) ->setName($this->getFieldKey()) ->setValue($this->getValue()) ->setLabel($this->getFieldName()); diff --git a/src/applications/differential/view/DifferentialReviewersView.php b/src/applications/differential/view/DifferentialReviewersView.php index b701bb56e5..684c3e2fec 100644 --- a/src/applications/differential/view/DifferentialReviewersView.php +++ b/src/applications/differential/view/DifferentialReviewersView.php @@ -30,7 +30,7 @@ final class DifferentialReviewersView extends AphrontView { } public function render() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $reviewers = $this->reviewers; $diff = $this->diff; $handles = $this->handles; diff --git a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php index 0a78a0bb2a..b3f02c18d3 100644 --- a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php +++ b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php @@ -139,7 +139,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView { $desc = $row['desc']; if ($row['age']) { - $age = phabricator_datetime($row['age'], $this->getViewer()); + $age = phabricator_datetime($row['age'], $this->getUser()); } else { $age = null; } @@ -255,7 +255,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView { )); $content = phabricator_form( - $this->getViewer(), + $this->getUser(), array( 'action' => '/D'.$revision_id.'#toc', ), diff --git a/src/applications/diffusion/controller/DiffusionBranchTableController.php b/src/applications/diffusion/controller/DiffusionBranchTableController.php index b2fe8cdfad..63b1dbc592 100644 --- a/src/applications/diffusion/controller/DiffusionBranchTableController.php +++ b/src/applications/diffusion/controller/DiffusionBranchTableController.php @@ -56,7 +56,7 @@ final class DiffusionBranchTableController extends DiffusionController { ->execute(); $list = id(new DiffusionBranchListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setBranches($branches) ->setCommits($commits) ->setDiffusionRequest($drequest); diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php index 37e5cc76a1..fae8d9f25c 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseController.php @@ -301,7 +301,7 @@ final class DiffusionBrowseController extends DiffusionController { $browse_table = id(new DiffusionBrowseTableView()) ->setDiffusionRequest($drequest) ->setPaths($results->getPaths()) - ->setViewer($request->getUser()); + ->setUser($request->getUser()); $title = nonempty(basename($drequest->getPath()), '/'); $icon = 'fa-folder-open'; @@ -527,7 +527,7 @@ final class DiffusionBrowseController extends DiffusionController { $drequest->getPath()); $ownership = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setNoDataString(pht('No Owners')); if ($packages) { @@ -810,7 +810,7 @@ final class DiffusionBrowseController extends DiffusionController { $search = $this->renderSearchForm($path); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($this->renderPathLinks($drequest, $mode = 'browse')) ->addActionItem($search) ->addTag($commit_tag) @@ -888,7 +888,7 @@ final class DiffusionBrowseController extends DiffusionController { $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); if ($drequest->getSymbolicType() == 'tag') { $symbolic = $drequest->getSymbolicCommit(); diff --git a/src/applications/diffusion/controller/DiffusionChangeController.php b/src/applications/diffusion/controller/DiffusionChangeController.php index a44d819bf0..0120c978d0 100644 --- a/src/applications/diffusion/controller/DiffusionChangeController.php +++ b/src/applications/diffusion/controller/DiffusionChangeController.php @@ -64,7 +64,7 @@ final class DiffusionChangeController extends DiffusionController { $changeset_view->setRawFileURIs($left_uri, $right_uri); $changeset_view->setRenderURI($repository->getPathURI('diff/')); - $changeset_view->setViewer($viewer); + $changeset_view->setUser($viewer); $changeset_view->setHeader($changeset_header); // TODO: This is pretty awkward, unify the CSS between Diffusion and @@ -112,7 +112,7 @@ final class DiffusionChangeController extends DiffusionController { $header = id(new PHUIHeaderView()) ->setHeader($links) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($drequest->getRepository()) ->addTag($tag); @@ -159,7 +159,7 @@ final class DiffusionChangeController extends DiffusionController { $viewer = $this->getRequest()->getUser(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setActionList($actions); $stable_commit = $drequest->getStableCommit(); diff --git a/src/applications/diffusion/controller/DiffusionCloneController.php b/src/applications/diffusion/controller/DiffusionCloneController.php index 13afd2c9b6..bf118bcf6d 100644 --- a/src/applications/diffusion/controller/DiffusionCloneController.php +++ b/src/applications/diffusion/controller/DiffusionCloneController.php @@ -17,7 +17,7 @@ final class DiffusionCloneController extends DiffusionController { $repository = $drequest->getRepository(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $display_never = PhabricatorRepositoryURI::DISPLAY_NEVER; $warning = null; diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php index 633f192b8f..26493689c4 100644 --- a/src/applications/diffusion/controller/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/DiffusionCommitController.php @@ -439,7 +439,7 @@ final class DiffusionCommitController extends DiffusionController { $change_list->setRenderingReferences($references); $change_list->setRenderURI($repository->getPathURI('diff/')); $change_list->setRepository($repository); - $change_list->setViewer($viewer); + $change_list->setUser($viewer); $change_list->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); // TODO: Try to setBranch() to something reasonable here? @@ -530,7 +530,7 @@ final class DiffusionCommitController extends DiffusionController { $repository = $drequest->getRepository(); $view = id(new PHUIPropertyListView()) - ->setViewer($this->getRequest()->getUser()) + ->setUser($this->getRequest()->getUser()) ->setObject($commit); $edge_query = id(new PhabricatorEdgeQuery()) @@ -966,7 +966,7 @@ final class DiffusionCommitController extends DiffusionController { $viewer = $this->getViewer(); $toc_view = id(new PHUIDiffTableOfContentsListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($header) ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); diff --git a/src/applications/diffusion/controller/DiffusionController.php b/src/applications/diffusion/controller/DiffusionController.php index 82281b0abc..1f77f28d77 100644 --- a/src/applications/diffusion/controller/DiffusionController.php +++ b/src/applications/diffusion/controller/DiffusionController.php @@ -439,7 +439,7 @@ abstract class DiffusionController extends PhabricatorController { } return id(new DiffusionReadmeView()) - ->setViewer($this->getViewer()) + ->setUser($this->getViewer()) ->setPath($readme_path) ->setContent($readme_corpus); } @@ -596,7 +596,7 @@ abstract class DiffusionController extends PhabricatorController { )); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormTypeaheadControl()) ->setHardpointID('locate-control') diff --git a/src/applications/diffusion/controller/DiffusionHistoryController.php b/src/applications/diffusion/controller/DiffusionHistoryController.php index aefce0afeb..eeb8f13118 100644 --- a/src/applications/diffusion/controller/DiffusionHistoryController.php +++ b/src/applications/diffusion/controller/DiffusionHistoryController.php @@ -105,7 +105,7 @@ final class DiffusionHistoryController extends DiffusionController { } $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($header_text) ->setHeaderIcon('fa-clock-o'); diff --git a/src/applications/diffusion/controller/DiffusionIdentityViewController.php b/src/applications/diffusion/controller/DiffusionIdentityViewController.php index 2b56edde3d..1c78ec5992 100644 --- a/src/applications/diffusion/controller/DiffusionIdentityViewController.php +++ b/src/applications/diffusion/controller/DiffusionIdentityViewController.php @@ -20,7 +20,7 @@ final class DiffusionIdentityViewController $curtain = $this->buildCurtain($identity); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($identity->getIdentityShortName()) ->setHeaderIcon('fa-globe'); diff --git a/src/applications/diffusion/controller/DiffusionLintController.php b/src/applications/diffusion/controller/DiffusionLintController.php index 95bf00f34a..704435882d 100644 --- a/src/applications/diffusion/controller/DiffusionLintController.php +++ b/src/applications/diffusion/controller/DiffusionLintController.php @@ -140,7 +140,7 @@ final class DiffusionLintController extends DiffusionController { if (!$drequest) { $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setMethod('GET') ->appendControl( id(new AphrontFormTokenizerControl()) @@ -180,7 +180,7 @@ final class DiffusionLintController extends DiffusionController { $header = id(new PHUIHeaderView()) ->setHeader(pht('Lint: %s', $this->renderPathLinks($drequest, 'lint'))) - ->setViewer($viewer) + ->setUser($viewer) ->setHeaderIcon('fa-code'); $actions = $this->buildActionView($drequest); $properties = $this->buildPropertyView( @@ -307,7 +307,7 @@ final class DiffusionLintController extends DiffusionController { $viewer = $this->getRequest()->getUser(); $view = id(new PhabricatorActionListView()) - ->setViewer($viewer); + ->setUser($viewer); $list_uri = $drequest->generateURI( array( @@ -355,7 +355,7 @@ final class DiffusionLintController extends DiffusionController { $viewer = $this->getRequest()->getUser(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setActionList($actions); $lint_commit = $branch->getLintCommit(); diff --git a/src/applications/diffusion/controller/DiffusionPushEventViewController.php b/src/applications/diffusion/controller/DiffusionPushEventViewController.php index 29e0d46b37..21718c256d 100644 --- a/src/applications/diffusion/controller/DiffusionPushEventViewController.php +++ b/src/applications/diffusion/controller/DiffusionPushEventViewController.php @@ -45,7 +45,7 @@ final class DiffusionPushEventViewController $logs = $event->getLogs(); $updates_table = id(new DiffusionPushLogListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setLogs($logs); $update_box = id(new PHUIObjectBoxView()) diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php index 752a4372e5..8626721fc4 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php @@ -463,7 +463,7 @@ final class DiffusionRepositoryController extends DiffusionController { } $browse_table = id(new DiffusionBrowseTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setDiffusionRequest($drequest); if ($browse_paths) { $browse_table->setPaths($browse_paths); diff --git a/src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php b/src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php index 05b6507744..d2e7700c98 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php @@ -86,7 +86,7 @@ final class DiffusionRepositoryProfilePictureController $title = pht('Edit Picture'); $form = id(new PHUIFormLayoutView()) - ->setViewer($viewer); + ->setUser($viewer); $default_image = PhabricatorFile::loadBuiltin( $viewer, 'repo/code.png'); @@ -210,7 +210,7 @@ final class DiffusionRepositoryProfilePictureController ->setForm($form); $upload_form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setEncType('multipart/form-data') ->appendChild( id(new AphrontFormFileControl()) diff --git a/src/applications/diffusion/controller/DiffusionTagListController.php b/src/applications/diffusion/controller/DiffusionTagListController.php index b941e50a30..ffc6a1a9ef 100644 --- a/src/applications/diffusion/controller/DiffusionTagListController.php +++ b/src/applications/diffusion/controller/DiffusionTagListController.php @@ -72,7 +72,7 @@ final class DiffusionTagListController extends DiffusionController { $tag_list = id(new DiffusionTagListView()) ->setTags($tags) - ->setViewer($viewer) + ->setUser($viewer) ->setCommits($commits) ->setDiffusionRequest($drequest); diff --git a/src/applications/diffusion/management/DiffusionRepositoryAutomationManagementPanel.php b/src/applications/diffusion/management/DiffusionRepositoryAutomationManagementPanel.php index 9b2af12ad2..ac0c1251bb 100644 --- a/src/applications/diffusion/management/DiffusionRepositoryAutomationManagementPanel.php +++ b/src/applications/diffusion/management/DiffusionRepositoryAutomationManagementPanel.php @@ -97,7 +97,7 @@ final class DiffusionRepositoryAutomationManagementPanel $blueprint_view = phutil_tag('em', array(), pht('Not Configured')); } else { $blueprint_view = id(new DrydockObjectAuthorizationView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObjectPHID($repository->getPHID()) ->setBlueprintPHIDs($blueprint_phids); } diff --git a/src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php b/src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php index 5a6612e88d..3b6d0c0f6b 100644 --- a/src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php +++ b/src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php @@ -111,7 +111,7 @@ final class DiffusionSetPasswordSettingsPanel extends PhabricatorSettingsPanel { $title = pht('Set VCS Password'); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions( pht( 'To access repositories hosted on this server over HTTP, you must '. @@ -226,7 +226,7 @@ final class DiffusionSetPasswordSettingsPanel extends PhabricatorSettingsPanel { ->setFormErrors($errors); $remove_form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); if ($vcspassword->getID()) { $remove_form diff --git a/src/applications/diffusion/view/DiffusionBranchListView.php b/src/applications/diffusion/view/DiffusionBranchListView.php index 3e4add04f9..7df1665fd1 100644 --- a/src/applications/diffusion/view/DiffusionBranchListView.php +++ b/src/applications/diffusion/view/DiffusionBranchListView.php @@ -28,7 +28,7 @@ final class DiffusionBranchListView extends DiffusionView { $current_branch = $drequest->getBranch(); $repository = $drequest->getRepository(); $commits = $this->commits; - $viewer = $this->getViewer(); + $viewer = $this->getUser(); require_celerity_resource('diffusion-css'); $buildables = $this->loadBuildables($commits); diff --git a/src/applications/diffusion/view/DiffusionCommitGraphView.php b/src/applications/diffusion/view/DiffusionCommitGraphView.php index 857a33ea7c..acfcfc0d82 100644 --- a/src/applications/diffusion/view/DiffusionCommitGraphView.php +++ b/src/applications/diffusion/view/DiffusionCommitGraphView.php @@ -338,7 +338,7 @@ final class DiffusionCommitGraphView $show_builds = PhabricatorApplication::isClassInstalledForViewer( PhabricatorHarbormasterApplication::class, - $this->getViewer()); + $this->getUser()); return $show_builds; } diff --git a/src/applications/diffusion/view/DiffusionReadmeView.php b/src/applications/diffusion/view/DiffusionReadmeView.php index d8c4aa5ae9..72b7a94f5b 100644 --- a/src/applications/diffusion/view/DiffusionReadmeView.php +++ b/src/applications/diffusion/view/DiffusionReadmeView.php @@ -67,7 +67,7 @@ final class DiffusionReadmeView extends DiffusionView { $markup_field = 'default'; $content = id(new PhabricatorMarkupEngine()) - ->setViewer($this->getViewer()) + ->setViewer($this->getUser()) ->addObject($markup_object, $markup_field) ->process() ->getOutput($markup_object, $markup_field); diff --git a/src/applications/diffusion/view/DiffusionView.php b/src/applications/diffusion/view/DiffusionView.php index 7e10905923..261cc07deb 100644 --- a/src/applications/diffusion/view/DiffusionView.php +++ b/src/applications/diffusion/view/DiffusionView.php @@ -231,7 +231,7 @@ abstract class DiffusionView extends AphrontView { return array(); } - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $harbormaster_app = PhabricatorHarbormasterApplication::class; $have_harbormaster = PhabricatorApplication::isClassInstalledForViewer( diff --git a/src/applications/diviner/controller/DivinerBookController.php b/src/applications/diviner/controller/DivinerBookController.php index 63abc75d98..4e0ae3524b 100644 --- a/src/applications/diviner/controller/DivinerBookController.php +++ b/src/applications/diviner/controller/DivinerBookController.php @@ -31,7 +31,7 @@ final class DivinerBookController extends DivinerController { $header = id(new PHUIHeaderView()) ->setHeader($book->getTitle()) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($book) ->setEpoch($book->getDateModified()) ->setActionList($actions); @@ -110,7 +110,7 @@ final class DivinerBookController extends DivinerController { PhabricatorPolicyCapability::CAN_EDIT); $action_view = id(new PhabricatorActionListView()) - ->setViewer($user) + ->setUser($user) ->setObject($book); $action_view->addAction( diff --git a/src/applications/diviner/controller/DivinerBookEditController.php b/src/applications/diviner/controller/DivinerBookEditController.php index 2316a6d2f2..b783e96746 100644 --- a/src/applications/diviner/controller/DivinerBookEditController.php +++ b/src/applications/diviner/controller/DivinerBookEditController.php @@ -70,7 +70,7 @@ final class DivinerBookEditController extends DivinerController { $edit_capability = PhabricatorPolicyCapability::CAN_EDIT; $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendControl( id(new AphrontFormTokenizerControl()) ->setDatasource(new PhabricatorProjectDatasource()) diff --git a/src/applications/diviner/controller/DivinerFindController.php b/src/applications/diviner/controller/DivinerFindController.php index 9a10055182..072443ed8c 100644 --- a/src/applications/diviner/controller/DivinerFindController.php +++ b/src/applications/diviner/controller/DivinerFindController.php @@ -68,7 +68,7 @@ final class DivinerFindController extends DivinerController { if (!$atoms) { $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Documentation Not Found')) ->appendChild( pht( diff --git a/src/applications/diviner/query/DivinerAtomSearchEngine.php b/src/applications/diviner/query/DivinerAtomSearchEngine.php index 9d8084b92d..c81660e61a 100644 --- a/src/applications/diviner/query/DivinerAtomSearchEngine.php +++ b/src/applications/diviner/query/DivinerAtomSearchEngine.php @@ -138,7 +138,7 @@ final class DivinerAtomSearchEngine extends PhabricatorApplicationSearchEngine { $viewer = $this->requireViewer(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($symbols as $symbol) { $type = $symbol->getType(); diff --git a/src/applications/drydock/controller/DrydockAuthorizationViewController.php b/src/applications/drydock/controller/DrydockAuthorizationViewController.php index ef71fa1295..80a0e5d1ef 100644 --- a/src/applications/drydock/controller/DrydockAuthorizationViewController.php +++ b/src/applications/drydock/controller/DrydockAuthorizationViewController.php @@ -23,7 +23,7 @@ final class DrydockAuthorizationViewController $header = id(new PHUIHeaderView()) ->setHeader($title) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($authorization); $state = $authorization->getBlueprintAuthorizationState(); diff --git a/src/applications/drydock/controller/DrydockBlueprintEditController.php b/src/applications/drydock/controller/DrydockBlueprintEditController.php index 63d212080d..8f066c708b 100644 --- a/src/applications/drydock/controller/DrydockBlueprintEditController.php +++ b/src/applications/drydock/controller/DrydockBlueprintEditController.php @@ -77,7 +77,7 @@ final class DrydockBlueprintEditController extends DrydockBlueprintController { $crumbs->setBorder(true); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild($control) ->appendChild( id(new AphrontFormSubmitControl()) diff --git a/src/applications/drydock/controller/DrydockBlueprintViewController.php b/src/applications/drydock/controller/DrydockBlueprintViewController.php index 8e0f6ed533..2c31e4ae8f 100644 --- a/src/applications/drydock/controller/DrydockBlueprintViewController.php +++ b/src/applications/drydock/controller/DrydockBlueprintViewController.php @@ -18,7 +18,7 @@ final class DrydockBlueprintViewController extends DrydockBlueprintController { $header = id(new PHUIHeaderView()) ->setHeader($title) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($blueprint) ->setHeaderIcon('fa-map-o'); @@ -132,7 +132,7 @@ final class DrydockBlueprintViewController extends DrydockBlueprintController { $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $view->addProperty( pht('Type'), @@ -156,7 +156,7 @@ final class DrydockBlueprintViewController extends DrydockBlueprintController { ->execute(); $resource_list = id(new DrydockResourceListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setResources($resources) ->render() ->setNoDataString(pht('This blueprint has no active resources.')); @@ -222,7 +222,7 @@ final class DrydockBlueprintViewController extends DrydockBlueprintController { mpull($all_authorizations, null, 'getPHID'); $authorization_list = id(new DrydockAuthorizationListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setAuthorizations($authorizations) ->setNoDataString( pht('No objects have active authorizations to use this blueprint.')); diff --git a/src/applications/drydock/controller/DrydockConsoleController.php b/src/applications/drydock/controller/DrydockConsoleController.php index 189a1e7980..2d7ccfb8a0 100644 --- a/src/applications/drydock/controller/DrydockConsoleController.php +++ b/src/applications/drydock/controller/DrydockConsoleController.php @@ -26,7 +26,7 @@ final class DrydockConsoleController extends DrydockController { $viewer = $request->getViewer(); $menu = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setBig(true); $menu->addItem( diff --git a/src/applications/drydock/controller/DrydockController.php b/src/applications/drydock/controller/DrydockController.php index f584652ef6..f393f210d7 100644 --- a/src/applications/drydock/controller/DrydockController.php +++ b/src/applications/drydock/controller/DrydockController.php @@ -88,7 +88,7 @@ abstract class DrydockController extends PhabricatorController { ->execute(); $log_table = id(new DrydockLogListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setLogs($logs); return $log_table; diff --git a/src/applications/drydock/controller/DrydockRepositoryOperationStatusController.php b/src/applications/drydock/controller/DrydockRepositoryOperationStatusController.php index 371333129a..5f35c91bb3 100644 --- a/src/applications/drydock/controller/DrydockRepositoryOperationStatusController.php +++ b/src/applications/drydock/controller/DrydockRepositoryOperationStatusController.php @@ -22,7 +22,7 @@ final class DrydockRepositoryOperationStatusController $id = $operation->getID(); $status_view = id(new DrydockRepositoryOperationStatusView()) - ->setViewer($viewer) + ->setUser($viewer) ->setOperation($operation); if ($request->isAjax()) { diff --git a/src/applications/drydock/controller/DrydockRepositoryOperationViewController.php b/src/applications/drydock/controller/DrydockRepositoryOperationViewController.php index 80b52cbe2b..e255c63ec3 100644 --- a/src/applications/drydock/controller/DrydockRepositoryOperationViewController.php +++ b/src/applications/drydock/controller/DrydockRepositoryOperationViewController.php @@ -24,7 +24,7 @@ final class DrydockRepositoryOperationViewController $header = id(new PHUIHeaderView()) ->setHeader($title) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($operation) ->setHeaderIcon('fa-fighter-jet'); @@ -44,7 +44,7 @@ final class DrydockRepositoryOperationViewController $crumbs->setBorder(true); $status_view = id(new DrydockRepositoryOperationStatusView()) - ->setViewer($viewer) + ->setUser($viewer) ->setOperation($operation); $log_query = id(new DrydockLogQuery()) diff --git a/src/applications/drydock/controller/DrydockResourceViewController.php b/src/applications/drydock/controller/DrydockResourceViewController.php index fcfc83601a..ec0dce53e1 100644 --- a/src/applications/drydock/controller/DrydockResourceViewController.php +++ b/src/applications/drydock/controller/DrydockResourceViewController.php @@ -21,7 +21,7 @@ final class DrydockResourceViewController extends DrydockResourceController { $resource->getResourceName()); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($resource) ->setHeader($title) ->setHeaderIcon('fa-map') @@ -198,7 +198,7 @@ final class DrydockResourceViewController extends DrydockResourceController { ->setText(pht('View All'))); $lease_list = id(new DrydockLeaseListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setLeases($leases) ->render() ->setNoDataString(pht('This resource has no active leases.')); diff --git a/src/applications/drydock/query/DrydockAuthorizationSearchEngine.php b/src/applications/drydock/query/DrydockAuthorizationSearchEngine.php index fd6d0cfa17..81e8c00ba0 100644 --- a/src/applications/drydock/query/DrydockAuthorizationSearchEngine.php +++ b/src/applications/drydock/query/DrydockAuthorizationSearchEngine.php @@ -108,7 +108,7 @@ final class DrydockAuthorizationSearchEngine array $handles) { $list = id(new DrydockAuthorizationListView()) - ->setViewer($this->requireViewer()) + ->setUser($this->requireViewer()) ->setAuthorizations($authorizations); $result = new PhabricatorApplicationSearchResultView(); diff --git a/src/applications/drydock/query/DrydockLeaseSearchEngine.php b/src/applications/drydock/query/DrydockLeaseSearchEngine.php index c5779d2ea1..4f58b906d0 100644 --- a/src/applications/drydock/query/DrydockLeaseSearchEngine.php +++ b/src/applications/drydock/query/DrydockLeaseSearchEngine.php @@ -114,7 +114,7 @@ final class DrydockLeaseSearchEngine array $handles) { $list = id(new DrydockLeaseListView()) - ->setViewer($this->requireViewer()) + ->setUser($this->requireViewer()) ->setLeases($leases); return id(new PhabricatorApplicationSearchResultView()) diff --git a/src/applications/drydock/query/DrydockLogSearchEngine.php b/src/applications/drydock/query/DrydockLogSearchEngine.php index 300ce613bd..553f4be486 100644 --- a/src/applications/drydock/query/DrydockLogSearchEngine.php +++ b/src/applications/drydock/query/DrydockLogSearchEngine.php @@ -147,7 +147,7 @@ final class DrydockLogSearchEngine extends PhabricatorApplicationSearchEngine { array $handles) { $list = id(new DrydockLogListView()) - ->setViewer($this->requireViewer()) + ->setUser($this->requireViewer()) ->setLogs($logs); $result = new PhabricatorApplicationSearchResultView(); diff --git a/src/applications/drydock/query/DrydockResourceSearchEngine.php b/src/applications/drydock/query/DrydockResourceSearchEngine.php index 0425c35f4f..349ef422be 100644 --- a/src/applications/drydock/query/DrydockResourceSearchEngine.php +++ b/src/applications/drydock/query/DrydockResourceSearchEngine.php @@ -105,7 +105,7 @@ final class DrydockResourceSearchEngine array $handles) { $list = id(new DrydockResourceListView()) - ->setViewer($this->requireViewer()) + ->setUser($this->requireViewer()) ->setResources($resources); $result = new PhabricatorApplicationSearchResultView(); diff --git a/src/applications/drydock/view/DrydockAuthorizationListView.php b/src/applications/drydock/view/DrydockAuthorizationListView.php index 42becc232f..f0c44c1c7f 100644 --- a/src/applications/drydock/view/DrydockAuthorizationListView.php +++ b/src/applications/drydock/view/DrydockAuthorizationListView.php @@ -24,7 +24,7 @@ final class DrydockAuthorizationListView extends AphrontView { } public function render() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $authorizations = $this->authorizations; diff --git a/src/applications/drydock/view/DrydockLeaseListView.php b/src/applications/drydock/view/DrydockLeaseListView.php index 699df97629..d0d2f9b950 100644 --- a/src/applications/drydock/view/DrydockLeaseListView.php +++ b/src/applications/drydock/view/DrydockLeaseListView.php @@ -15,13 +15,13 @@ final class DrydockLeaseListView extends AphrontView { public function render() { $leases = $this->leases; - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $view = new PHUIObjectItemListView(); foreach ($leases as $lease) { $item = id(new PHUIObjectItemView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($lease->getLeaseName()) ->setHref('/drydock/lease/'.$lease->getID().'/'); diff --git a/src/applications/drydock/view/DrydockLogListView.php b/src/applications/drydock/view/DrydockLogListView.php index 5d836e4b32..f3a580ffff 100644 --- a/src/applications/drydock/view/DrydockLogListView.php +++ b/src/applications/drydock/view/DrydockLogListView.php @@ -55,7 +55,7 @@ final class DrydockLogListView extends AphrontView { public function render() { $logs = $this->logs; - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $view = new PHUIObjectItemListView(); diff --git a/src/applications/drydock/view/DrydockObjectAuthorizationView.php b/src/applications/drydock/view/DrydockObjectAuthorizationView.php index 3de07f8a21..25c1d582a3 100644 --- a/src/applications/drydock/view/DrydockObjectAuthorizationView.php +++ b/src/applications/drydock/view/DrydockObjectAuthorizationView.php @@ -24,7 +24,7 @@ final class DrydockObjectAuthorizationView extends AphrontView { } public function render() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $blueprint_phids = $this->getBlueprintPHIDs(); $object_phid = $this->getObjectPHID(); diff --git a/src/applications/drydock/view/DrydockRepositoryOperationStatusView.php b/src/applications/drydock/view/DrydockRepositoryOperationStatusView.php index 0551bcd1f4..aa7d1e3873 100644 --- a/src/applications/drydock/view/DrydockRepositoryOperationStatusView.php +++ b/src/applications/drydock/view/DrydockRepositoryOperationStatusView.php @@ -25,7 +25,7 @@ final class DrydockRepositoryOperationStatusView } public function render() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $operation = $this->getOperation(); $list = $this->renderUnderwayState(); @@ -57,7 +57,7 @@ final class DrydockRepositoryOperationStatusView } public function renderUnderwayState() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $operation = $this->getOperation(); $id = $operation->getID(); diff --git a/src/applications/drydock/view/DrydockResourceListView.php b/src/applications/drydock/view/DrydockResourceListView.php index 51281e2827..01b6d167cb 100644 --- a/src/applications/drydock/view/DrydockResourceListView.php +++ b/src/applications/drydock/view/DrydockResourceListView.php @@ -15,7 +15,7 @@ final class DrydockResourceListView extends AphrontView { public function render() { $resources = $this->resources; - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $view = new PHUIObjectItemListView(); foreach ($resources as $resource) { diff --git a/src/applications/feed/builder/PhabricatorFeedBuilder.php b/src/applications/feed/builder/PhabricatorFeedBuilder.php index 072d8cb436..b674d1d837 100644 --- a/src/applications/feed/builder/PhabricatorFeedBuilder.php +++ b/src/applications/feed/builder/PhabricatorFeedBuilder.php @@ -67,7 +67,7 @@ final class PhabricatorFeedBuilder extends Phobject { // If rendering failed for any reason, don't fail the entire feed, // just this one story. $view = id(new PHUIFeedStoryView()) - ->setViewer($user) + ->setUser($user) ->setChronologicalKey($story->getChronologicalKey()) ->setEpoch($story->getEpoch()) ->setTitle( diff --git a/src/applications/files/controller/PhabricatorFileLightboxController.php b/src/applications/files/controller/PhabricatorFileLightboxController.php index 9a48bc9ab7..28123d9002 100644 --- a/src/applications/files/controller/PhabricatorFileLightboxController.php +++ b/src/applications/files/controller/PhabricatorFileLightboxController.php @@ -86,14 +86,14 @@ final class PhabricatorFileLightboxController $post_uri = $this->getApplicationURI('thread/'.$file->getPHID().'/'); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setAction($post_uri) ->addSigil('lightbox-comment-form') ->addClass('lightbox-comment-form') ->setWorkflow(true) ->appendChild( id(new PhabricatorRemarkupControl()) - ->setViewer($viewer) + ->setUser($viewer) ->setName('comment') ->setValue($draft->getDraft())) ->appendChild( diff --git a/src/applications/files/controller/PhabricatorFileUICurtainListController.php b/src/applications/files/controller/PhabricatorFileUICurtainListController.php index fd8897011a..3049f4ddeb 100644 --- a/src/applications/files/controller/PhabricatorFileUICurtainListController.php +++ b/src/applications/files/controller/PhabricatorFileUICurtainListController.php @@ -33,7 +33,7 @@ final class PhabricatorFileUICurtainListController $file_handles = $viewer->loadHandles($file_phids); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($attachments as $attachment) { $file_phid = $attachment->getFilePHID(); $handle = $file_handles[$file_phid]; diff --git a/src/applications/files/controller/PhabricatorFileViewController.php b/src/applications/files/controller/PhabricatorFileViewController.php index 28361e720f..57cb53d869 100644 --- a/src/applications/files/controller/PhabricatorFileViewController.php +++ b/src/applications/files/controller/PhabricatorFileViewController.php @@ -140,7 +140,7 @@ final class PhabricatorFileViewController extends PhabricatorFileController { } else { $curtain->addAction( id(new PhabricatorActionView()) - ->setViewer($viewer) + ->setUser($viewer) ->setDownload($can_download) ->setName(pht('Download File')) ->setIcon('fa-download') diff --git a/src/applications/files/query/PhabricatorFileSearchEngine.php b/src/applications/files/query/PhabricatorFileSearchEngine.php index 7c278fc9c8..c565ba9204 100644 --- a/src/applications/files/query/PhabricatorFileSearchEngine.php +++ b/src/applications/files/query/PhabricatorFileSearchEngine.php @@ -154,7 +154,7 @@ final class PhabricatorFileSearchEngine $highlighted_ids = array_fill_keys($highlighted_ids, true); $list_view = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($files as $file) { $id = $file->getID(); @@ -196,7 +196,7 @@ final class PhabricatorFileSearchEngine } $list_view->appendChild(id(new PhabricatorGlobalUploadTargetView()) - ->setViewer($viewer)); + ->setUser($viewer)); $result = new PhabricatorApplicationSearchResultView(); diff --git a/src/applications/flag/controller/PhabricatorFlagEditController.php b/src/applications/flag/controller/PhabricatorFlagEditController.php index 665cace5be..5844a3801a 100644 --- a/src/applications/flag/controller/PhabricatorFlagEditController.php +++ b/src/applications/flag/controller/PhabricatorFlagEditController.php @@ -36,7 +36,7 @@ final class PhabricatorFlagEditController extends PhabricatorFlagController { $type_name = $handle->getTypeName(); $dialog = new AphrontDialogView(); - $dialog->setViewer($viewer); + $dialog->setUser($viewer); $dialog->setTitle(pht('Flag %s', $type_name)); diff --git a/src/applications/flag/query/PhabricatorFlagSearchEngine.php b/src/applications/flag/query/PhabricatorFlagSearchEngine.php index aa72b2a0c8..d37dfba015 100644 --- a/src/applications/flag/query/PhabricatorFlagSearchEngine.php +++ b/src/applications/flag/query/PhabricatorFlagSearchEngine.php @@ -140,7 +140,7 @@ final class PhabricatorFlagSearchEngine $viewer = $this->requireViewer(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($flags as $flag) { $id = $flag->getID(); $phid = $flag->getObjectPHID(); diff --git a/src/applications/fund/controller/FundInitiativeBackController.php b/src/applications/fund/controller/FundInitiativeBackController.php index b970c7ea8f..17ead82ebf 100644 --- a/src/applications/fund/controller/FundInitiativeBackController.php +++ b/src/applications/fund/controller/FundInitiativeBackController.php @@ -113,7 +113,7 @@ final class FundInitiativeBackController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormSelectControl()) ->setName('accountPHID') diff --git a/src/applications/fund/controller/FundInitiativeViewController.php b/src/applications/fund/controller/FundInitiativeViewController.php index ef35bc30de..7c40858082 100644 --- a/src/applications/fund/controller/FundInitiativeViewController.php +++ b/src/applications/fund/controller/FundInitiativeViewController.php @@ -41,7 +41,7 @@ final class FundInitiativeViewController $header = id(new PHUIHeaderView()) ->setHeader($initiative->getName()) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($initiative) ->setStatus($status_icon, $status_color, $status_name) ->setHeaderIcon('fa-heart'); @@ -76,7 +76,7 @@ final class FundInitiativeViewController $viewer = $this->getRequest()->getUser(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $owner_phid = $initiative->getOwnerPHID(); $merchant_phid = $initiative->getMerchantPHID(); diff --git a/src/applications/harbormaster/controller/HarbormasterBuildViewController.php b/src/applications/harbormaster/controller/HarbormasterBuildViewController.php index afa35f7dca..a17948fc8d 100644 --- a/src/applications/harbormaster/controller/HarbormasterBuildViewController.php +++ b/src/applications/harbormaster/controller/HarbormasterBuildViewController.php @@ -28,7 +28,7 @@ final class HarbormasterBuildViewController $page_header = id(new PHUIHeaderView()) ->setHeader($title) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($build) ->setHeaderIcon('fa-cubes'); @@ -119,7 +119,7 @@ final class HarbormasterBuildViewController foreach ($build_targets as $build_target) { $header = id(new PHUIHeaderView()) ->setHeader($build_target->getName()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeaderIcon('fa-bullseye'); $target_box = id(new PHUIObjectBoxView()) @@ -422,7 +422,7 @@ final class HarbormasterBuildViewController $log->getLogType())) ->addActionLink($prototype_view) ->setSubheader($subheader) - ->setViewer($viewer); + ->setUser($viewer); $log_box = id(new PHUIObjectBoxView()) ->setHeader($header) @@ -566,7 +566,7 @@ final class HarbormasterBuildViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $handles = id(new PhabricatorHandleQuery()) ->setViewer($viewer) diff --git a/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php b/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php index fc51101fb0..d8f6f2f950 100644 --- a/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php +++ b/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php @@ -38,7 +38,7 @@ final class HarbormasterBuildableViewController $header = id(new PHUIHeaderView()) ->setHeader($title) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($buildable) ->setStatus( $buildable->getStatusIcon(), @@ -128,7 +128,7 @@ final class HarbormasterBuildableViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $container_phid = $buildable->getContainerPHID(); $buildable_phid = $buildable->getBuildablePHID(); @@ -159,7 +159,7 @@ final class HarbormasterBuildableViewController $viewer = $this->getRequest()->getUser(); $build_list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($buildable->getBuilds() as $build) { $view_uri = $this->getApplicationURI('/build/'.$build->getID().'/'); diff --git a/src/applications/harbormaster/controller/HarbormasterLintMessagesController.php b/src/applications/harbormaster/controller/HarbormasterLintMessagesController.php index 3218ffe97e..8fe1edbcaf 100644 --- a/src/applications/harbormaster/controller/HarbormasterLintMessagesController.php +++ b/src/applications/harbormaster/controller/HarbormasterLintMessagesController.php @@ -39,7 +39,7 @@ final class HarbormasterLintMessagesController } $lint_table = id(new HarbormasterLintPropertyView()) - ->setViewer($viewer) + ->setUser($viewer) ->setLintMessages($lint_data); $lint = id(new PHUIObjectBoxView()) diff --git a/src/applications/harbormaster/controller/HarbormasterPlanRunController.php b/src/applications/harbormaster/controller/HarbormasterPlanRunController.php index 547cbec2e3..cfa27fec1d 100644 --- a/src/applications/harbormaster/controller/HarbormasterPlanRunController.php +++ b/src/applications/harbormaster/controller/HarbormasterPlanRunController.php @@ -77,7 +77,7 @@ final class HarbormasterPlanRunController extends HarbormasterPlanController { $save_button = pht('Run Plan Manually'); $form = id(new PHUIFormLayoutView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions( pht( "Enter the name of a commit or revision to run this plan on (for ". diff --git a/src/applications/harbormaster/controller/HarbormasterPlanViewController.php b/src/applications/harbormaster/controller/HarbormasterPlanViewController.php index efb0f4e9fe..4f2b70fcaf 100644 --- a/src/applications/harbormaster/controller/HarbormasterPlanViewController.php +++ b/src/applications/harbormaster/controller/HarbormasterPlanViewController.php @@ -22,7 +22,7 @@ final class HarbormasterPlanViewController extends HarbormasterPlanController { $header = id(new PHUIHeaderView()) ->setHeader($plan->getName()) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($plan) ->setHeaderIcon('fa-ship'); @@ -106,7 +106,7 @@ final class HarbormasterPlanViewController extends HarbormasterPlanController { PhabricatorPolicyCapability::CAN_EDIT); $step_list = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setNoDataString( pht('This build plan does not have any build steps yet.')); diff --git a/src/applications/harbormaster/controller/HarbormasterStepEditController.php b/src/applications/harbormaster/controller/HarbormasterStepEditController.php index 82ced9fb71..a420d02627 100644 --- a/src/applications/harbormaster/controller/HarbormasterStepEditController.php +++ b/src/applications/harbormaster/controller/HarbormasterStepEditController.php @@ -136,7 +136,7 @@ final class HarbormasterStepEditController } $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); $instructions = $implementation->getEditInstructions(); if (phutil_nonempty_string($instructions)) { @@ -172,7 +172,7 @@ final class HarbormasterStepEditController $form ->appendChild( id(new PhabricatorRemarkupControl()) - ->setViewer($viewer) + ->setUser($viewer) ->setName('description') ->setLabel(pht('Description')) ->setError($e_description) @@ -258,7 +258,7 @@ final class HarbormasterStepEditController $rows = implode("\n", $rows); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions($rows); return id(new PHUIObjectBoxView()) diff --git a/src/applications/harbormaster/controller/HarbormasterStepViewController.php b/src/applications/harbormaster/controller/HarbormasterStepViewController.php index 9580401cbc..d4f1592264 100644 --- a/src/applications/harbormaster/controller/HarbormasterStepViewController.php +++ b/src/applications/harbormaster/controller/HarbormasterStepViewController.php @@ -68,7 +68,7 @@ final class HarbormasterStepViewController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); try { $implementation = $step->getStepImplementation(); diff --git a/src/applications/harbormaster/controller/HarbormasterUnitMessageViewController.php b/src/applications/harbormaster/controller/HarbormasterUnitMessageViewController.php index d57e0b57e3..7111db654f 100644 --- a/src/applications/harbormaster/controller/HarbormasterUnitMessageViewController.php +++ b/src/applications/harbormaster/controller/HarbormasterUnitMessageViewController.php @@ -85,7 +85,7 @@ final class HarbormasterUnitMessageViewController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $view->addProperty( pht('Run At'), diff --git a/src/applications/help/controller/PhabricatorHelpDocumentationController.php b/src/applications/help/controller/PhabricatorHelpDocumentationController.php index 381c71288e..82a6de6ec5 100644 --- a/src/applications/help/controller/PhabricatorHelpDocumentationController.php +++ b/src/applications/help/controller/PhabricatorHelpDocumentationController.php @@ -23,7 +23,7 @@ final class PhabricatorHelpDocumentationController $title = pht('%s Help', $application->getName()); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($items as $item) { if ($item->getType() == PHUIListItemView::TYPE_LABEL) { continue; diff --git a/src/applications/herald/controller/HeraldDisableController.php b/src/applications/herald/controller/HeraldDisableController.php index 7a80c49e0b..765237930c 100644 --- a/src/applications/herald/controller/HeraldDisableController.php +++ b/src/applications/herald/controller/HeraldDisableController.php @@ -54,7 +54,7 @@ final class HeraldDisableController extends HeraldController { } $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle($title) ->appendChild($body) ->addSubmitButton($button) diff --git a/src/applications/herald/controller/HeraldNewController.php b/src/applications/herald/controller/HeraldNewController.php index f7f6da2bdc..93d4503754 100644 --- a/src/applications/herald/controller/HeraldNewController.php +++ b/src/applications/herald/controller/HeraldNewController.php @@ -213,7 +213,7 @@ final class HeraldNewController extends HeraldController { ->replaceQueryParam('adapter', $adapter_type); $menu = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setBig(true); foreach ($specs as $rule_type => $spec) { diff --git a/src/applications/herald/controller/HeraldRuleController.php b/src/applications/herald/controller/HeraldRuleController.php index 332cab0135..431a39b1fc 100644 --- a/src/applications/herald/controller/HeraldRuleController.php +++ b/src/applications/herald/controller/HeraldRuleController.php @@ -143,7 +143,7 @@ final class HeraldRuleController extends HeraldController { $rule_type_name = $rule_type_map[$rule->getRuleType()]; $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setID('herald-rule-edit-form') ->addHiddenInput('content_type', $rule->getContentType()) ->addHiddenInput('rule_type', $rule->getRuleType()) diff --git a/src/applications/herald/controller/HeraldRuleViewController.php b/src/applications/herald/controller/HeraldRuleViewController.php index dba82a39cc..49e0fd8e32 100644 --- a/src/applications/herald/controller/HeraldRuleViewController.php +++ b/src/applications/herald/controller/HeraldRuleViewController.php @@ -21,7 +21,7 @@ final class HeraldRuleViewController extends HeraldController { } $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($rule->getName()) ->setPolicyObject($rule) ->setHeaderIcon('fa-bullhorn'); @@ -110,7 +110,7 @@ final class HeraldRuleViewController extends HeraldController { $viewer = $this->getRequest()->getUser(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $view->addProperty( pht('Rule Type'), diff --git a/src/applications/herald/controller/HeraldTestConsoleController.php b/src/applications/herald/controller/HeraldTestConsoleController.php index f72e36c56c..18c22b4c87 100644 --- a/src/applications/herald/controller/HeraldTestConsoleController.php +++ b/src/applications/herald/controller/HeraldTestConsoleController.php @@ -105,7 +105,7 @@ final class HeraldTestConsoleController extends HeraldController { } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions( pht( 'Enter an object to test rules for, like a Diffusion commit (e.g., '. diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignController.php b/src/applications/legalpad/controller/LegalpadDocumentSignController.php index a5799aa82d..7798a2aa9d 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentSignController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentSignController.php @@ -261,7 +261,7 @@ final class LegalpadDocumentSignController extends LegalpadController { // These details are available on the "Manage" page. $header = id(new PHUIHeaderView()) ->setHeader($title) - ->setViewer($viewer) + ->setUser($viewer) ->setEpoch($content_updated); // If we're showing the user this document because it's required to use @@ -287,7 +287,7 @@ final class LegalpadDocumentSignController extends LegalpadController { // elements like "Subscribers". This information is available on the // "Manage" page, but just clutters up the "Signature" page. $preamble = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->addSectionHeader(pht('Preamble')) ->addTextContent($preamble_text); @@ -409,7 +409,7 @@ final class LegalpadDocumentSignController extends LegalpadController { $data = $signature->getSignatureData(); $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); $signature_type = $document->getSignatureType(); switch ($signature_type) { diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignatureAddController.php b/src/applications/legalpad/controller/LegalpadDocumentSignatureAddController.php index 70df17baba..73c9480600 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentSignatureAddController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentSignatureAddController.php @@ -114,7 +114,7 @@ final class LegalpadDocumentSignatureAddController extends LegalpadController { } $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); if ($is_individual) { $form diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignatureVerificationController.php b/src/applications/legalpad/controller/LegalpadDocumentSignatureVerificationController.php index 390ce97fbd..b50b91e896 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentSignatureVerificationController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentSignatureVerificationController.php @@ -61,7 +61,7 @@ final class LegalpadDocumentSignatureVerificationController $email = $signature->getSignerEmail(); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions( pht('Please verify this document signature.')) ->appendChild( diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignatureViewController.php b/src/applications/legalpad/controller/LegalpadDocumentSignatureViewController.php index e21bb6e967..6f2c447b71 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentSignatureViewController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentSignatureViewController.php @@ -51,7 +51,7 @@ final class LegalpadDocumentSignatureViewController extends LegalpadController { $actor_handle = $handles[$actor_phid]; $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); if ($signature->getExemptionPHID()) { $form diff --git a/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php b/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php index 23ae9c1314..709441eba2 100644 --- a/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php +++ b/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php @@ -121,7 +121,7 @@ final class LegalpadDocumentSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($documents as $document) { $last_updated = phabricator_date($document->getDateModified(), $viewer); diff --git a/src/applications/macro/controller/PhabricatorMacroAudioController.php b/src/applications/macro/controller/PhabricatorMacroAudioController.php index fc9b7cbed5..fb6eba8401 100644 --- a/src/applications/macro/controller/PhabricatorMacroAudioController.php +++ b/src/applications/macro/controller/PhabricatorMacroAudioController.php @@ -81,7 +81,7 @@ final class PhabricatorMacroAudioController extends PhabricatorMacroController { $form = id(new AphrontFormView()) ->addHiddenInput('behaviorForm', 1) - ->setViewer($viewer); + ->setUser($viewer); $options = id(new AphrontFormRadioButtonControl()) ->setLabel(pht('Audio Behavior')) @@ -125,7 +125,7 @@ final class PhabricatorMacroAudioController extends PhabricatorMacroController { $upload_form = id(new AphrontFormView()) ->setEncType('multipart/form-data') - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormFileControl()) ->setLabel(pht('Audio File')) diff --git a/src/applications/macro/controller/PhabricatorMacroDisableController.php b/src/applications/macro/controller/PhabricatorMacroDisableController.php index 45306cb261..6c74e44442 100644 --- a/src/applications/macro/controller/PhabricatorMacroDisableController.php +++ b/src/applications/macro/controller/PhabricatorMacroDisableController.php @@ -37,7 +37,7 @@ final class PhabricatorMacroDisableController $dialog = new AphrontDialogView(); $dialog - ->setViewer($request->getUser()) + ->setUser($request->getUser()) ->setTitle(pht('Really disable macro?')) ->appendChild( phutil_tag( diff --git a/src/applications/macro/controller/PhabricatorMacroMemeDialogController.php b/src/applications/macro/controller/PhabricatorMacroMemeDialogController.php index acc83f18e4..5851cc5ad8 100644 --- a/src/applications/macro/controller/PhabricatorMacroMemeDialogController.php +++ b/src/applications/macro/controller/PhabricatorMacroMemeDialogController.php @@ -44,7 +44,7 @@ final class PhabricatorMacroMemeDialogController } $view = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendControl( id(new AphrontFormTokenizerControl()) ->setLabel(pht('Macro')) @@ -64,7 +64,7 @@ final class PhabricatorMacroMemeDialogController ->setValue($below)); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Create Meme')) ->appendForm($view) ->addCancelButton('/') diff --git a/src/applications/macro/controller/PhabricatorMacroViewController.php b/src/applications/macro/controller/PhabricatorMacroViewController.php index 2dfd0bd4ae..d5a420920d 100644 --- a/src/applications/macro/controller/PhabricatorMacroViewController.php +++ b/src/applications/macro/controller/PhabricatorMacroViewController.php @@ -39,7 +39,7 @@ final class PhabricatorMacroViewController $comment_form = $this->buildCommentForm($macro, $timeline); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($macro) ->setHeader($macro->getName()) ->setHeaderIcon('fa-file-image-o'); @@ -154,7 +154,7 @@ final class PhabricatorMacroViewController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); switch ($macro->getAudioBehavior()) { case PhabricatorFileImageMacro::AUDIO_BEHAVIOR_ONCE: @@ -184,7 +184,7 @@ final class PhabricatorMacroViewController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $file = $macro->getFile(); if ($file) { diff --git a/src/applications/macro/query/PhabricatorMacroSearchEngine.php b/src/applications/macro/query/PhabricatorMacroSearchEngine.php index af18c8973c..87559b13b2 100644 --- a/src/applications/macro/query/PhabricatorMacroSearchEngine.php +++ b/src/applications/macro/query/PhabricatorMacroSearchEngine.php @@ -149,7 +149,7 @@ final class PhabricatorMacroSearchEngine $file = $macro->getFile(); $item = id(new PHUIPinboardItemView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($macro); if ($file) { diff --git a/src/applications/maniphest/controller/ManiphestReportController.php b/src/applications/maniphest/controller/ManiphestReportController.php index 74daa726be..765bca71e0 100644 --- a/src/applications/maniphest/controller/ManiphestReportController.php +++ b/src/applications/maniphest/controller/ManiphestReportController.php @@ -134,7 +134,7 @@ final class ManiphestReportController extends ManiphestController { $viewer = $request->getUser(); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendControl( id(new AphrontFormTokenizerControl()) ->setDatasource(new PhabricatorProjectDatasource()) diff --git a/src/applications/maniphest/controller/ManiphestTaskSubtaskController.php b/src/applications/maniphest/controller/ManiphestTaskSubtaskController.php index 7a757b2778..3105cf661d 100644 --- a/src/applications/maniphest/controller/ManiphestTaskSubtaskController.php +++ b/src/applications/maniphest/controller/ManiphestTaskSubtaskController.php @@ -38,7 +38,7 @@ final class ManiphestTaskSubtaskController } $menu = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setBig(true) ->setFlush(true); diff --git a/src/applications/maniphest/view/ManiphestTaskListView.php b/src/applications/maniphest/view/ManiphestTaskListView.php index b7a099d8e9..025993de7f 100644 --- a/src/applications/maniphest/view/ManiphestTaskListView.php +++ b/src/applications/maniphest/view/ManiphestTaskListView.php @@ -58,7 +58,7 @@ final class ManiphestTaskListView extends ManiphestView { foreach ($this->tasks as $task) { $item = id(new PHUIObjectItemView()) - ->setViewer($this->getViewer()) + ->setViewer($this->getUser()) ->setObject($task) ->setObjectName('T'.$task->getID()) ->setHeader($task->getTitle()) @@ -95,11 +95,11 @@ final class ManiphestTaskListView extends ManiphestView { $item->addIcon( 'fa-check-square-o grey', - phabricator_datetime($closed_epoch, $this->getViewer())); + phabricator_datetime($closed_epoch, $this->getUser())); } else { $item->addIcon( 'none', - phabricator_datetime($task->getDateModified(), $this->getViewer())); + phabricator_datetime($task->getDateModified(), $this->getUser())); } if ($this->showBatchControls) { diff --git a/src/applications/maniphest/view/ManiphestTaskResultListView.php b/src/applications/maniphest/view/ManiphestTaskResultListView.php index 23cc3c76d4..76a0f4ee1a 100644 --- a/src/applications/maniphest/view/ManiphestTaskResultListView.php +++ b/src/applications/maniphest/view/ManiphestTaskResultListView.php @@ -40,14 +40,14 @@ final class ManiphestTaskResultListView extends ManiphestView { } public function render() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $tasks = $this->tasks; $query = $this->savedQuery; // If we didn't match anything, just pick up the default empty state. if (!$tasks) { return id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setNoDataString(pht('No tasks found.')); } @@ -155,7 +155,7 @@ final class ManiphestTaskResultListView extends ManiphestView { } private function renderBatchEditor(PhabricatorSavedQuery $saved_query) { - $user = $this->getViewer(); + $user = $this->getUser(); if (!$this->canBatchEdit) { return null; diff --git a/src/applications/meta/controller/PhabricatorApplicationUninstallController.php b/src/applications/meta/controller/PhabricatorApplicationUninstallController.php index 459c616632..e89976c42c 100644 --- a/src/applications/meta/controller/PhabricatorApplicationUninstallController.php +++ b/src/applications/meta/controller/PhabricatorApplicationUninstallController.php @@ -29,7 +29,7 @@ final class PhabricatorApplicationUninstallController 'phabricator.show-prototypes'); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->addCancelButton($view_uri); if ($application->isPrototype() && !$prototypes_enabled) { diff --git a/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php b/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php index c3ebfb065a..6664ae9d29 100644 --- a/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php +++ b/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php @@ -77,7 +77,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel $request->getInt('id')); $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); $crumbs = $controller->buildPanelCrumbs($this); $crumbs->addTextCrumb(pht('Edit Application Emails')); @@ -229,7 +229,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormTextControl()) ->setLabel(pht('Email')) @@ -272,7 +272,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel } $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setWidth(AphrontDialogView::WIDTH_FORM) ->setTitle($title) ->setValidationException($validation_exception) @@ -314,7 +314,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel } $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('delete', $email_object_id) ->setTitle(pht('Delete Address')) ->appendParagraph(pht( diff --git a/src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php b/src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php index fd493a1317..3765c1aaf4 100644 --- a/src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php +++ b/src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php @@ -22,7 +22,7 @@ final class PhabricatorMetaMTAMailViewController $header = id(new PHUIHeaderView()) ->setHeader($title) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($mail) ->setHeaderIcon('fa-envelope'); @@ -113,7 +113,7 @@ final class PhabricatorMetaMTAMailViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($mail); if ($mail->getFrom()) { @@ -185,7 +185,7 @@ final class PhabricatorMetaMTAMailViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setStacked(true); $headers = $mail->getDeliveredHeaders(); @@ -217,7 +217,7 @@ final class PhabricatorMetaMTAMailViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $actors = $mail->getDeliveredActors(); $reasons = null; @@ -416,7 +416,7 @@ final class PhabricatorMetaMTAMailViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $properties->addProperty(pht('Message PHID'), $mail->getPHID()); diff --git a/src/applications/metamta/query/PhabricatorMetaMTAMailSearchEngine.php b/src/applications/metamta/query/PhabricatorMetaMTAMailSearchEngine.php index ec0a7f1c85..ddfec31461 100644 --- a/src/applications/metamta/query/PhabricatorMetaMTAMailSearchEngine.php +++ b/src/applications/metamta/query/PhabricatorMetaMTAMailSearchEngine.php @@ -116,7 +116,7 @@ final class PhabricatorMetaMTAMailSearchEngine } $item = id(new PHUIObjectItemView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($mail) ->setEpoch($mail->getDateCreated()) ->setObjectName(pht('Mail %d', $mail->getID())) diff --git a/src/applications/notification/controller/PhabricatorNotificationClearController.php b/src/applications/notification/controller/PhabricatorNotificationClearController.php index f5218d52b1..6712591e12 100644 --- a/src/applications/notification/controller/PhabricatorNotificationClearController.php +++ b/src/applications/notification/controller/PhabricatorNotificationClearController.php @@ -33,7 +33,7 @@ final class PhabricatorNotificationClearController } $dialog = new AphrontDialogView(); - $dialog->setViewer($viewer); + $dialog->setUser($viewer); $dialog->addCancelButton('/notification/'); if ($chrono_key) { $dialog->setTitle(pht('Really mark all notifications as read?')); diff --git a/src/applications/nuance/controller/NuanceConsoleController.php b/src/applications/nuance/controller/NuanceConsoleController.php index 49fc36d015..5daade874d 100644 --- a/src/applications/nuance/controller/NuanceConsoleController.php +++ b/src/applications/nuance/controller/NuanceConsoleController.php @@ -10,7 +10,7 @@ final class NuanceConsoleController extends NuanceController { $viewer = $request->getViewer(); $menu = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); $menu->addItem( id(new PHUIObjectItemView()) diff --git a/src/applications/nuance/controller/NuanceItemManageController.php b/src/applications/nuance/controller/NuanceItemManageController.php index 36367461d4..2b6b4c89b8 100644 --- a/src/applications/nuance/controller/NuanceItemManageController.php +++ b/src/applications/nuance/controller/NuanceItemManageController.php @@ -53,7 +53,7 @@ final class NuanceItemManageController extends NuanceController { $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $properties->addProperty( pht('Date Created'), diff --git a/src/applications/nuance/controller/NuanceQueueViewController.php b/src/applications/nuance/controller/NuanceQueueViewController.php index b5a23fc3d2..f5284f6bfa 100644 --- a/src/applications/nuance/controller/NuanceQueueViewController.php +++ b/src/applications/nuance/controller/NuanceQueueViewController.php @@ -44,7 +44,7 @@ final class NuanceQueueViewController $viewer = $this->getViewer(); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($queue->getName()) ->setPolicyObject($queue); diff --git a/src/applications/nuance/controller/NuanceSourceEditController.php b/src/applications/nuance/controller/NuanceSourceEditController.php index 94642748f5..76025b2eb9 100644 --- a/src/applications/nuance/controller/NuanceSourceEditController.php +++ b/src/applications/nuance/controller/NuanceSourceEditController.php @@ -51,7 +51,7 @@ final class NuanceSourceEditController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild($source_types) ->appendChild( id(new AphrontFormSubmitControl()) diff --git a/src/applications/nuance/controller/NuanceSourceViewController.php b/src/applications/nuance/controller/NuanceSourceViewController.php index f7f5cbf1e2..93facde3c1 100644 --- a/src/applications/nuance/controller/NuanceSourceViewController.php +++ b/src/applications/nuance/controller/NuanceSourceViewController.php @@ -54,7 +54,7 @@ final class NuanceSourceViewController $viewer = $this->getViewer(); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($source->getName()) ->setPolicyObject($source); @@ -66,7 +66,7 @@ final class NuanceSourceViewController $id = $source->getID(); $actions = id(new PhabricatorActionListView()) - ->setViewer($viewer); + ->setUser($viewer); $can_edit = PhabricatorPolicyFilter::hasCapability( $viewer, diff --git a/src/applications/nuance/query/NuanceItemSearchEngine.php b/src/applications/nuance/query/NuanceItemSearchEngine.php index d2863f94e4..98f7f2fbb5 100644 --- a/src/applications/nuance/query/NuanceItemSearchEngine.php +++ b/src/applications/nuance/query/NuanceItemSearchEngine.php @@ -64,7 +64,7 @@ final class NuanceItemSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($items as $item) { $impl = $item->getImplementation(); diff --git a/src/applications/nuance/query/NuanceQueueSearchEngine.php b/src/applications/nuance/query/NuanceQueueSearchEngine.php index 10e0d5715d..3250832ba2 100644 --- a/src/applications/nuance/query/NuanceQueueSearchEngine.php +++ b/src/applications/nuance/query/NuanceQueueSearchEngine.php @@ -63,7 +63,7 @@ final class NuanceQueueSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($queues as $queue) { $item = id(new PHUIObjectItemView()) ->setObjectName(pht('Queue %d', $queue->getID())) diff --git a/src/applications/nuance/query/NuanceSourceSearchEngine.php b/src/applications/nuance/query/NuanceSourceSearchEngine.php index b9dca4bb07..9a28befb9e 100644 --- a/src/applications/nuance/query/NuanceSourceSearchEngine.php +++ b/src/applications/nuance/query/NuanceSourceSearchEngine.php @@ -72,7 +72,7 @@ final class NuanceSourceSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($sources as $source) { $item = id(new PHUIObjectItemView()) ->setObjectName(pht('Source %d', $source->getID())) diff --git a/src/applications/nuance/source/NuancePhabricatorFormSourceDefinition.php b/src/applications/nuance/source/NuancePhabricatorFormSourceDefinition.php index 4c679f8f03..3862cfed92 100644 --- a/src/applications/nuance/source/NuancePhabricatorFormSourceDefinition.php +++ b/src/applications/nuance/source/NuancePhabricatorFormSourceDefinition.php @@ -49,7 +49,7 @@ final class NuancePhabricatorFormSourceDefinition } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions( pht('IMPORTANT: This is a very rough prototype.')) ->appendRemarkupInstructions( diff --git a/src/applications/oauthserver/controller/PhabricatorOAuthServerAuthController.php b/src/applications/oauthserver/controller/PhabricatorOAuthServerAuthController.php index 9feae67831..6b10dd60c5 100644 --- a/src/applications/oauthserver/controller/PhabricatorOAuthServerAuthController.php +++ b/src/applications/oauthserver/controller/PhabricatorOAuthServerAuthController.php @@ -205,7 +205,7 @@ final class PhabricatorOAuthServerAuthController // the workflow. $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Authenticate: %s', $name)) ->appendParagraph( pht( @@ -231,7 +231,7 @@ final class PhabricatorOAuthServerAuthController ->addHiddenInput('response_type', $response_type) ->addHiddenInput('state', $state) ->addHiddenInput('scope', $request->getStr('scope')) - ->setViewer($viewer); + ->setUser($viewer); $cancel_msg = pht('The user declined to authorize this application.'); $cancel_uri = $this->addQueryParams( diff --git a/src/applications/oauthserver/controller/client/PhabricatorOAuthClientViewController.php b/src/applications/oauthserver/controller/client/PhabricatorOAuthClientViewController.php index 18bb26b439..6492f78f5a 100644 --- a/src/applications/oauthserver/controller/client/PhabricatorOAuthClientViewController.php +++ b/src/applications/oauthserver/controller/client/PhabricatorOAuthClientViewController.php @@ -54,7 +54,7 @@ final class PhabricatorOAuthClientViewController $viewer = $this->getViewer(); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader(pht('OAuth Application: %s', $client->getName())) ->setPolicyObject($client); @@ -129,7 +129,7 @@ final class PhabricatorOAuthClientViewController $viewer = $this->getRequest()->getUser(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $view->addProperty( pht('Client PHID'), diff --git a/src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php b/src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php index c33d63cd2c..a43dfa3d69 100644 --- a/src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php +++ b/src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php @@ -36,7 +36,7 @@ final class PhabricatorOAuthServerAuthorizationsSettingsPanel $viewer); if (!$installed) { $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('OAuth Not Available')) ->appendParagraph( pht('You do not have access to OAuth authorizations.')) @@ -64,7 +64,7 @@ final class PhabricatorOAuthServerAuthorizationsSettingsPanel } $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Revoke Authorization?')) ->appendParagraph( pht( diff --git a/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php b/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php index 44f05989de..371cffcefe 100644 --- a/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php +++ b/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php @@ -87,7 +87,7 @@ final class PhabricatorOAuthServerClientSearchEngine $viewer = $this->requireViewer(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($clients as $client) { $item = id(new PHUIObjectItemView()) ->setObjectName(pht('Application %d', $client->getID())) diff --git a/src/applications/owners/controller/PhabricatorOwnersDetailController.php b/src/applications/owners/controller/PhabricatorOwnersDetailController.php index afb9a5e05a..8512107e75 100644 --- a/src/applications/owners/controller/PhabricatorOwnersDetailController.php +++ b/src/applications/owners/controller/PhabricatorOwnersDetailController.php @@ -57,7 +57,7 @@ final class PhabricatorOwnersDetailController } $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($package->getName()) ->setStatus($header_icon, $header_color, $header_name) ->setPolicyObject($package) @@ -180,7 +180,7 @@ final class PhabricatorOwnersDetailController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $owners = $package->getOwners(); if ($owners) { diff --git a/src/applications/owners/controller/PhabricatorOwnersPathsController.php b/src/applications/owners/controller/PhabricatorOwnersPathsController.php index 66d87a1701..d4d97290f9 100644 --- a/src/applications/owners/controller/PhabricatorOwnersPathsController.php +++ b/src/applications/owners/controller/PhabricatorOwnersPathsController.php @@ -134,7 +134,7 @@ final class PhabricatorOwnersPathsController $cancel_uri = $package->getURI(); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new PHUIFormInsetView()) ->setTitle(pht('Paths')) diff --git a/src/applications/owners/query/PhabricatorOwnersPackageSearchEngine.php b/src/applications/owners/query/PhabricatorOwnersPackageSearchEngine.php index 9151028b51..922fd05041 100644 --- a/src/applications/owners/query/PhabricatorOwnersPackageSearchEngine.php +++ b/src/applications/owners/query/PhabricatorOwnersPackageSearchEngine.php @@ -135,7 +135,7 @@ final class PhabricatorOwnersPackageSearchEngine $viewer = $this->requireViewer(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($packages as $package) { $id = $package->getID(); diff --git a/src/applications/passphrase/controller/PassphraseCredentialConduitController.php b/src/applications/passphrase/controller/PassphraseCredentialConduitController.php index 4f903bada3..3c95fd8459 100644 --- a/src/applications/passphrase/controller/PassphraseCredentialConduitController.php +++ b/src/applications/passphrase/controller/PassphraseCredentialConduitController.php @@ -37,7 +37,7 @@ final class PassphraseCredentialConduitController if ($is_locked) { return $this->newDialog() - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Credential Locked')) ->appendChild( pht( diff --git a/src/applications/passphrase/controller/PassphraseCredentialCreateController.php b/src/applications/passphrase/controller/PassphraseCredentialCreateController.php index 86c839bec9..b237ef378b 100644 --- a/src/applications/passphrase/controller/PassphraseCredentialCreateController.php +++ b/src/applications/passphrase/controller/PassphraseCredentialCreateController.php @@ -38,7 +38,7 @@ final class PassphraseCredentialCreateController extends PassphraseController { } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild($types_control) ->appendChild( id(new AphrontFormSubmitControl()) diff --git a/src/applications/passphrase/controller/PassphraseCredentialDestroyController.php b/src/applications/passphrase/controller/PassphraseCredentialDestroyController.php index fb1b9c610c..e1f0532f8a 100644 --- a/src/applications/passphrase/controller/PassphraseCredentialDestroyController.php +++ b/src/applications/passphrase/controller/PassphraseCredentialDestroyController.php @@ -46,7 +46,7 @@ final class PassphraseCredentialDestroyController } return $this->newDialog() - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Really destroy credential?')) ->appendChild( pht( diff --git a/src/applications/passphrase/controller/PassphraseCredentialRevealController.php b/src/applications/passphrase/controller/PassphraseCredentialRevealController.php index 20eadeef21..99b6711ae6 100644 --- a/src/applications/passphrase/controller/PassphraseCredentialRevealController.php +++ b/src/applications/passphrase/controller/PassphraseCredentialRevealController.php @@ -27,7 +27,7 @@ final class PassphraseCredentialRevealController if ($is_locked) { return $this->newDialog() - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Credential is locked')) ->appendChild( pht( @@ -56,7 +56,7 @@ final class PassphraseCredentialRevealController // the viewer can see that their view was logged. $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setWidth(AphrontDialogView::WIDTH_FORM) ->setTitle(pht('Credential Secret (%s)', $credential->getMonogram())) ->appendChild($body) @@ -94,7 +94,7 @@ final class PassphraseCredentialRevealController 'prying eyes. Protect company secrets!'); } return $this->newDialog() - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Really show secret?')) ->appendChild($body) ->addSubmitButton(pht('Show Secret')) diff --git a/src/applications/passphrase/controller/PassphraseCredentialViewController.php b/src/applications/passphrase/controller/PassphraseCredentialViewController.php index 72d3819e19..a5147295c8 100644 --- a/src/applications/passphrase/controller/PassphraseCredentialViewController.php +++ b/src/applications/passphrase/controller/PassphraseCredentialViewController.php @@ -48,7 +48,7 @@ final class PassphraseCredentialViewController extends PassphraseController { $viewer = $this->getRequest()->getUser(); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($credential->getName()) ->setPolicyObject($credential) ->setHeaderIcon('fa-user-secret'); @@ -183,7 +183,7 @@ final class PassphraseCredentialViewController extends PassphraseController { $viewer = $this->getRequest()->getUser(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $properties->addProperty( pht('Credential Type'), diff --git a/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php b/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php index f46bdef50e..a561055be2 100644 --- a/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php +++ b/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php @@ -83,7 +83,7 @@ final class PassphraseCredentialSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($credentials as $credential) { $item = id(new PHUIObjectItemView()) diff --git a/src/applications/paste/query/PhabricatorPasteSearchEngine.php b/src/applications/paste/query/PhabricatorPasteSearchEngine.php index 6d0e54004b..9a9dbfa0be 100644 --- a/src/applications/paste/query/PhabricatorPasteSearchEngine.php +++ b/src/applications/paste/query/PhabricatorPasteSearchEngine.php @@ -147,7 +147,7 @@ final class PhabricatorPasteSearchEngine $lang_map = PhabricatorEnv::getEnvConfig('pygments.dropdown-choices'); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($pastes as $paste) { $created = phabricator_date($paste->getDateCreated(), $viewer); $author = $handles[$paste->getAuthorPHID()]->renderLink(); diff --git a/src/applications/people/controller/PhabricatorPeopleCreateController.php b/src/applications/people/controller/PhabricatorPeopleCreateController.php index b5c328251f..320ed57d3c 100644 --- a/src/applications/people/controller/PhabricatorPeopleCreateController.php +++ b/src/applications/people/controller/PhabricatorPeopleCreateController.php @@ -75,7 +75,7 @@ final class PhabricatorPeopleCreateController } $form = id(new AphrontFormView()) - ->setViewer($admin) + ->setUser($admin) ->appendRemarkupInstructions( pht( 'Choose the type of user account to create. For a detailed '. diff --git a/src/applications/people/controller/PhabricatorPeopleInviteSendController.php b/src/applications/people/controller/PhabricatorPeopleInviteSendController.php index e6a57fdc99..d860eb17b6 100644 --- a/src/applications/people/controller/PhabricatorPeopleInviteSendController.php +++ b/src/applications/people/controller/PhabricatorPeopleInviteSendController.php @@ -141,14 +141,14 @@ final class PhabricatorPeopleInviteSendController } $invite_table = id(new PhabricatorAuthInviteActionTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setInviteActions($actions) ->setHandles($handles); $confirm_form = null; if ($any_valid) { $confirm_form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('message', $message) ->addHiddenInput('emails', $emails) ->addHiddenInput('confirm', true) @@ -175,7 +175,7 @@ final class PhabricatorPeopleInviteSendController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions( pht( 'To invite users, enter their email addresses below. '. diff --git a/src/applications/people/controller/PhabricatorPeopleNewController.php b/src/applications/people/controller/PhabricatorPeopleNewController.php index 579409757b..121e464b30 100644 --- a/src/applications/people/controller/PhabricatorPeopleNewController.php +++ b/src/applications/people/controller/PhabricatorPeopleNewController.php @@ -142,7 +142,7 @@ final class PhabricatorPeopleNewController } $form = id(new AphrontFormView()) - ->setViewer($admin); + ->setUser($admin); if ($is_bot) { $title = pht('Create New Bot'); diff --git a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php index ab3dce265f..3af95462a9 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php @@ -54,7 +54,7 @@ final class PhabricatorPeopleProfileEditController $title = pht('Edit Profile'); $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); $field_list->appendFieldsToForm($form); $form diff --git a/src/applications/people/controller/PhabricatorPeopleProfileManageController.php b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php index 745cd41972..8d8377887a 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileManageController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php @@ -65,7 +65,7 @@ final class PhabricatorPeopleProfileManageController $viewer = $this->getRequest()->getUser(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($user); $field_list = PhabricatorCustomField::getObjectFields( diff --git a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php index 50ec082f9f..fb2c5c6a62 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php @@ -95,7 +95,7 @@ final class PhabricatorPeopleProfilePictureController $title = pht('Edit Profile Picture'); $form = id(new PHUIFormLayoutView()) - ->setViewer($viewer); + ->setUser($viewer); $default_image = $user->getDefaultProfileImagePHID(); if ($default_image) { @@ -254,7 +254,7 @@ final class PhabricatorPeopleProfilePictureController ->setForm($form); $upload_form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setEncType('multipart/form-data') ->appendChild( id(new AphrontFormFileControl()) diff --git a/src/applications/people/controller/PhabricatorPeopleProfileTasksAssignedController.php b/src/applications/people/controller/PhabricatorPeopleProfileTasksAssignedController.php index abd9f8d106..aa76948476 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileTasksAssignedController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileTasksAssignedController.php @@ -68,7 +68,7 @@ final class PhabricatorPeopleProfileTasksAssignedController $handles = ManiphestTaskListView::loadTaskHandles($viewer, $tasks); $list = id(new ManiphestTaskListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHandles($handles) ->setTasks($tasks) ->setNoDataString(pht('No open, assigned tasks.')); diff --git a/src/applications/people/controller/PhabricatorPeopleProfileTasksAuthoredController.php b/src/applications/people/controller/PhabricatorPeopleProfileTasksAuthoredController.php index f769d41171..d8d654c070 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileTasksAuthoredController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileTasksAuthoredController.php @@ -66,7 +66,7 @@ final class PhabricatorPeopleProfileTasksAuthoredController $handles = ManiphestTaskListView::loadTaskHandles($viewer, $tasks); $list = id(new ManiphestTaskListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHandles($handles) ->setTasks($tasks) ->setNoDataString(pht('No authored tasks.')); diff --git a/src/applications/people/customfield/PhabricatorUserBlurbField.php b/src/applications/people/customfield/PhabricatorUserBlurbField.php index 446d6f9778..222061ad04 100644 --- a/src/applications/people/customfield/PhabricatorUserBlurbField.php +++ b/src/applications/people/customfield/PhabricatorUserBlurbField.php @@ -65,7 +65,7 @@ final class PhabricatorUserBlurbField public function renderEditControl(array $handles) { return id(new PhabricatorRemarkupControl()) - ->setViewer($this->getViewer()) + ->setUser($this->getViewer()) ->setName($this->getFieldKey()) ->setValue($this->value) ->setLabel($this->getFieldName()); diff --git a/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php b/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php index 51d0df478e..22384b3097 100644 --- a/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php +++ b/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php @@ -138,7 +138,7 @@ final class PhabricatorPeopleLogSearchEngine $viewer = $this->requireViewer(); $table = id(new PhabricatorUserLogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setLogs($logs); if ($viewer->getIsAdmin()) { diff --git a/src/applications/people/view/PhabricatorUserLogView.php b/src/applications/people/view/PhabricatorUserLogView.php index e5bfccb0d8..c4ca973d5b 100644 --- a/src/applications/people/view/PhabricatorUserLogView.php +++ b/src/applications/people/view/PhabricatorUserLogView.php @@ -21,7 +21,7 @@ final class PhabricatorUserLogView extends AphrontView { public function render() { $logs = $this->logs; - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $phids = array(); foreach ($logs as $log) { diff --git a/src/applications/phame/controller/blog/PhameBlogArchiveController.php b/src/applications/phame/controller/blog/PhameBlogArchiveController.php index bbb38d9ffd..8b63bad9ff 100644 --- a/src/applications/phame/controller/blog/PhameBlogArchiveController.php +++ b/src/applications/phame/controller/blog/PhameBlogArchiveController.php @@ -56,7 +56,7 @@ final class PhameBlogArchiveController } $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle($title) ->appendChild($body) ->addCancelButton($view_uri) diff --git a/src/applications/phame/controller/blog/PhameBlogHeaderPictureController.php b/src/applications/phame/controller/blog/PhameBlogHeaderPictureController.php index c9cb497dc7..4bec8efecc 100644 --- a/src/applications/phame/controller/blog/PhameBlogHeaderPictureController.php +++ b/src/applications/phame/controller/blog/PhameBlogHeaderPictureController.php @@ -83,7 +83,7 @@ final class PhameBlogHeaderPictureController $title = pht('Edit Blog Header'); $upload_form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setEncType('multipart/form-data') ->appendChild( id(new AphrontFormFileControl()) diff --git a/src/applications/phame/controller/blog/PhameBlogManageController.php b/src/applications/phame/controller/blog/PhameBlogManageController.php index c7301eb9f7..a30d036c3f 100644 --- a/src/applications/phame/controller/blog/PhameBlogManageController.php +++ b/src/applications/phame/controller/blog/PhameBlogManageController.php @@ -41,7 +41,7 @@ final class PhameBlogManageController extends PhameBlogController { $header = id(new PHUIHeaderView()) ->setHeader($blog->getName()) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($blog) ->setImage($picture) ->setStatus($header_icon, $header_color, $header_name) @@ -106,7 +106,7 @@ final class PhameBlogManageController extends PhameBlogController { Javelin::initBehavior('phabricator-tooltips'); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $full_domain = $blog->getDomainFullURI(); if (!$full_domain) { @@ -162,7 +162,7 @@ final class PhameBlogManageController extends PhameBlogController { $actions = id(new PhabricatorActionListView()) ->setObject($blog) - ->setViewer($viewer); + ->setUser($viewer); $can_edit = PhabricatorPolicyFilter::hasCapability( $viewer, @@ -221,7 +221,7 @@ final class PhameBlogManageController extends PhameBlogController { $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); if ($blog->getHeaderImagePHID()) { $view->addImageContent( diff --git a/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php b/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php index f20e5eef4c..1f0488cce4 100644 --- a/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php +++ b/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php @@ -99,7 +99,7 @@ final class PhameBlogProfilePictureController $title = pht('Edit Blog Picture'); $form = id(new PHUIFormLayoutView()) - ->setViewer($viewer); + ->setUser($viewer); $default_image = PhabricatorFile::loadBuiltin($viewer, 'blog.png'); @@ -193,7 +193,7 @@ final class PhameBlogProfilePictureController ->setForm($form); $upload_form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setEncType('multipart/form-data') ->appendChild( id(new AphrontFormFileControl()) diff --git a/src/applications/phame/controller/blog/PhameBlogViewController.php b/src/applications/phame/controller/blog/PhameBlogViewController.php index ee5a6f7590..d8b61d8352 100644 --- a/src/applications/phame/controller/blog/PhameBlogViewController.php +++ b/src/applications/phame/controller/blog/PhameBlogViewController.php @@ -36,7 +36,7 @@ final class PhameBlogViewController extends PhameLiveController { $header = id(new PHUIHeaderView()) ->addClass('phame-header-bar') - ->setViewer($viewer); + ->setUser($viewer); if (!$is_external) { if ($blog->isArchived()) { @@ -134,7 +134,7 @@ final class PhameBlogViewController extends PhameLiveController { $actions = id(new PhabricatorActionListView()) ->setObject($blog) - ->setViewer($viewer); + ->setUser($viewer); $can_edit = PhabricatorPolicyFilter::hasCapability( $viewer, @@ -151,7 +151,7 @@ final class PhameBlogViewController extends PhameLiveController { $actions->addAction( id(new PhabricatorActionView()) - ->setViewer($viewer) + ->setUser($viewer) ->setIcon('fa-search') ->setHref( $this->getApplicationURI('post/?blog='.$blog->getPHID())) @@ -159,7 +159,7 @@ final class PhameBlogViewController extends PhameLiveController { $actions->addAction( id(new PhabricatorActionView()) - ->setViewer($viewer) + ->setUser($viewer) ->setIcon('fa-globe') ->setHref($blog->getLiveURI()) ->setName(pht('View Live'))); diff --git a/src/applications/phame/controller/post/PhamePostHeaderPictureController.php b/src/applications/phame/controller/post/PhamePostHeaderPictureController.php index 1963b82656..db8f662c39 100644 --- a/src/applications/phame/controller/post/PhamePostHeaderPictureController.php +++ b/src/applications/phame/controller/post/PhamePostHeaderPictureController.php @@ -83,7 +83,7 @@ final class PhamePostHeaderPictureController $title = pht('Edit Post Header'); $upload_form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setEncType('multipart/form-data') ->appendChild( id(new AphrontFormFileControl()) diff --git a/src/applications/phame/controller/post/PhamePostMoveController.php b/src/applications/phame/controller/post/PhamePostMoveController.php index 67ee47f660..d088b260b5 100644 --- a/src/applications/phame/controller/post/PhamePostMoveController.php +++ b/src/applications/phame/controller/post/PhamePostMoveController.php @@ -58,7 +58,7 @@ final class PhamePostMoveController extends PhamePostController { asort($options); $form = id(new PHUIFormLayoutView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormSelectControl()) ->setLabel(pht('Blog')) diff --git a/src/applications/phame/controller/post/PhamePostViewController.php b/src/applications/phame/controller/post/PhamePostViewController.php index 3f07dfffb2..88423f3c83 100644 --- a/src/applications/phame/controller/post/PhamePostViewController.php +++ b/src/applications/phame/controller/post/PhamePostViewController.php @@ -20,7 +20,7 @@ final class PhamePostViewController $header = id(new PHUIHeaderView()) ->addClass('phame-header-bar') - ->setViewer($viewer); + ->setUser($viewer); $hero = $this->buildPhamePostHeader($post); @@ -148,7 +148,7 @@ final class PhamePostViewController list($prev, $next) = $this->loadAdjacentPosts($post); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($post); $is_live = $this->getIsLive(); @@ -202,7 +202,7 @@ final class PhamePostViewController $actions = id(new PhabricatorActionListView()) ->setObject($post) - ->setViewer($viewer); + ->setUser($viewer); $can_edit = PhabricatorPolicyFilter::hasCapability( $viewer, @@ -288,7 +288,7 @@ final class PhamePostViewController if (!$post->isArchived()) { $actions->addAction( id(new PhabricatorActionView()) - ->setViewer($viewer) + ->setUser($viewer) ->setIcon('fa-globe') ->setHref($post->getLiveURI()) ->setName($live_name)); diff --git a/src/applications/phame/query/PhameBlogSearchEngine.php b/src/applications/phame/query/PhameBlogSearchEngine.php index bf38ae4e71..0642783c37 100644 --- a/src/applications/phame/query/PhameBlogSearchEngine.php +++ b/src/applications/phame/query/PhameBlogSearchEngine.php @@ -83,7 +83,7 @@ final class PhameBlogSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($blogs as $blog) { $id = $blog->getID(); @@ -93,7 +93,7 @@ final class PhameBlogSearchEngine $domain = pht('Local Blog'); } $item = id(new PHUIObjectItemView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($blog) ->setHeader($blog->getName()) ->setImageURI($blog->getProfileImageURI()) diff --git a/src/applications/phame/query/PhamePostSearchEngine.php b/src/applications/phame/query/PhamePostSearchEngine.php index f5713a4877..4d399cb8bd 100644 --- a/src/applications/phame/query/PhamePostSearchEngine.php +++ b/src/applications/phame/query/PhamePostSearchEngine.php @@ -101,7 +101,7 @@ final class PhamePostSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($posts as $post) { $id = $post->getID(); @@ -111,7 +111,7 @@ final class PhamePostSearchEngine $blog_name = pht('Blog: %s', $blog_name); $item = id(new PHUIObjectItemView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($post) ->setObjectName($post->getMonogram()) ->setHeader($post->getTitle()) diff --git a/src/applications/phlux/controller/PhluxEditController.php b/src/applications/phlux/controller/PhluxEditController.php index 8a2397fc64..e2bb7719f7 100644 --- a/src/applications/phlux/controller/PhluxEditController.php +++ b/src/applications/phlux/controller/PhluxEditController.php @@ -109,7 +109,7 @@ final class PhluxEditController extends PhluxController { ->execute(); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormTextControl()) ->setValue($var->getVariableKey()) diff --git a/src/applications/phlux/controller/PhluxViewController.php b/src/applications/phlux/controller/PhluxViewController.php index b9023c3b11..6ad0fe22cd 100644 --- a/src/applications/phlux/controller/PhluxViewController.php +++ b/src/applications/phlux/controller/PhluxViewController.php @@ -25,14 +25,14 @@ final class PhluxViewController extends PhluxController { $header = id(new PHUIHeaderView()) ->setHeader($title) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($var) ->setHeaderIcon('fa-copy'); $display_value = json_encode($var->getVariableValue()); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->addProperty(pht('Value'), $display_value); $timeline = $this->buildTransactionTimeline( diff --git a/src/applications/pholio/controller/PholioImageUploadController.php b/src/applications/pholio/controller/PholioImageUploadController.php index 9605dbe162..44d7ea7eed 100644 --- a/src/applications/pholio/controller/PholioImageUploadController.php +++ b/src/applications/pholio/controller/PholioImageUploadController.php @@ -30,7 +30,7 @@ final class PholioImageUploadController extends PholioController { ->makeEphemeral(); $view = id(new PholioUploadedImageView()) - ->setViewer($viewer) + ->setUser($viewer) ->setImage($image) ->setReplacesPHID($replaces_phid); diff --git a/src/applications/pholio/controller/PholioInlineController.php b/src/applications/pholio/controller/PholioInlineController.php index 79fd90e4bd..2201e97f74 100644 --- a/src/applications/pholio/controller/PholioInlineController.php +++ b/src/applications/pholio/controller/PholioInlineController.php @@ -134,7 +134,7 @@ final class PholioInlineController extends PholioController { } $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); if ($mode == 'new') { $params = array( @@ -153,7 +153,7 @@ final class PholioInlineController extends PholioController { $form ->appendChild( id(new PhabricatorRemarkupControl()) - ->setViewer($viewer) + ->setUser($viewer) ->setName('content') ->setLabel(pht('Comment')) ->setError($error) diff --git a/src/applications/pholio/remarkup/PholioRemarkupRule.php b/src/applications/pholio/remarkup/PholioRemarkupRule.php index a50fc5451c..f33be810a1 100644 --- a/src/applications/pholio/remarkup/PholioRemarkupRule.php +++ b/src/applications/pholio/remarkup/PholioRemarkupRule.php @@ -70,7 +70,7 @@ final class PholioRemarkupRule extends PhabricatorObjectRemarkupRule { $viewer = $this->getEngine()->getConfig('viewer'); $embed_mock = id(new PholioMockEmbedView()) - ->setViewer($viewer) + ->setUser($viewer) ->setMock($object); if (strlen($options)) { diff --git a/src/applications/pholio/view/PholioMockEmbedView.php b/src/applications/pholio/view/PholioMockEmbedView.php index 6f2963a71a..38b375b68b 100644 --- a/src/applications/pholio/view/PholioMockEmbedView.php +++ b/src/applications/pholio/view/PholioMockEmbedView.php @@ -47,7 +47,7 @@ final class PholioMockEmbedView extends AphrontView { list($x, $y) = $xform->getTransformedDimensions($thumbfile); $item = id(new PHUIPinboardItemView()) - ->setViewer($this->getViewer()) + ->setUser($this->getUser()) ->setObject($mock) ->setHeader($header) ->setURI($uri) diff --git a/src/applications/pholio/view/PholioMockImagesView.php b/src/applications/pholio/view/PholioMockImagesView.php index 1e399700b1..319daa3169 100644 --- a/src/applications/pholio/view/PholioMockImagesView.php +++ b/src/applications/pholio/view/PholioMockImagesView.php @@ -68,7 +68,7 @@ final class PholioMockImagesView extends AphrontView { // TODO: We could maybe do a better job with tailoring this, which is the // image shown on the review stage. - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $default = PhabricatorFile::loadBuiltin($viewer, 'image-100x100.png'); @@ -142,7 +142,7 @@ final class PholioMockImagesView extends AphrontView { 'commentFormID' => $this->getCommentFormID(), 'images' => $images, 'selectedID' => $selected_id, - 'loggedIn' => $this->getViewer()->isLoggedIn(), + 'loggedIn' => $this->getUser()->isLoggedIn(), 'logInLink' => (string)$login_uri, 'navsequence' => $navsequence, 'fullIcon' => hsprintf('%s', $full_icon), diff --git a/src/applications/pholio/view/PholioUploadedImageView.php b/src/applications/pholio/view/PholioUploadedImageView.php index ed3ca59ea7..9882ccad3c 100644 --- a/src/applications/pholio/view/PholioUploadedImageView.php +++ b/src/applications/pholio/view/PholioUploadedImageView.php @@ -32,7 +32,7 @@ final class PholioUploadedImageView extends AphrontView { ->setLabel(pht('Title')); $description = id(new PhabricatorRemarkupControl()) - ->setViewer($this->getViewer()) + ->setViewer($this->getUser()) ->setName('description_'.$phid) ->setValue($image->getDescription()) ->setSigil('image-description') diff --git a/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php b/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php index c1339a1854..73f26bc26d 100644 --- a/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php +++ b/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php @@ -14,7 +14,7 @@ final class PhortuneMonthYearExpiryControl extends AphrontFormControl { private function getCurrentMonth() { return phabricator_format_local_time( time(), - $this->getViewer(), + $this->getUser(), 'm'); } @@ -28,7 +28,7 @@ final class PhortuneMonthYearExpiryControl extends AphrontFormControl { private function getCurrentYear() { return phabricator_format_local_time( time(), - $this->getViewer(), + $this->getUser(), 'Y'); } @@ -37,7 +37,7 @@ final class PhortuneMonthYearExpiryControl extends AphrontFormControl { } protected function renderInput() { - if (!$this->getViewer()) { + if (!$this->getUser()) { throw new PhutilInvalidStateException('setUser'); } diff --git a/src/applications/phortune/controller/account/PhortuneAccountChargesController.php b/src/applications/phortune/controller/account/PhortuneAccountChargesController.php index 90a8dd7575..ea6105504f 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountChargesController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountChargesController.php @@ -49,7 +49,7 @@ final class PhortuneAccountChargesController $charges_uri = $account->getChargeListURI(); $table = id(new PhortuneChargeTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setCharges($charges); $header = id(new PHUIHeaderView()) diff --git a/src/applications/phortune/controller/account/PhortuneAccountDetailsController.php b/src/applications/phortune/controller/account/PhortuneAccountDetailsController.php index 21e858d1e1..e6003c8159 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountDetailsController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountDetailsController.php @@ -127,7 +127,7 @@ final class PhortuneAccountDetailsController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $view->addProperty(pht('Account Name'), $account->getName()); diff --git a/src/applications/phortune/controller/account/PhortuneAccountEmailAddressesController.php b/src/applications/phortune/controller/account/PhortuneAccountEmailAddressesController.php index 88404ce16d..a946e02efb 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountEmailAddressesController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountEmailAddressesController.php @@ -64,7 +64,7 @@ final class PhortuneAccountEmailAddressesController ->execute(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setNoDataString( pht( 'There are no billing email addresses associated '. diff --git a/src/applications/phortune/controller/account/PhortuneAccountEmailViewController.php b/src/applications/phortune/controller/account/PhortuneAccountEmailViewController.php index e3244df79b..4e15210890 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountEmailViewController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountEmailViewController.php @@ -148,7 +148,7 @@ final class PhortuneAccountEmailViewController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $access_key = $address->getAccessKey(); diff --git a/src/applications/phortune/controller/account/PhortuneAccountListController.php b/src/applications/phortune/controller/account/PhortuneAccountListController.php index 1ee7356c54..0ac8cecd8b 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountListController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountListController.php @@ -28,7 +28,7 @@ final class PhortuneAccountListController extends PhortuneController { $crumbs->setBorder(true); $payment_list = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setNoDataString( pht( 'You are not a member of any payment accounts. Payment '. @@ -60,7 +60,7 @@ final class PhortuneAccountListController extends PhortuneController { ->setObjectList($payment_list); $merchant_list = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setNoDataString( pht( 'You do not control any merchant accounts. Merchant accounts are '. diff --git a/src/applications/phortune/controller/account/PhortuneAccountManagersController.php b/src/applications/phortune/controller/account/PhortuneAccountManagersController.php index b2845f3a6b..538fadeac9 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountManagersController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountManagersController.php @@ -60,7 +60,7 @@ final class PhortuneAccountManagersController ->addActionLink($add); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); $member_phids = $account->getMemberPHIDs(); $handles = $viewer->loadHandles($member_phids); diff --git a/src/applications/phortune/controller/account/PhortuneAccountOverviewController.php b/src/applications/phortune/controller/account/PhortuneAccountOverviewController.php index 2bbf24722f..3b8e8497db 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountOverviewController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountOverviewController.php @@ -69,7 +69,7 @@ final class PhortuneAccountOverviewController $table = id(new PhortuneOrderTableView()) ->setNoDataString(pht('You have no unpaid invoices.')) ->setIsInvoices(true) - ->setViewer($viewer) + ->setUser($viewer) ->setCarts($carts); $header = id(new PHUIHeaderView()) diff --git a/src/applications/phortune/controller/account/PhortuneAccountPaymentMethodController.php b/src/applications/phortune/controller/account/PhortuneAccountPaymentMethodController.php index 41e1d5b02f..05a2f33d8d 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountPaymentMethodController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountPaymentMethodController.php @@ -59,7 +59,7 @@ final class PhortuneAccountPaymentMethodController ->addActionLink($add); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setFlush(true) ->setNoDataString( pht('There are no payment methods associated with this account.')); diff --git a/src/applications/phortune/controller/account/PhortuneAccountPaymentMethodViewController.php b/src/applications/phortune/controller/account/PhortuneAccountPaymentMethodViewController.php index 9b549d62c0..00c7e9798e 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountPaymentMethodViewController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountPaymentMethodViewController.php @@ -108,7 +108,7 @@ final class PhortuneAccountPaymentMethodViewController )); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); if (strlen($method->getName())) { $view->addProperty(pht('Name'), $method->getDisplayName()); diff --git a/src/applications/phortune/controller/account/PhortuneAccountProfileController.php b/src/applications/phortune/controller/account/PhortuneAccountProfileController.php index 1116ab4c3e..212dfcd5a7 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountProfileController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountProfileController.php @@ -9,7 +9,7 @@ abstract class PhortuneAccountProfileController $title = $account->getName(); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($title) ->setHeaderIcon('fa-user-circle'); @@ -120,7 +120,7 @@ abstract class PhortuneAccountProfileController $orders_uri = $account->getOrderListURI(); $table = id(new PhortuneOrderTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setCarts($carts); $header = id(new PHUIHeaderView()) diff --git a/src/applications/phortune/controller/account/PhortuneAccountSubscriptionController.php b/src/applications/phortune/controller/account/PhortuneAccountSubscriptionController.php index 930a72238b..779721c4f3 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountSubscriptionController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountSubscriptionController.php @@ -48,7 +48,7 @@ final class PhortuneAccountSubscriptionController ->execute(); $table = id(new PhortuneSubscriptionTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setSubscriptions($subscriptions); $header = id(new PHUIHeaderView()) diff --git a/src/applications/phortune/controller/account/PhortuneAccountSubscriptionViewController.php b/src/applications/phortune/controller/account/PhortuneAccountSubscriptionViewController.php index 6df90a691b..e38c18779b 100644 --- a/src/applications/phortune/controller/account/PhortuneAccountSubscriptionViewController.php +++ b/src/applications/phortune/controller/account/PhortuneAccountSubscriptionViewController.php @@ -43,7 +43,7 @@ final class PhortuneAccountSubscriptionViewController ->setBorder(true); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $next_invoice = $subscription->getTrigger()->getNextEventPrediction(); $properties->addProperty( @@ -93,7 +93,7 @@ final class PhortuneAccountSubscriptionViewController ->execute(); $invoice_table = id(new PhortuneOrderTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setCarts($invoices) ->setIsInvoices(true); @@ -125,7 +125,7 @@ final class PhortuneAccountSubscriptionViewController ->execute(); $invoice_table = id(new PhortuneOrderTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setCarts($invoices); $account = $subscription->getAccount(); diff --git a/src/applications/phortune/controller/cart/PhortuneCartCancelController.php b/src/applications/phortune/controller/cart/PhortuneCartCancelController.php index 73e0b21c46..bad476ea1c 100644 --- a/src/applications/phortune/controller/cart/PhortuneCartCancelController.php +++ b/src/applications/phortune/controller/cart/PhortuneCartCancelController.php @@ -168,7 +168,7 @@ final class PhortuneCartCancelController $cancel_text = pht('Cancel'); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormTextControl()) ->setName('refund') diff --git a/src/applications/phortune/controller/cart/PhortuneCartCheckoutController.php b/src/applications/phortune/controller/cart/PhortuneCartCheckoutController.php index 49ac7386e0..cbd434c900 100644 --- a/src/applications/phortune/controller/cart/PhortuneCartCheckoutController.php +++ b/src/applications/phortune/controller/cart/PhortuneCartCheckoutController.php @@ -141,7 +141,7 @@ final class PhortuneCartCheckoutController $payment_method_uri = new PhutilURI($payment_method_uri, $params); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild($method_control); $add_providers = $this->loadCreatePaymentMethodProvidersForMerchant( diff --git a/src/applications/phortune/controller/cart/PhortuneCartViewController.php b/src/applications/phortune/controller/cart/PhortuneCartViewController.php index 1f39893333..9412d11045 100644 --- a/src/applications/phortune/controller/cart/PhortuneCartViewController.php +++ b/src/applications/phortune/controller/cart/PhortuneCartViewController.php @@ -27,7 +27,7 @@ final class PhortuneCartViewController } $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($order->getName()) ->setHeaderIcon('fa-shopping-bag'); diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantAddManagerController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantAddManagerController.php index 0ce603fabe..0f4bb479e1 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantAddManagerController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantAddManagerController.php @@ -46,7 +46,7 @@ final class PhortuneMerchantAddManagerController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendControl( id(new AphrontFormTokenizerControl()) ->setDatasource(new PhabricatorPeopleDatasource()) diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantDetailsController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantDetailsController.php index 06abc292d9..8b558ac387 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantDetailsController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantDetailsController.php @@ -52,7 +52,7 @@ final class PhortuneMerchantDetailsController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($merchant); $invoice_from = $merchant->getInvoiceEmail(); diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantInvoiceCreateController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantInvoiceCreateController.php index e4c6174919..21224e17fc 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantInvoiceCreateController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantInvoiceCreateController.php @@ -37,7 +37,7 @@ final class PhortuneMerchantInvoiceCreateController if (!$target_user) { $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions(pht('Choose a user to invoice.')) ->appendControl( id(new AphrontFormTokenizerControl()) @@ -71,7 +71,7 @@ final class PhortuneMerchantInvoiceCreateController ->execute(); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('userPHID', $target_user->getPHID()) ->appendRemarkupInstructions(pht('Choose which account to invoice.')) ->appendControl( @@ -191,7 +191,7 @@ final class PhortuneMerchantInvoiceCreateController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('userPHID', $target_user->getPHID()) ->addHiddenInput('accountPHID', $target_account->getPHID()) ->addHiddenInput('invoice', true) diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantManagersController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantManagersController.php index aabbb91094..6b3ff568ff 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantManagersController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantManagersController.php @@ -62,7 +62,7 @@ final class PhortuneMerchantManagersController ->addActionLink($add); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); $member_phids = $merchant->getMemberPHIDs(); $handles = $viewer->loadHandles($member_phids); diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantOrdersController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantOrdersController.php index 9d60dff315..4f84d0cce7 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantOrdersController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantOrdersController.php @@ -58,7 +58,7 @@ final class PhortuneMerchantOrdersController $orders_uri = $merchant->getOrderListURI(); $table = id(new PhortuneOrderTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setCarts($carts); $header = id(new PHUIHeaderView()) diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantOverviewController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantOverviewController.php index 871bc99512..2925a7d34b 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantOverviewController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantOverviewController.php @@ -50,7 +50,7 @@ final class PhortuneMerchantOverviewController $viewer = $this->getRequest()->getUser(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($merchant); $status_view = new PHUIStatusListView(); diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php index 7d3028b768..86268280a0 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php @@ -89,7 +89,7 @@ final class PhortuneMerchantPictureController $title = pht('Edit Logo'); $form = id(new PHUIFormLayoutView()) - ->setViewer($viewer); + ->setUser($viewer); $default_image = PhabricatorFile::loadBuiltin($viewer, 'merchant.png'); @@ -182,7 +182,7 @@ final class PhortuneMerchantPictureController ->setForm($form); $upload_form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setEncType('multipart/form-data') ->appendChild( id(new AphrontFormFileControl()) diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantProfileController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantProfileController.php index 41f965d7d9..bc54756ffe 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantProfileController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantProfileController.php @@ -10,7 +10,7 @@ abstract class PhortuneMerchantProfileController $header = id(new PHUIHeaderView()) ->setHeader($title) - ->setViewer($viewer) + ->setUser($viewer) ->setImage($merchant->getProfileImageURI()); return $header; diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantProviderEditController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantProviderEditController.php index 0174743cdc..bd577ecfb5 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantProviderEditController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantProviderEditController.php @@ -149,7 +149,7 @@ final class PhortuneMerchantProviderEditController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('class', $provider_config->getProviderClass()) ->addHiddenInput('edit', true) ->appendChild( @@ -254,7 +254,7 @@ final class PhortuneMerchantProviderEditController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions( pht('Choose the type of payment provider to add:')) ->appendChild($panel_classes) diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantProviderViewController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantProviderViewController.php index e9882ab6e9..2c1be9f8af 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantProviderViewController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantProviderViewController.php @@ -112,7 +112,7 @@ final class PhortuneMerchantProviderViewController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $provider_type = $provider->buildProvider(); diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantSubscriptionsController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantSubscriptionsController.php index 6f269a7d07..c2fe0d429a 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantSubscriptionsController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantSubscriptionsController.php @@ -47,7 +47,7 @@ final class PhortuneMerchantSubscriptionsController $subscriptions_uri = $merchant->getSubscriptionListURI(); $table = id(new PhortuneSubscriptionTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setSubscriptions($subscriptions); $header = id(new PHUIHeaderView()) diff --git a/src/applications/phortune/controller/paymentmethod/PhortunePaymentMethodCreateController.php b/src/applications/phortune/controller/paymentmethod/PhortunePaymentMethodCreateController.php index 7be071069c..d32cb70f37 100644 --- a/src/applications/phortune/controller/paymentmethod/PhortunePaymentMethodCreateController.php +++ b/src/applications/phortune/controller/paymentmethod/PhortunePaymentMethodCreateController.php @@ -400,7 +400,7 @@ final class PhortunePaymentMethodCreateController $viewer = $this->getViewer(); $menu = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setBig(true) ->setFlush(true); @@ -428,7 +428,7 @@ final class PhortunePaymentMethodCreateController $viewer = $this->getViewer(); $menu = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setBig(true) ->setFlush(true); diff --git a/src/applications/phortune/controller/product/PhortuneProductListController.php b/src/applications/phortune/controller/product/PhortuneProductListController.php index 6d476eaa49..ee84581ae1 100644 --- a/src/applications/phortune/controller/product/PhortuneProductListController.php +++ b/src/applications/phortune/controller/product/PhortuneProductListController.php @@ -27,7 +27,7 @@ final class PhortuneProductListController extends PhabricatorController { $crumbs->setBorder(true); $product_list = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setNoDataString(pht('No products.')); foreach ($products as $product) { diff --git a/src/applications/phortune/controller/product/PhortuneProductViewController.php b/src/applications/phortune/controller/product/PhortuneProductViewController.php index 6a90b5d4de..a434a94534 100644 --- a/src/applications/phortune/controller/product/PhortuneProductViewController.php +++ b/src/applications/phortune/controller/product/PhortuneProductViewController.php @@ -32,7 +32,7 @@ final class PhortuneProductViewController extends PhortuneController { $crumbs->setBorder(true); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->addProperty( pht('Price'), $product->getPriceAsCurrency()->formatForDisplay()); diff --git a/src/applications/phortune/query/PhortuneChargeSearchEngine.php b/src/applications/phortune/query/PhortuneChargeSearchEngine.php index eb265949a4..568d60fc1a 100644 --- a/src/applications/phortune/query/PhortuneChargeSearchEngine.php +++ b/src/applications/phortune/query/PhortuneChargeSearchEngine.php @@ -99,7 +99,7 @@ final class PhortuneChargeSearchEngine $viewer = $this->requireViewer(); $table = id(new PhortuneChargeTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setCharges($charges); $result = new PhabricatorApplicationSearchResultView(); diff --git a/src/applications/phortune/query/PhortuneMerchantSearchEngine.php b/src/applications/phortune/query/PhortuneMerchantSearchEngine.php index a1b7b4a2a6..0688fa5344 100644 --- a/src/applications/phortune/query/PhortuneMerchantSearchEngine.php +++ b/src/applications/phortune/query/PhortuneMerchantSearchEngine.php @@ -68,7 +68,7 @@ final class PhortuneMerchantSearchEngine $viewer = $this->requireViewer(); $list = new PHUIObjectItemListView(); - $list->setViewer($viewer); + $list->setUser($viewer); foreach ($merchants as $merchant) { $item = id(new PHUIObjectItemView()) ->setSubhead(pht('Merchant %d', $merchant->getID())) diff --git a/src/applications/phortune/query/PhortuneSubscriptionSearchEngine.php b/src/applications/phortune/query/PhortuneSubscriptionSearchEngine.php index 1071d8aec9..9da6f34c72 100644 --- a/src/applications/phortune/query/PhortuneSubscriptionSearchEngine.php +++ b/src/applications/phortune/query/PhortuneSubscriptionSearchEngine.php @@ -134,7 +134,7 @@ final class PhortuneSubscriptionSearchEngine $viewer = $this->requireViewer(); $table = id(new PhortuneSubscriptionTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setSubscriptions($subscriptions); $merchant = $this->getMerchant(); diff --git a/src/applications/phortune/view/PhortuneCreditCardForm.php b/src/applications/phortune/view/PhortuneCreditCardForm.php index 3416aaf41d..afd64075ea 100644 --- a/src/applications/phortune/view/PhortuneCreditCardForm.php +++ b/src/applications/phortune/view/PhortuneCreditCardForm.php @@ -95,7 +95,7 @@ final class PhortuneCreditCardForm extends Phobject { ->appendChild( id(new PhortuneMonthYearExpiryControl()) ->setLabel(pht('Expiration')) - ->setViewer($this->user) + ->setUser($this->user) ->setError($e_expiry)); $assurance = $this->getSecurityAssurance(); diff --git a/src/applications/phortune/view/PhortuneOrderSummaryView.php b/src/applications/phortune/view/PhortuneOrderSummaryView.php index 051c6a936a..77152b9ff7 100644 --- a/src/applications/phortune/view/PhortuneOrderSummaryView.php +++ b/src/applications/phortune/view/PhortuneOrderSummaryView.php @@ -214,7 +214,7 @@ final class PhortuneOrderSummaryView ->execute(); $charges_table = id(new PhortuneChargeTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setCharges($charges) ->setShowOrder(false); diff --git a/src/applications/phortune/view/PhortuneOrderTableView.php b/src/applications/phortune/view/PhortuneOrderTableView.php index 4770616562..d7868f8d49 100644 --- a/src/applications/phortune/view/PhortuneOrderTableView.php +++ b/src/applications/phortune/view/PhortuneOrderTableView.php @@ -55,7 +55,7 @@ final class PhortuneOrderTableView extends AphrontView { public function render() { $carts = $this->getCarts(); - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $is_invoices = $this->getIsInvoices(); $is_merchant = $this->getIsMerchantView(); diff --git a/src/applications/phpast/controller/PhabricatorXHPASTViewRunController.php b/src/applications/phpast/controller/PhabricatorXHPASTViewRunController.php index 9a352c34da..8a530075ae 100644 --- a/src/applications/phpast/controller/PhabricatorXHPASTViewRunController.php +++ b/src/applications/phpast/controller/PhabricatorXHPASTViewRunController.php @@ -34,7 +34,7 @@ final class PhabricatorXHPASTViewRunController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormTextAreaControl()) ->setLabel(pht('Source')) diff --git a/src/applications/phrequent/controller/PhrequentTrackController.php b/src/applications/phrequent/controller/PhrequentTrackController.php index 0ad29dde6b..de0b75324c 100644 --- a/src/applications/phrequent/controller/PhrequentTrackController.php +++ b/src/applications/phrequent/controller/PhrequentTrackController.php @@ -141,7 +141,7 @@ final class PhrequentTrackController $form->appendChild( id(new AphrontFormDateControl()) - ->setViewer($viewer) + ->setUser($viewer) ->setName('epoch') ->setLabel($action_text) ->setError($e_date) diff --git a/src/applications/phrequent/query/PhrequentSearchEngine.php b/src/applications/phrequent/query/PhrequentSearchEngine.php index 9947c07e58..6b9ef1e90f 100644 --- a/src/applications/phrequent/query/PhrequentSearchEngine.php +++ b/src/applications/phrequent/query/PhrequentSearchEngine.php @@ -132,7 +132,7 @@ final class PhrequentSearchEngine extends PhabricatorApplicationSearchEngine { $viewer = $this->requireViewer(); $view = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($usertimes as $usertime) { $item = new PHUIObjectItemView(); diff --git a/src/applications/phriction/controller/PhrictionDeleteController.php b/src/applications/phriction/controller/PhrictionDeleteController.php index 61f6c421cb..b061e89756 100644 --- a/src/applications/phriction/controller/PhrictionDeleteController.php +++ b/src/applications/phriction/controller/PhrictionDeleteController.php @@ -44,13 +44,13 @@ final class PhrictionDeleteController extends PhrictionController { if ($e_text) { $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Can Not Delete Document!')) ->appendChild($e_text) ->addCancelButton($document_uri); } else { $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Delete Document?')) ->appendChild( pht('Really delete this document? You can recover it later by '. diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php index a080ca6c40..11b0b63174 100644 --- a/src/applications/phriction/controller/PhrictionDocumentController.php +++ b/src/applications/phriction/controller/PhrictionDocumentController.php @@ -310,7 +310,7 @@ final class PhrictionDocumentController } $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($document) ->setHeader($page_title); @@ -393,7 +393,7 @@ final class PhrictionDocumentController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $view->addProperty( pht('Last Author'), diff --git a/src/applications/phriction/controller/PhrictionEditController.php b/src/applications/phriction/controller/PhrictionEditController.php index c381139ddc..c48cac6400 100644 --- a/src/applications/phriction/controller/PhrictionEditController.php +++ b/src/applications/phriction/controller/PhrictionEditController.php @@ -251,7 +251,7 @@ final class PhrictionEditController $edit_capability = PhabricatorPolicyCapability::CAN_EDIT; $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('slug', $document->getSlug()) ->addHiddenInput('contentVersion', $max_version) ->addHiddenInput('overwrite', $overwrite) @@ -273,7 +273,7 @@ final class PhrictionEditController ->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL) ->setName('content') ->setID('document-textarea') - ->setViewer($viewer)) + ->setUser($viewer)) ->appendControl( id(new AphrontFormTokenizerControl()) ->setLabel(pht('Tags')) @@ -285,7 +285,7 @@ final class PhrictionEditController ->setLabel(pht('Subscribers')) ->setName('cc') ->setValue($v_cc) - ->setViewer($viewer) + ->setUser($viewer) ->setDatasource(new PhabricatorMetaMTAMailableDatasource())) ->appendChild( id(new AphrontFormPolicyControl()) diff --git a/src/applications/phriction/controller/PhrictionMoveController.php b/src/applications/phriction/controller/PhrictionMoveController.php index 5a5b7deb93..b82681f0a7 100644 --- a/src/applications/phriction/controller/PhrictionMoveController.php +++ b/src/applications/phriction/controller/PhrictionMoveController.php @@ -97,7 +97,7 @@ final class PhrictionMoveController extends PhrictionController { $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormStaticControl()) ->setLabel(pht('Title')) diff --git a/src/applications/phriction/controller/PhrictionNewController.php b/src/applications/phriction/controller/PhrictionNewController.php index c81d283d2c..bcb8e317ab 100644 --- a/src/applications/phriction/controller/PhrictionNewController.php +++ b/src/applications/phriction/controller/PhrictionNewController.php @@ -19,7 +19,7 @@ final class PhrictionNewController extends PhrictionController { return $this->newDialog() ->setSubmitURI('/phriction/new/') ->setTitle(pht('Edit Existing Document?')) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild(pht( 'The document %s already exists. Do you want to edit it instead?', phutil_tag('tt', array(), $slug))) diff --git a/src/applications/phurl/controller/PhabricatorPhurlURLViewController.php b/src/applications/phurl/controller/PhabricatorPhurlURLViewController.php index 8aab91917b..578e3ed9f8 100644 --- a/src/applications/phurl/controller/PhabricatorPhurlURLViewController.php +++ b/src/applications/phurl/controller/PhabricatorPhurlURLViewController.php @@ -87,7 +87,7 @@ final class PhabricatorPhurlURLViewController ->setDisabled(!$url->isValid()); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($url->getDisplayName()) ->setStatus($icon, $color, $status) ->setPolicyObject($url) @@ -124,7 +124,7 @@ final class PhabricatorPhurlURLViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); $properties->addProperty( pht('Short URL'), diff --git a/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php b/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php index e2fa6c9b47..e68d08565c 100644 --- a/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php +++ b/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php @@ -112,7 +112,7 @@ final class PhabricatorPhurlURLSearchEngine $name = $url->getName(); $item = id(new PHUIObjectItemView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($url) ->setObjectName('U'.$url->getID()) ->setHeader($name) diff --git a/src/applications/policy/controller/PhabricatorPolicyEditController.php b/src/applications/policy/controller/PhabricatorPolicyEditController.php index 8ec0098edb..b5ec636ee9 100644 --- a/src/applications/policy/controller/PhabricatorPolicyEditController.php +++ b/src/applications/policy/controller/PhabricatorPolicyEditController.php @@ -254,7 +254,7 @@ final class PhabricatorPolicyEditController $dialog = id(new AphrontDialogView()) ->setWidth(AphrontDialogView::WIDTH_FULL) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle($title) ->appendChild($form) ->addSubmitButton(pht('Save Policy')) @@ -327,7 +327,7 @@ final class PhabricatorPolicyEditController )); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendControl( id(new AphrontFormTokenizerControl()) ->setLabel(pht('Members Of')) diff --git a/src/applications/policy/controller/PhabricatorPolicyExplainController.php b/src/applications/policy/controller/PhabricatorPolicyExplainController.php index 26dc379df3..496563fc4f 100644 --- a/src/applications/policy/controller/PhabricatorPolicyExplainController.php +++ b/src/applications/policy/controller/PhabricatorPolicyExplainController.php @@ -39,7 +39,7 @@ final class PhabricatorPolicyExplainController $object_uri = nonempty($handle->getURI(), '/'); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setClass('aphront-access-dialog aphront-policy-explain-dialog') ->setTitle(pht('Policy Details: %s', $object_name)) ->addCancelButton($object_uri, pht('Done')); diff --git a/src/applications/ponder/controller/PonderAnswerEditController.php b/src/applications/ponder/controller/PonderAnswerEditController.php index 3bbc2161c5..9c48c7c669 100644 --- a/src/applications/ponder/controller/PonderAnswerEditController.php +++ b/src/applications/ponder/controller/PonderAnswerEditController.php @@ -64,7 +64,7 @@ final class PonderAnswerEditController extends PonderController { $answer_content_id = celerity_generate_unique_node_id(); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormStaticControl()) ->setLabel(pht('Question')) @@ -77,7 +77,7 @@ final class PonderAnswerEditController extends PonderController { ->setOptions(PonderAnswerStatus::getAnswerStatusMap())) ->appendChild( id(new PhabricatorRemarkupControl()) - ->setViewer($viewer) + ->setUser($viewer) ->setLabel(pht('Answer')) ->setName('content') ->setID($answer_content_id) diff --git a/src/applications/ponder/controller/PonderAnswerSaveController.php b/src/applications/ponder/controller/PonderAnswerSaveController.php index 44f584346d..53e0f06ea6 100644 --- a/src/applications/ponder/controller/PonderAnswerSaveController.php +++ b/src/applications/ponder/controller/PonderAnswerSaveController.php @@ -23,7 +23,7 @@ final class PonderAnswerSaveController extends PonderController { if (!strlen(trim($content))) { $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle(pht('Empty Answer')) ->appendChild( phutil_tag('p', array(), pht('Your answer must not be empty.'))) diff --git a/src/applications/ponder/controller/PonderQuestionStatusController.php b/src/applications/ponder/controller/PonderQuestionStatusController.php index 03a79b2752..ab791b740f 100644 --- a/src/applications/ponder/controller/PonderQuestionStatusController.php +++ b/src/applications/ponder/controller/PonderQuestionStatusController.php @@ -51,7 +51,7 @@ final class PonderQuestionStatusController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild($radio); return $this->newDialog() diff --git a/src/applications/ponder/controller/PonderQuestionViewController.php b/src/applications/ponder/controller/PonderQuestionViewController.php index e7a14d1977..63fe4e3539 100644 --- a/src/applications/ponder/controller/PonderQuestionViewController.php +++ b/src/applications/ponder/controller/PonderQuestionViewController.php @@ -24,12 +24,12 @@ final class PonderQuestionViewController extends PonderController { $answer_add_panel = id(new PonderAddAnswerView()) ->setQuestion($question) - ->setViewer($viewer) + ->setUser($viewer) ->setActionURI('/ponder/answer/add/'); $header = new PHUIHeaderView(); $header->setHeader($question->getTitle()); - $header->setViewer($viewer); + $header->setUser($viewer); $header->setPolicyObject($question); $header->setHeaderIcon('fa-university'); @@ -59,7 +59,7 @@ final class PonderQuestionViewController extends PonderController { $xactions = $timeline->getTransactions(); $add_comment = id(new PhabricatorApplicationTransactionCommentView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($question) ->setShowPreview(false) ->setAction($this->getApplicationURI("/question/comment/{$id}/")) @@ -251,7 +251,7 @@ final class PonderQuestionViewController extends PonderController { $xactions = $timeline->getTransactions(); $view[] = id(new PonderAnswerView()) - ->setViewer($viewer) + ->setUser($viewer) ->setAnswer($answer) ->setTransactions($xactions) ->setTimeline($timeline) diff --git a/src/applications/ponder/query/PonderQuestionSearchEngine.php b/src/applications/ponder/query/PonderQuestionSearchEngine.php index ecf0795d73..0896c82bf8 100644 --- a/src/applications/ponder/query/PonderQuestionSearchEngine.php +++ b/src/applications/ponder/query/PonderQuestionSearchEngine.php @@ -135,7 +135,7 @@ final class PonderQuestionSearchEngine ->execute(); $view = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($questions as $question) { $color = PonderQuestionStatus::getQuestionStatusTagColor( diff --git a/src/applications/ponder/view/PonderAnswerView.php b/src/applications/ponder/view/PonderAnswerView.php index 41e12377c3..a16e7bfbd4 100644 --- a/src/applications/ponder/view/PonderAnswerView.php +++ b/src/applications/ponder/view/PonderAnswerView.php @@ -36,7 +36,7 @@ final class PonderAnswerView extends AphrontTagView { protected function getTagContent() { require_celerity_resource('ponder-view-css'); $answer = $this->answer; - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $status = $answer->getStatus(); $author_phid = $answer->getAuthorPHID(); $actions = $this->buildAnswerActions(); @@ -85,7 +85,7 @@ final class PonderAnswerView extends AphrontTagView { $handle->getName()); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setEpoch($answer->getDateModified()) ->setHeader($header_name) ->addActionLink($action_button) @@ -120,7 +120,7 @@ final class PonderAnswerView extends AphrontTagView { ->appendChild($content); $comment_view = id(new PhabricatorApplicationTransactionCommentView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($answer) ->setShowPreview(false) ->setHeaderText(pht('Answer Comment')) @@ -145,7 +145,7 @@ final class PonderAnswerView extends AphrontTagView { } private function buildAnswerActions() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $answer = $this->answer; $id = $answer->getID(); @@ -155,7 +155,7 @@ final class PonderAnswerView extends AphrontTagView { PhabricatorPolicyCapability::CAN_EDIT); $view = id(new PhabricatorActionListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($answer); $view->addAction( diff --git a/src/applications/project/controller/PhabricatorProjectArchiveController.php b/src/applications/project/controller/PhabricatorProjectArchiveController.php index 83bd955020..b97d5391ab 100644 --- a/src/applications/project/controller/PhabricatorProjectArchiveController.php +++ b/src/applications/project/controller/PhabricatorProjectArchiveController.php @@ -57,7 +57,7 @@ final class PhabricatorProjectArchiveController } $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle($title) ->appendChild($body) ->addCancelButton($edit_uri) diff --git a/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php b/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php index 96b17ab1f1..7859091de6 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php @@ -62,7 +62,7 @@ final class PhabricatorProjectBoardBackgroundController ->addTextCrumb(pht('Background Color')); $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); $group_info = array( 'basic' => array( diff --git a/src/applications/project/controller/PhabricatorProjectBoardFilterController.php b/src/applications/project/controller/PhabricatorProjectBoardFilterController.php index d318a02e0b..ee69cf3ae1 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardFilterController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardFilterController.php @@ -30,7 +30,7 @@ final class PhabricatorProjectBoardFilterController } $filter_form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); $search_engine->buildSearchForm($filter_form, $saved_query); diff --git a/src/applications/project/controller/PhabricatorProjectBoardImportController.php b/src/applications/project/controller/PhabricatorProjectBoardImportController.php index f669c8a1a8..67bddaaa52 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardImportController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardImportController.php @@ -96,7 +96,7 @@ final class PhabricatorProjectBoardImportController $proj_selector = id(new AphrontFormTokenizerControl()) ->setName('importProjectPHID') - ->setViewer($viewer) + ->setUser($viewer) ->setDatasource(id(new PhabricatorProjectDatasource()) ->setParameters(array('mustHaveColumns' => true)) ->setLimit(1)); diff --git a/src/applications/project/controller/PhabricatorProjectBoardManageController.php b/src/applications/project/controller/PhabricatorProjectBoardManageController.php index 0b91ef1e78..59953abb87 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardManageController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardManageController.php @@ -69,7 +69,7 @@ final class PhabricatorProjectBoardManageController $header = id(new PHUIHeaderView()) ->setHeader(pht('Workboard: %s', $board->getDisplayName())) - ->setViewer($viewer); + ->setUser($viewer); return $header; } diff --git a/src/applications/project/controller/PhabricatorProjectBoardReorderController.php b/src/applications/project/controller/PhabricatorProjectBoardReorderController.php index 8dd9ba68e4..8cf75ab2a4 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardReorderController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardReorderController.php @@ -92,7 +92,7 @@ final class PhabricatorProjectBoardReorderController $list_id = celerity_generate_unique_node_id(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setID($list_id) ->setFlush(true) ->setDrag(true); diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php index d5353ecdde..dd49df3955 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php @@ -988,7 +988,7 @@ final class PhabricatorProjectBoardViewController true); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('initialize', 1) ->appendRemarkupInstructions( pht('The workboard for this project has not been created yet.')) diff --git a/src/applications/project/controller/PhabricatorProjectColumnDetailController.php b/src/applications/project/controller/PhabricatorProjectColumnDetailController.php index c623f80a08..60a69bd28e 100644 --- a/src/applications/project/controller/PhabricatorProjectColumnDetailController.php +++ b/src/applications/project/controller/PhabricatorProjectColumnDetailController.php @@ -77,7 +77,7 @@ final class PhabricatorProjectColumnDetailController $header = id(new PHUIHeaderView()) ->setHeader(pht('Column: %s', $column->getDisplayName())) - ->setViewer($viewer); + ->setUser($viewer); if ($column->isHidden()) { $header->setStatus('fa-ban', 'dark', pht('Hidden')); @@ -91,7 +91,7 @@ final class PhabricatorProjectColumnDetailController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($column); $limit = $column->getPointLimit(); diff --git a/src/applications/project/controller/PhabricatorProjectColumnEditController.php b/src/applications/project/controller/PhabricatorProjectColumnEditController.php index 6ce0891929..d11c575827 100644 --- a/src/applications/project/controller/PhabricatorProjectColumnEditController.php +++ b/src/applications/project/controller/PhabricatorProjectColumnEditController.php @@ -148,7 +148,7 @@ final class PhabricatorProjectColumnEditController } $form = id(new AphrontFormView()) - ->setViewer($request->getUser()); + ->setUser($request->getUser()); // Show the most appropriate input field for the name. if ($is_column) { diff --git a/src/applications/project/controller/PhabricatorProjectMembersAddController.php b/src/applications/project/controller/PhabricatorProjectMembersAddController.php index f0985fda01..572e71f51a 100644 --- a/src/applications/project/controller/PhabricatorProjectMembersAddController.php +++ b/src/applications/project/controller/PhabricatorProjectMembersAddController.php @@ -65,7 +65,7 @@ final class PhabricatorProjectMembersAddController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendControl( id(new AphrontFormTokenizerControl()) ->setName('memberPHIDs') diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php index ed7a18df40..5667089997 100644 --- a/src/applications/project/controller/PhabricatorProjectProfileController.php +++ b/src/applications/project/controller/PhabricatorProjectProfileController.php @@ -305,7 +305,7 @@ final class PhabricatorProjectProfileController } $subproject_list = id(new PhabricatorProjectListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setProjects($subprojects) ->renderList(); diff --git a/src/applications/project/view/PhabricatorProjectCardView.php b/src/applications/project/view/PhabricatorProjectCardView.php index 4bb891e362..01a32c1208 100644 --- a/src/applications/project/view/PhabricatorProjectCardView.php +++ b/src/applications/project/view/PhabricatorProjectCardView.php @@ -56,7 +56,7 @@ final class PhabricatorProjectCardView extends AphrontTagView { $header = id(new PHUIHeaderView()) ->setHeader(array($project->getDisplayName(), $tag)) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($project) ->setImage($project->getProfileImageURI()); diff --git a/src/applications/project/view/PhabricatorProjectListView.php b/src/applications/project/view/PhabricatorProjectListView.php index bc33739966..aeef3b3aa9 100644 --- a/src/applications/project/view/PhabricatorProjectListView.php +++ b/src/applications/project/view/PhabricatorProjectListView.php @@ -32,7 +32,7 @@ final class PhabricatorProjectListView extends AphrontView { } public function renderList() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $viewer_phid = $viewer->getPHID(); $projects = $this->getProjects(); diff --git a/src/applications/search/controller/PhabricatorSearchDeleteController.php b/src/applications/search/controller/PhabricatorSearchDeleteController.php index 5f57e36319..fe3836017f 100644 --- a/src/applications/search/controller/PhabricatorSearchDeleteController.php +++ b/src/applications/search/controller/PhabricatorSearchDeleteController.php @@ -101,7 +101,7 @@ final class PhabricatorSearchDeleteController } $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle($title) ->appendChild($desc) ->addCancelButton($return_uri) diff --git a/src/applications/search/controller/PhabricatorSearchEditController.php b/src/applications/search/controller/PhabricatorSearchEditController.php index 31d6fac85d..a526091503 100644 --- a/src/applications/search/controller/PhabricatorSearchEditController.php +++ b/src/applications/search/controller/PhabricatorSearchEditController.php @@ -88,7 +88,7 @@ final class PhabricatorSearchEditController } $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); $form->appendChild( id(new AphrontFormTextControl()) diff --git a/src/applications/search/controller/PhabricatorSearchHovercardController.php b/src/applications/search/controller/PhabricatorSearchHovercardController.php index 9e35124c90..1a07d426ea 100644 --- a/src/applications/search/controller/PhabricatorSearchHovercardController.php +++ b/src/applications/search/controller/PhabricatorSearchHovercardController.php @@ -117,7 +117,7 @@ final class PhabricatorSearchHovercardController } $hovercard = id(new PHUIHovercardView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObjectHandle($handle); if ($context_object) { diff --git a/src/applications/search/engine/PhabricatorProfileMenuEngine.php b/src/applications/search/engine/PhabricatorProfileMenuEngine.php index 99d90c5975..dbd95f2fe8 100644 --- a/src/applications/search/engine/PhabricatorProfileMenuEngine.php +++ b/src/applications/search/engine/PhabricatorProfileMenuEngine.php @@ -637,7 +637,7 @@ abstract class PhabricatorProfileMenuEngine extends Phobject { } $menu = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); $modes = array_fuse($modes); diff --git a/src/applications/settings/panel/PhabricatorActivitySettingsPanel.php b/src/applications/settings/panel/PhabricatorActivitySettingsPanel.php index 3f83a96b5d..a3654a4388 100644 --- a/src/applications/settings/panel/PhabricatorActivitySettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorActivitySettingsPanel.php @@ -31,7 +31,7 @@ final class PhabricatorActivitySettingsPanel extends PhabricatorSettingsPanel { ->executeWithCursorPager($pager); $table = id(new PhabricatorUserLogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setLogs($logs); $panel = $this->newBox(pht('Account Activity Logs'), $table); diff --git a/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php b/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php index 5abcf4fec0..a23c3fe670 100644 --- a/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php @@ -308,7 +308,7 @@ final class PhabricatorEmailAddressesSettingsPanel $address = $email->getAddress(); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('delete', $email_id) ->setTitle(pht("Really delete address '%s'?", $address)) ->appendParagraph( @@ -350,7 +350,7 @@ final class PhabricatorEmailAddressesSettingsPanel $address = $email->getAddress(); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('verify', $email_id) ->setTitle(pht('Send Another Verification Email?')) ->appendChild(phutil_tag('p', array(), pht( @@ -395,7 +395,7 @@ final class PhabricatorEmailAddressesSettingsPanel $address = $email->getAddress(); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('primary', $email_id) ->setTitle(pht('Change primary email address?')) ->appendParagraph( diff --git a/src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php b/src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php index 0e8997dea8..abe85b64c5 100644 --- a/src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php @@ -62,7 +62,7 @@ final class PhabricatorEmailPreferencesSettingsPanel PhabricatorEmailTagsSetting::SETTINGKEY); $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); $form->appendRemarkupInstructions( pht( diff --git a/src/applications/settings/panel/PhabricatorExternalAccountsSettingsPanel.php b/src/applications/settings/panel/PhabricatorExternalAccountsSettingsPanel.php index d785fc75c2..1c05adef1c 100644 --- a/src/applications/settings/panel/PhabricatorExternalAccountsSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorExternalAccountsSettingsPanel.php @@ -38,7 +38,7 @@ final class PhabricatorExternalAccountsSettingsPanel $linked_head = pht('Linked Accounts and Authentication'); $linked = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setNoDataString(pht('You have no linked accounts.')); foreach ($accounts as $account) { @@ -88,7 +88,7 @@ final class PhabricatorExternalAccountsSettingsPanel $linkable_head = pht('Add External Account'); $linkable = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setNoDataString( pht('Your account is linked with all available providers.')); diff --git a/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php b/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php index b6d8adad8a..b9d4beef4d 100644 --- a/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php @@ -387,7 +387,7 @@ final class PhabricatorMultiFactorSettingsPanel } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormTextControl()) ->setName('name') @@ -396,7 +396,7 @@ final class PhabricatorMultiFactorSettingsPanel ->setError($e_name)); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('edit', $factor->getID()) ->setTitle(pht('Edit Authentication Factor')) ->setErrors($errors) @@ -441,7 +441,7 @@ final class PhabricatorMultiFactorSettingsPanel } $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->addHiddenInput('delete', $factor->getID()) ->setTitle(pht('Delete Authentication Factor')) ->appendParagraph( diff --git a/src/applications/settings/panel/PhabricatorNotificationsSettingsPanel.php b/src/applications/settings/panel/PhabricatorNotificationsSettingsPanel.php index 683dfaceee..04d5d7ae84 100644 --- a/src/applications/settings/panel/PhabricatorNotificationsSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorNotificationsSettingsPanel.php @@ -137,7 +137,7 @@ final class PhabricatorNotificationsSettingsPanel ); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendChild( id(new AphrontFormSelectControl()) ->setLabel($title) diff --git a/src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php b/src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php index a12b8bb3cc..131f602974 100644 --- a/src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php @@ -37,7 +37,7 @@ final class PhabricatorSSHKeysSettingsPanel extends PhabricatorSettingsPanel { ->execute(); $table = id(new PhabricatorAuthSSHKeyTableView()) - ->setViewer($viewer) + ->setUser($viewer) ->setKeys($keys) ->setCanEdit(true) ->setNoDataString(pht("You haven't added any SSH Public Keys.")); diff --git a/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php b/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php index 580e6c2ce3..c73b9bdc15 100644 --- a/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php +++ b/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php @@ -122,7 +122,7 @@ final class PhabricatorSlowvoteSearchEngine $viewer = $this->requireViewer(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); $phids = mpull($polls, 'getAuthorPHID'); @@ -135,7 +135,7 @@ final class PhabricatorSlowvoteSearchEngine } $item = id(new PHUIObjectItemView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($poll) ->setObjectName($poll->getMonogram()) ->setHeader($poll->getQuestion()) diff --git a/src/applications/slowvote/remarkup/SlowvoteRemarkupRule.php b/src/applications/slowvote/remarkup/SlowvoteRemarkupRule.php index 1c552f0362..c93757315b 100644 --- a/src/applications/slowvote/remarkup/SlowvoteRemarkupRule.php +++ b/src/applications/slowvote/remarkup/SlowvoteRemarkupRule.php @@ -26,7 +26,7 @@ final class SlowvoteRemarkupRule extends PhabricatorObjectRemarkupRule { $viewer = $this->getEngine()->getConfig('viewer'); $embed = id(new SlowvoteEmbedView()) - ->setViewer($viewer) + ->setUser($viewer) ->setPoll($object); return $embed; diff --git a/src/applications/slowvote/view/SlowvoteEmbedView.php b/src/applications/slowvote/view/SlowvoteEmbedView.php index d5e4b33279..323801de47 100644 --- a/src/applications/slowvote/view/SlowvoteEmbedView.php +++ b/src/applications/slowvote/view/SlowvoteEmbedView.php @@ -28,7 +28,7 @@ final class SlowvoteEmbedView extends AphrontView { $phids[] = $poll->getAuthorPHID(); $this->handles = id(new PhabricatorHandleQuery()) - ->setViewer($this->getViewer()) + ->setViewer($this->getUser()) ->withPHIDs($phids) ->execute(); @@ -40,7 +40,7 @@ final class SlowvoteEmbedView extends AphrontView { require_celerity_resource('phabricator-slowvote-css'); - $user_choices = $poll->getViewerChoices($this->getViewer()); + $user_choices = $poll->getViewerChoices($this->getUser()); $user_choices = mpull($user_choices, 'getOptionID', 'getOptionID'); $out = array(); @@ -61,7 +61,7 @@ final class SlowvoteEmbedView extends AphrontView { $description = $poll->getDescription(); if (strlen($description)) { - $description = new PHUIRemarkupView($this->getViewer(), $description); + $description = new PHUIRemarkupView($this->getUser(), $description); $description = phutil_tag( 'div', array( @@ -119,7 +119,7 @@ final class SlowvoteEmbedView extends AphrontView { } $body = phabricator_form( - $this->getViewer(), + $this->getUser(), array( 'action' => '/vote/'.$poll->getID().'/', 'method' => 'POST', @@ -258,7 +258,7 @@ final class SlowvoteEmbedView extends AphrontView { $handles = $this->handles; $authors = mpull($choices, 'getAuthorPHID', 'getAuthorPHID'); - $viewer_phid = $this->getViewer()->getPHID(); + $viewer_phid = $this->getUser()->getPHID(); // Put the viewer first if they've voted for this option. $authors = array_select_keys($authors, array($viewer_phid)) diff --git a/src/applications/spaces/view/PHUISpacesNamespaceContextView.php b/src/applications/spaces/view/PHUISpacesNamespaceContextView.php index f10c6d47e2..0bb5949b76 100644 --- a/src/applications/spaces/view/PHUISpacesNamespaceContextView.php +++ b/src/applications/spaces/view/PHUISpacesNamespaceContextView.php @@ -22,7 +22,7 @@ final class PHUISpacesNamespaceContextView extends AphrontView { } // If the viewer can't see spaces, pretend they don't exist. - $viewer = $this->getViewer(); + $viewer = $this->getUser(); if (!PhabricatorSpacesNamespaceQuery::getViewerSpacesExist($viewer)) { return null; } diff --git a/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php b/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php index 6d58820c38..747e4e98f8 100644 --- a/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php +++ b/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php @@ -98,7 +98,7 @@ final class PhabricatorSubscriptionsEditController $viewer = $request->getUser(); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setTitle($title) ->appendChild($message) ->addCancelButton($uri); diff --git a/src/applications/subscriptions/view/SubscriptionListDialogBuilder.php b/src/applications/subscriptions/view/SubscriptionListDialogBuilder.php index e5cd1a4f2c..d2867d748d 100644 --- a/src/applications/subscriptions/view/SubscriptionListDialogBuilder.php +++ b/src/applications/subscriptions/view/SubscriptionListDialogBuilder.php @@ -54,7 +54,7 @@ final class SubscriptionListDialogBuilder extends Phobject { unset($handles[$phid]); return id(new AphrontDialogView()) - ->setViewer($this->getViewer()) + ->setUser($this->getViewer()) ->setWidth(AphrontDialogView::WIDTH_FORM) ->setTitle($this->getTitle()) ->setObjectList($this->buildBody($this->getViewer(), $handles)) @@ -64,7 +64,7 @@ final class SubscriptionListDialogBuilder extends Phobject { private function buildBody(PhabricatorUser $viewer, $handles) { $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($handles as $handle) { $item = id(new PHUIObjectItemView()) ->setHeader($handle->getFullName()) diff --git a/src/applications/system/controller/PhabricatorSystemSelectEncodingController.php b/src/applications/system/controller/PhabricatorSystemSelectEncodingController.php index 7137e85df5..efbe67882a 100644 --- a/src/applications/system/controller/PhabricatorSystemSelectEncodingController.php +++ b/src/applications/system/controller/PhabricatorSystemSelectEncodingController.php @@ -39,7 +39,7 @@ final class PhabricatorSystemSelectEncodingController ) + $encodings; $form = id(new AphrontFormView()) - ->setViewer($this->getRequest()->getUser()) + ->setUser($this->getRequest()->getUser()) ->appendRemarkupInstructions(pht('Choose a text encoding to use.')) ->appendChild( id(new AphrontFormSelectControl()) diff --git a/src/applications/system/controller/PhabricatorSystemSelectHighlightController.php b/src/applications/system/controller/PhabricatorSystemSelectHighlightController.php index 4dea6bc37c..631b6fd8f7 100644 --- a/src/applications/system/controller/PhabricatorSystemSelectHighlightController.php +++ b/src/applications/system/controller/PhabricatorSystemSelectHighlightController.php @@ -20,7 +20,7 @@ final class PhabricatorSystemSelectHighlightController ) + PhabricatorEnv::getEnvConfig('pygments.dropdown-choices'); $form = id(new AphrontFormView()) - ->setViewer($this->getRequest()->getUser()) + ->setUser($this->getRequest()->getUser()) ->appendRemarkupInstructions(pht('Choose a syntax highlighting to use.')) ->appendChild( id(new AphrontFormSelectControl()) diff --git a/src/applications/tokens/controller/PhabricatorTokenGiveController.php b/src/applications/tokens/controller/PhabricatorTokenGiveController.php index 2e35c42ecd..ef8dc75991 100644 --- a/src/applications/tokens/controller/PhabricatorTokenGiveController.php +++ b/src/applications/tokens/controller/PhabricatorTokenGiveController.php @@ -71,7 +71,7 @@ final class PhabricatorTokenGiveController extends PhabricatorTokenController { $dialog = $this->buildRescindTokenDialog(head($current)); } - $dialog->setViewer($viewer); + $dialog->setUser($viewer); $dialog->addCancelButton($done_uri); return id(new AphrontDialogResponse())->setDialog($dialog); diff --git a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentEditController.php b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentEditController.php index 3235cc8f83..84fcecfa6f 100644 --- a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentEditController.php +++ b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentEditController.php @@ -84,7 +84,7 @@ final class PhabricatorApplicationTransactionCommentEditController } $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setFullWidth(true) ->appendControl( id(new PhabricatorRemarkupControl()) diff --git a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentHistoryController.php b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentHistoryController.php index 0c63501f3b..f292c0d9d4 100644 --- a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentHistoryController.php +++ b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentHistoryController.php @@ -59,14 +59,14 @@ final class PhabricatorApplicationTransactionCommentHistoryController ->executeOne(); $view = id(new PhabricatorApplicationTransactionView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObjectPHID($obj_phid) ->setTransactions($xactions) ->setShowEditActions(false) ->setHideCommentOptions(true); $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->setWidth(AphrontDialogView::WIDTH_FULL) ->setFlush(true) ->setTitle(pht('Comment History')); diff --git a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRawController.php b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRawController.php index 6a24f0847a..c341079e9e 100644 --- a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRawController.php +++ b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRawController.php @@ -56,7 +56,7 @@ final class PhabricatorApplicationTransactionCommentRawController } } $dialog = id(new AphrontDialogView()) - ->setViewer($viewer) + ->setUser($viewer) ->addCancelButton($obj_handle->getURI()) ->setTitle($title); diff --git a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRemoveController.php b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRemoveController.php index f6a64b7f30..4d6570b13d 100644 --- a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRemoveController.php +++ b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRemoveController.php @@ -71,7 +71,7 @@ final class PhabricatorApplicationTransactionCommentRemoveController } $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); $dialog = $this->newDialog() ->setTitle(pht('Remove Comment')); diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationDefaultsController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationDefaultsController.php index cd317ea8f8..3d63a4a098 100644 --- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationDefaultsController.php +++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationDefaultsController.php @@ -78,7 +78,7 @@ final class PhabricatorEditEngineConfigurationDefaultsController $title = pht('Edit Form Defaults'); $form = id(new AphrontFormView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($fields as $field) { $field->appendToForm($form); diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php index fc02d54a30..1375124585 100644 --- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php +++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php @@ -62,7 +62,7 @@ EOTEXT ); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions($help); $locks = $config->getFieldLocks(); diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationReorderController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationReorderController.php index d74feb8b93..563c3141b2 100644 --- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationReorderController.php +++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationReorderController.php @@ -55,7 +55,7 @@ final class PhabricatorEditEngineConfigurationReorderController $input_id = celerity_generate_unique_node_id(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setID($list_id) ->setFlush(true); diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSortController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSortController.php index 8f1278c09e..5e8680b651 100644 --- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSortController.php +++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSortController.php @@ -98,7 +98,7 @@ final class PhabricatorEditEngineConfigurationSortController $input_id = celerity_generate_unique_node_id(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer) + ->setUser($viewer) ->setID($list_id) ->setFlush(true); diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSubtypeController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSubtypeController.php index c9b7776dc7..918782cd81 100644 --- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSubtypeController.php +++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSubtypeController.php @@ -62,7 +62,7 @@ EOTEXT $map = $engine->newSubtypeMap()->getDisplayMap(); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->appendRemarkupInstructions($help) ->appendControl( id(new AphrontFormSelectControl()) diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php index 1f380d2cf9..80939dd1c8 100644 --- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php +++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php @@ -21,7 +21,7 @@ final class PhabricatorEditEngineConfigurationViewController $properties = $this->buildPropertyView($config); $header = id(new PHUIHeaderView()) - ->setViewer($viewer) + ->setUser($viewer) ->setPolicyObject($config) ->setHeader(pht('Edit Form: %s', $config->getDisplayName())) ->setHeaderIcon('fa-pencil'); @@ -225,7 +225,7 @@ final class PhabricatorEditEngineConfigurationViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setViewer($viewer); + ->setUser($viewer); return $properties; } @@ -237,7 +237,7 @@ final class PhabricatorEditEngineConfigurationViewController $fields = $engine->getFieldsForConfig($config); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setAction(null); foreach ($fields as $field) { diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php index 1a304e7146..598f0e1024 100644 --- a/src/applications/transactions/editengine/PhabricatorEditEngine.php +++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php @@ -1555,7 +1555,7 @@ abstract class PhabricatorEditEngine $disabled = false; $dropdown = id(new PhabricatorActionListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($specs as $spec) { $dropdown->addAction( @@ -1810,11 +1810,11 @@ abstract class PhabricatorEditEngine ->setHeader($header_text); $help_view = id(new PhabricatorApplicationEditHTTPParameterHelpView()) - ->setViewer($viewer) + ->setUser($viewer) ->setFields($fields); $document = id(new PHUIDocumentView()) - ->setViewer($viewer) + ->setUser($viewer) ->setHeader($header) ->appendChild($help_view); diff --git a/src/applications/transactions/query/PhabricatorEditEngineConfigurationSearchEngine.php b/src/applications/transactions/query/PhabricatorEditEngineConfigurationSearchEngine.php index d966e5c371..ee3a5da3e6 100644 --- a/src/applications/transactions/query/PhabricatorEditEngineConfigurationSearchEngine.php +++ b/src/applications/transactions/query/PhabricatorEditEngineConfigurationSearchEngine.php @@ -114,7 +114,7 @@ final class PhabricatorEditEngineConfigurationSearchEngine $engine_key = $this->getEngineKey(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($configs as $config) { $item = id(new PHUIObjectItemView()) ->setHeader($config->getDisplayName()); diff --git a/src/applications/transactions/query/PhabricatorEditEngineSearchEngine.php b/src/applications/transactions/query/PhabricatorEditEngineSearchEngine.php index 2c48d37cd2..dcb512fa7a 100644 --- a/src/applications/transactions/query/PhabricatorEditEngineSearchEngine.php +++ b/src/applications/transactions/query/PhabricatorEditEngineSearchEngine.php @@ -69,7 +69,7 @@ final class PhabricatorEditEngineSearchEngine $viewer = $this->requireViewer(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($engines as $engine) { if (!$engine->isEngineConfigurable()) { continue; diff --git a/src/applications/transactions/response/PhabricatorApplicationTransactionNoEffectResponse.php b/src/applications/transactions/response/PhabricatorApplicationTransactionNoEffectResponse.php index f69238db2b..c4f6defc21 100644 --- a/src/applications/transactions/response/PhabricatorApplicationTransactionNoEffectResponse.php +++ b/src/applications/transactions/response/PhabricatorApplicationTransactionNoEffectResponse.php @@ -59,7 +59,7 @@ final class PhabricatorApplicationTransactionNoEffectResponse } $dialog = id(new AphrontDialogView()) - ->setViewer($request->getUser()) + ->setUser($request->getUser()) ->setTitle($title); $dialog->appendChild($head); diff --git a/src/applications/transactions/response/PhabricatorApplicationTransactionValidationResponse.php b/src/applications/transactions/response/PhabricatorApplicationTransactionValidationResponse.php index 58836896d2..ec4b77c364 100644 --- a/src/applications/transactions/response/PhabricatorApplicationTransactionValidationResponse.php +++ b/src/applications/transactions/response/PhabricatorApplicationTransactionValidationResponse.php @@ -29,7 +29,7 @@ final class PhabricatorApplicationTransactionValidationResponse $title = pht('Validation Errors'); $dialog = id(new AphrontDialogView()) - ->setViewer($request->getUser()) + ->setUser($request->getUser()) ->setTitle($title); $list = array(); diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php index 1c209b5c15..71e7e29af0 100644 --- a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php +++ b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php @@ -1668,7 +1668,7 @@ abstract class PhabricatorApplicationTransaction $old, $new) { return id(new PhabricatorApplicationTransactionTextDiffDetailView()) - ->setViewer($viewer) + ->setUser($viewer) ->setOldText($old) ->setNewText($new); } diff --git a/src/applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php b/src/applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php index 80e66d066c..a0ce2ffafd 100644 --- a/src/applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php +++ b/src/applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php @@ -312,7 +312,7 @@ EOTEXT } protected function renderInstructions($corpus) { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $view = new PHUIRemarkupView($viewer, $corpus); $view->setRemarkupOptions( diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php index 432d517ac7..53c09507aa 100644 --- a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php +++ b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php @@ -629,7 +629,7 @@ final class PhabricatorApplicationTransactionCommentView } private function renderBadgeView() { - $user = $this->getViewer(); + $user = $this->getUser(); $can_use_badges = PhabricatorApplication::isClassInstalledForViewer( PhabricatorBadgesApplication::class, $user); diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php index 74d6d3b089..d591f9e38c 100644 --- a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php +++ b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php @@ -131,7 +131,7 @@ class PhabricatorApplicationTransactionView extends AphrontView { } public function buildEvents($with_hiding = false) { - $user = $this->getViewer(); + $user = $this->getUser(); $xactions = $this->transactions; diff --git a/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php b/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php index 9fe33c677d..e113a6e106 100644 --- a/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php +++ b/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php @@ -339,7 +339,7 @@ final class PhabricatorTypeaheadModularDatasourceController asort($options); $form = id(new AphrontFormView()) - ->setViewer($viewer) + ->setUser($viewer) ->setAction('/typeahead/class/') ->appendChild( id(new AphrontFormSelectControl()) diff --git a/src/applications/uiexample/examples/PHUIHovercardUIExample.php b/src/applications/uiexample/examples/PHUIHovercardUIExample.php index 808534e504..2e68976ae0 100644 --- a/src/applications/uiexample/examples/PHUIHovercardUIExample.php +++ b/src/applications/uiexample/examples/PHUIHovercardUIExample.php @@ -33,7 +33,7 @@ final class PHUIHovercardUIExample extends PhabricatorUIExample { ->addField(pht('Author'), $user->getUsername()) ->addField(pht('Updated'), phabricator_datetime(time(), $user)) ->addAction(pht('Subscribe'), '/dev/random') - ->setViewer($user)); + ->setUser($user)); $elements[] = $panel; $task_handle = $this->createBasicDummyHandle( @@ -47,7 +47,7 @@ final class PHUIHovercardUIExample extends PhabricatorUIExample { $panel = $this->createPanel(pht('Maniphest Hovercard')); $panel->appendChild(id(new PHUIHovercardView()) ->setObjectHandle($task_handle) - ->setViewer($user) + ->setUser($user) ->addField(pht('Assigned to'), $user->getUsername()) ->addField(pht('Dependent Tasks'), 'T123, T124, T125') ->addAction(pht('Subscribe'), '/dev/random') @@ -67,7 +67,7 @@ final class PHUIHovercardUIExample extends PhabricatorUIExample { ->addField(pht('Status'), pht('Available')) ->addField(pht('Member since'), '30. February 1750') ->addAction(pht('Send a Message'), '/dev/null') - ->setViewer($user)); + ->setUser($user)); $elements[] = $panel; return phutil_implode_html('', $elements); diff --git a/src/applications/uiexample/examples/PhabricatorMultiColumnUIExample.php b/src/applications/uiexample/examples/PhabricatorMultiColumnUIExample.php index c3d3fbfd29..55b761f4e2 100644 --- a/src/applications/uiexample/examples/PhabricatorMultiColumnUIExample.php +++ b/src/applications/uiexample/examples/PhabricatorMultiColumnUIExample.php @@ -101,7 +101,7 @@ final class PhabricatorMultiColumnUIExample extends PhabricatorUIExample { ->setBorder(true); $shipping = id(new PHUIFormLayoutView()) - ->setViewer($user) + ->setUser($user) ->setFullWidth(true) ->appendChild( id(new AphrontFormTextControl()) @@ -130,7 +130,7 @@ final class PhabricatorMultiColumnUIExample extends PhabricatorUIExample { ->setSigil('postal-input')); $cc = id(new PHUIFormLayoutView()) - ->setViewer($user) + ->setUser($user) ->setFullWidth(true) ->appendChild( id(new AphrontFormTextControl()) @@ -147,7 +147,7 @@ final class PhabricatorMultiColumnUIExample extends PhabricatorUIExample { ->appendChild( id(new PhortuneMonthYearExpiryControl()) ->setLabel(pht('Expiration')) - ->setViewer($user) + ->setUser($user) ->setError('')); $shipping_title = pht('Shipping Address'); diff --git a/src/infrastructure/cluster/exception/PhabricatorClusterExceptionHandler.php b/src/infrastructure/cluster/exception/PhabricatorClusterExceptionHandler.php index c895064d09..ed0e0cc605 100644 --- a/src/infrastructure/cluster/exception/PhabricatorClusterExceptionHandler.php +++ b/src/infrastructure/cluster/exception/PhabricatorClusterExceptionHandler.php @@ -27,7 +27,7 @@ final class PhabricatorClusterExceptionHandler $dialog = id(new AphrontDialogView()) ->setTitle($title) - ->setViewer($viewer) + ->setUser($viewer) ->appendParagraph($throwable->getMessage()) ->addCancelButton('/', pht('Proceed With Caution')); diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldBlueprints.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldBlueprints.php index 23e876a99a..95c3c1a3e2 100644 --- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldBlueprints.php +++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldBlueprints.php @@ -31,7 +31,7 @@ final class PhabricatorStandardCustomFieldBlueprints } return id(new DrydockObjectAuthorizationView()) - ->setViewer($this->getViewer()) + ->setUser($this->getViewer()) ->setObjectPHID($this->getObject()->getPHID()) ->setBlueprintPHIDs($value); } diff --git a/src/infrastructure/daemon/workers/query/PhabricatorWorkerBulkJobSearchEngine.php b/src/infrastructure/daemon/workers/query/PhabricatorWorkerBulkJobSearchEngine.php index 7b53c3e5eb..3b7d05897f 100644 --- a/src/infrastructure/daemon/workers/query/PhabricatorWorkerBulkJobSearchEngine.php +++ b/src/infrastructure/daemon/workers/query/PhabricatorWorkerBulkJobSearchEngine.php @@ -85,7 +85,7 @@ final class PhabricatorWorkerBulkJobSearchEngine $viewer = $this->requireViewer(); $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer); + ->setUser($viewer); foreach ($jobs as $job) { $size = pht('%s Bulk Task(s)', new PhutilNumber($job->getSize())); diff --git a/src/infrastructure/diff/PhabricatorInlineCommentController.php b/src/infrastructure/diff/PhabricatorInlineCommentController.php index 07f5e44f05..6f1d3b66c0 100644 --- a/src/infrastructure/diff/PhabricatorInlineCommentController.php +++ b/src/infrastructure/diff/PhabricatorInlineCommentController.php @@ -442,7 +442,7 @@ abstract class PhabricatorInlineCommentController $object_owner_phid = $this->loadObjectOwnerPHID($inline); $view = id(new PHUIDiffInlineCommentDetailView()) - ->setViewer($viewer) + ->setUser($viewer) ->setInlineComment($inline) ->setIsOnRight($on_right) ->setMarkupEngine($engine) diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php index e98df0b2cf..ed98bf3bf1 100644 --- a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php +++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php @@ -154,7 +154,7 @@ final class PHUIDiffInlineCommentDetailView $classes[] = 'inline-comment-is-reply'; } - $viewer_phid = $this->getViewer()->getPHID(); + $viewer_phid = $this->getUser()->getPHID(); $owner_phid = $this->getObjectOwnerPHID(); if ($viewer_phid) { @@ -497,7 +497,7 @@ final class PHUIDiffInlineCommentDetailView return false; } - $viewer = $this->getViewer(); + $viewer = $this->getUser(); if (!$viewer->isLoggedIn()) { return false; } diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentPreviewListView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentPreviewListView.php index b41afef9b1..05cad40539 100644 --- a/src/infrastructure/diff/view/PHUIDiffInlineCommentPreviewListView.php +++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentPreviewListView.php @@ -54,7 +54,7 @@ final class PHUIDiffInlineCommentPreviewListView $views = array(); foreach ($inlines as $inline) { $views[] = id(new PHUIDiffInlineCommentDetailView()) - ->setViewer($viewer) + ->setUser($viewer) ->setInlineComment($inline) ->setMarkupEngine($engine) ->setHandles($handles) diff --git a/src/view/control/PhabricatorObjectSelectorDialog.php b/src/view/control/PhabricatorObjectSelectorDialog.php index 899d2472d0..0e003e7571 100644 --- a/src/view/control/PhabricatorObjectSelectorDialog.php +++ b/src/view/control/PhabricatorObjectSelectorDialog.php @@ -174,7 +174,7 @@ final class PhabricatorObjectSelectorDialog extends Phobject { $dialog = new AphrontDialogView(); $dialog - ->setViewer($this->user) + ->setUser($this->user) ->setTitle($this->title) ->setClass('phabricator-object-selector-dialog') ->appendChild($search_box) diff --git a/src/view/form/control/AphrontFormHandlesControl.php b/src/view/form/control/AphrontFormHandlesControl.php index a3ba329048..b7b4c2de1c 100644 --- a/src/view/form/control/AphrontFormHandlesControl.php +++ b/src/view/form/control/AphrontFormHandlesControl.php @@ -35,7 +35,7 @@ final class AphrontFormHandlesControl extends AphrontFormControl { protected function renderInput() { $value = $this->getValue(); - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $out = array(); diff --git a/src/view/form/control/AphrontFormPolicyControl.php b/src/view/form/control/AphrontFormPolicyControl.php index e24fde3637..b07c80834a 100644 --- a/src/view/form/control/AphrontFormPolicyControl.php +++ b/src/view/form/control/AphrontFormPolicyControl.php @@ -106,7 +106,7 @@ final class AphrontFormPolicyControl extends AphrontFormControl { protected function getOptions() { $capability = $this->capability; $policies = $this->policies; - $viewer = $this->getViewer(); + $viewer = $this->getUser(); // Check if we're missing the policy for the current control value. This // is unusual, but can occur if the user is submitting a form and selected @@ -371,7 +371,7 @@ final class AphrontFormPolicyControl extends AphrontFormControl { return null; } - $viewer = $this->getViewer(); + $viewer = $this->getUser(); if (!PhabricatorSpacesNamespaceQuery::getViewerSpacesExist($viewer)) { return null; } diff --git a/src/view/form/control/AphrontFormTokenizerControl.php b/src/view/form/control/AphrontFormTokenizerControl.php index c28e9219a0..7af8fcae32 100644 --- a/src/view/form/control/AphrontFormTokenizerControl.php +++ b/src/view/form/control/AphrontFormTokenizerControl.php @@ -65,7 +65,7 @@ final class AphrontFormTokenizerControl extends AphrontFormControl { throw new Exception( pht('You must set a datasource to use a TokenizerControl.')); } - $datasource->setViewer($this->getViewer()); + $datasource->setViewer($this->getUser()); $placeholder = null; if (!phutil_nonempty_string($this->placeholder)) { @@ -125,7 +125,7 @@ final class AphrontFormTokenizerControl extends AphrontFormControl { private function loadHandles() { if ($this->handles === null) { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); if (!$viewer) { throw new Exception( pht( diff --git a/src/view/form/control/PhabricatorRemarkupControl.php b/src/view/form/control/PhabricatorRemarkupControl.php index 4b6fbeee32..158cf3ff77 100644 --- a/src/view/form/control/PhabricatorRemarkupControl.php +++ b/src/view/form/control/PhabricatorRemarkupControl.php @@ -80,7 +80,7 @@ final class PhabricatorRemarkupControl $this->setID($id); } - $viewer = $this->getViewer(); + $viewer = $this->getUser(); if (!$viewer) { throw new PhutilInvalidStateException('setUser'); } diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php index 483cae1b6a..de21ba6fdf 100644 --- a/src/view/page/PhabricatorStandardPageView.php +++ b/src/view/page/PhabricatorStandardPageView.php @@ -893,7 +893,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView public function produceAphrontResponse() { $controller = $this->getController(); - $viewer = $this->getViewer(); + $viewer = $this->getUser(); if ($viewer && $viewer->getPHID()) { $object_phids = $this->pageObjects; foreach ($object_phids as $object_phid) { diff --git a/src/view/phui/PHUIHeaderView.php b/src/view/phui/PHUIHeaderView.php index ef34284e8c..8db2f75ef9 100644 --- a/src/view/phui/PHUIHeaderView.php +++ b/src/view/phui/PHUIHeaderView.php @@ -262,7 +262,7 @@ final class PHUIHeaderView extends AphrontTagView { } } - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $left = array(); $right = array(); @@ -440,7 +440,7 @@ final class PHUIHeaderView extends AphrontTagView { } private function renderPolicyProperty(PhabricatorPolicyInterface $object) { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $policies = PhabricatorPolicyQuery::loadPolicies($viewer, $object); diff --git a/src/view/phui/PHUIHovercardView.php b/src/view/phui/PHUIHovercardView.php index efbb5e6292..6b85364ceb 100644 --- a/src/view/phui/PHUIHovercardView.php +++ b/src/view/phui/PHUIHovercardView.php @@ -94,7 +94,7 @@ final class PHUIHovercardView extends AphrontTagView { throw new PhutilInvalidStateException('setObjectHandle'); } - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $handle = $this->handle; require_celerity_resource('phui-hovercard-view-css'); @@ -107,7 +107,7 @@ final class PHUIHovercardView extends AphrontTagView { $title = array( id(new PHUISpacesNamespaceContextView()) - ->setViewer($viewer) + ->setUser($viewer) ->setObject($this->getObject()), $this->title ? $this->title : $handle->getName(), ); diff --git a/src/view/phui/PHUIObjectItemListView.php b/src/view/phui/PHUIObjectItemListView.php index 205b4a4e54..4be130f62a 100644 --- a/src/view/phui/PHUIObjectItemListView.php +++ b/src/view/phui/PHUIObjectItemListView.php @@ -115,7 +115,7 @@ final class PHUIObjectItemListView extends AphrontTagView { } protected function getTagContent() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); require_celerity_resource('phui-oi-list-view-css'); require_celerity_resource('phui-oi-color-css'); diff --git a/src/view/phui/PHUIObjectItemView.php b/src/view/phui/PHUIObjectItemView.php index 26173ef671..b09e517bd4 100644 --- a/src/view/phui/PHUIObjectItemView.php +++ b/src/view/phui/PHUIObjectItemView.php @@ -214,7 +214,7 @@ final class PHUIObjectItemView extends AphrontTagView { } public function setEpoch($epoch) { - $date = phabricator_dual_datetime($epoch, $this->getViewer()); + $date = phabricator_dual_datetime($epoch, $this->getUser()); $this->addIcon('none', $date); return $this; } @@ -403,7 +403,7 @@ final class PHUIObjectItemView extends AphrontTagView { } protected function getTagContent() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $content_classes = array(); $content_classes[] = 'phui-oi-content'; diff --git a/src/view/phui/PHUIPinboardItemView.php b/src/view/phui/PHUIPinboardItemView.php index de9cbf6b7f..7e02190884 100644 --- a/src/view/phui/PHUIPinboardItemView.php +++ b/src/view/phui/PHUIPinboardItemView.php @@ -62,7 +62,7 @@ final class PHUIPinboardItemView extends AphrontView { ), array( id(new PHUISpacesNamespaceContextView()) - ->setViewer($this->getViewer()) + ->setViewer($this->getUser()) ->setObject($this->object), phutil_tag( 'a', diff --git a/src/view/phui/PHUIPropertyListView.php b/src/view/phui/PHUIPropertyListView.php index 6c84d56824..9c444297c2 100644 --- a/src/view/phui/PHUIPropertyListView.php +++ b/src/view/phui/PHUIPropertyListView.php @@ -96,15 +96,14 @@ final class PHUIPropertyListView extends AphrontView { } public function invokeWillRenderEvent() { - if ($this->object && $this->getViewer() && - !$this->invokedWillRenderEvent) { + if ($this->object && $this->getUser() && !$this->invokedWillRenderEvent) { $event = new PhabricatorEvent( PhabricatorEventType::TYPE_UI_WILLRENDERPROPERTIES, array( 'object' => $this->object, 'view' => $this, )); - $event->setUser($this->getViewer()); + $event->setUser($this->getUser()); PhutilEventEngine::dispatchEvent($event); } $this->invokedWillRenderEvent = true; diff --git a/src/view/phui/PHUITimelineEventView.php b/src/view/phui/PHUITimelineEventView.php index efe182a422..bd96293e22 100644 --- a/src/view/phui/PHUITimelineEventView.php +++ b/src/view/phui/PHUITimelineEventView.php @@ -352,7 +352,7 @@ final class PHUITimelineEventView extends AphrontView { Javelin::initBehavior('phui-dropdown-menu'); $action_list = id(new PhabricatorActionListView()) - ->setViewer($this->getViewer()); + ->setViewer($this->getUser()); foreach ($items as $item) { $action_list->addAction($item); } @@ -571,7 +571,7 @@ final class PHUITimelineEventView extends AphrontView { if ($source) { $content_source = id(new PhabricatorContentSourceView()) ->setContentSource($source) - ->setViewer($this->getViewer()); + ->setViewer($this->getUser()); $content_source = pht('Via %s', $content_source->getSourceName()); } @@ -589,7 +589,7 @@ final class PHUITimelineEventView extends AphrontView { if ($date_created) { $date = phabricator_dual_datetime( $date_created, - $this->getViewer()); + $this->getUser()); if ($this->anchor) { Javelin::initBehavior('phabricator-watch-anchor'); Javelin::initBehavior('phabricator-tooltips'); diff --git a/src/view/phui/PHUITimelineView.php b/src/view/phui/PHUITimelineView.php index 18f390784e..cfd59b69cd 100644 --- a/src/view/phui/PHUITimelineView.php +++ b/src/view/phui/PHUITimelineView.php @@ -239,7 +239,7 @@ final class PHUITimelineView extends AphrontView { private function prepareBadgeData(array $events) { assert_instances_of($events, PHUITimelineEventView::class); - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $can_use_badges = PhabricatorApplication::isClassInstalledForViewer( PhabricatorBadgesApplication::class, $viewer); diff --git a/src/view/phui/calendar/PHUICalendarDayView.php b/src/view/phui/calendar/PHUICalendarDayView.php index 0ffa5fd51d..1f299d2f46 100644 --- a/src/view/phui/calendar/PHUICalendarDayView.php +++ b/src/view/phui/calendar/PHUICalendarDayView.php @@ -52,7 +52,7 @@ final class PHUICalendarDayView extends AphrontView { public function render() { require_celerity_resource('phui-calendar-day-css'); - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $hours = $this->getHoursOfDay(); $js_hours = array(); diff --git a/src/view/phui/calendar/PHUICalendarListView.php b/src/view/phui/calendar/PHUICalendarListView.php index 024287b063..89fadee6d4 100644 --- a/src/view/phui/calendar/PHUICalendarListView.php +++ b/src/view/phui/calendar/PHUICalendarListView.php @@ -68,7 +68,7 @@ final class PHUICalendarListView extends AphrontTagView { } else { $timelabel = phabricator_time( $event->getEpochStart(), - $this->getViewer()); + $this->getUser()); } $icon_icon = $event->getIcon(); diff --git a/src/view/phui/calendar/PHUICalendarMonthView.php b/src/view/phui/calendar/PHUICalendarMonthView.php index 03d2e61670..0bc2a75c1c 100644 --- a/src/view/phui/calendar/PHUICalendarMonthView.php +++ b/src/view/phui/calendar/PHUICalendarMonthView.php @@ -559,7 +559,7 @@ final class PHUICalendarMonthView extends AphrontView { } private function getTodayMidnight() { - $viewer = $this->getViewer(); + $viewer = $this->getUser(); $today = new DateTime('@'.time()); $today->setTimezone($viewer->getTimeZone()); $today->setTime(0, 0, 0);