diff --git a/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php b/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php index 5d1d923d0c..110d7b8618 100644 --- a/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php +++ b/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php @@ -66,7 +66,7 @@ final class PhabricatorHighSecurityRequestExceptionHandler } $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + ->setViewer($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 78dad564b4..07cbe10ebe 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!')) - ->setUser($viewer) + ->setViewer($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 3d3d5c9457..45e58c55d0 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()) - ->setUser($user) + ->setViewer($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 5494d3e0e3..6c617b3466 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->setUser($viewer); + $dialog->setViewer($viewer); $dialog->setTitle(pht('Stopped on Redirect')); $dialog->appendParagraph( @@ -87,7 +87,7 @@ class AphrontRedirectResponse extends AphrontResponse { $dialog->appendChild( id(new AphrontStackTraceView()) - ->setUser($viewer) + ->setViewer($viewer) ->setTrace($this->stackWhenCreated)); $dialog->setIsStandalone(true); diff --git a/src/applications/almanac/controller/AlmanacBindingEditController.php b/src/applications/almanac/controller/AlmanacBindingEditController.php index f33bf73ccb..f67389db4b 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendControl( id(new AphrontFormTokenizerControl()) ->setName('interfacePHIDs') diff --git a/src/applications/almanac/controller/AlmanacBindingViewController.php b/src/applications/almanac/controller/AlmanacBindingViewController.php index d1ed2178d2..a4f5b7b475 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($title) ->setPolicyObject($binding) ->setHeaderIcon('fa-object-group'); @@ -83,7 +83,7 @@ final class AlmanacBindingViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($viewer); $properties->addProperty( pht('Service'), @@ -108,7 +108,7 @@ final class AlmanacBindingViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer) + ->setViewer($viewer) ->setObject($binding); $properties->invokeWillRenderEvent(); diff --git a/src/applications/almanac/controller/AlmanacDeviceViewController.php b/src/applications/almanac/controller/AlmanacDeviceViewController.php index 39939abfa7..fe7ae31297 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($device->getName()) ->setPolicyObject($device) ->setHeaderIcon('fa-server'); @@ -120,7 +120,7 @@ final class AlmanacDeviceViewController ->execute(); $table = id(new AlmanacInterfaceTableView()) - ->setUser($viewer) + ->setViewer($viewer) ->setInterfaces($interfaces) ->setCanEdit($can_edit); @@ -158,7 +158,7 @@ final class AlmanacDeviceViewController ->execute(); $table = id(new PhabricatorAuthSSHKeyTableView()) - ->setUser($viewer) + ->setViewer($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 a673bdf648..242e955e07 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()) - ->setUser($viewer) + ->setViewer($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 271ae1a0fb..48c60dcda4 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()) - ->setUser($viewer) + ->setViewer($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 ef587e5b05..1067ae6b67 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendChild( id(new AphrontFormTextControl()) ->setName('key') diff --git a/src/applications/almanac/controller/AlmanacServiceEditController.php b/src/applications/almanac/controller/AlmanacServiceEditController.php index 710e27a966..4fffcfadaf 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()) - ->setUser($viewer) + ->setViewer($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 3cb7451463..ca4a34375e 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($service->getName()) ->setPolicyObject($service) ->setHeaderIcon('fa-plug'); @@ -74,7 +74,7 @@ final class AlmanacServiceViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($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.')) - ->setUser($viewer) + ->setViewer($viewer) ->setBindings($bindings) ->setHideServiceColumn(true); diff --git a/src/applications/almanac/query/AlmanacDeviceSearchEngine.php b/src/applications/almanac/query/AlmanacDeviceSearchEngine.php index a3e8af7243..a7277bd389 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->setUser($viewer); + $list->setViewer($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 3ac2b76ee0..23853ce6d4 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->setUser($viewer); + $list->setViewer($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 941d648d67..f66abcc5e3 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->setUser($viewer); + $list->setViewer($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 5f0da6b59e..1fb798ab43 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->setUser($viewer); + $list->setViewer($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 a74cb4f9c3..275bfe449e 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->getUser(); + $viewer = $this->getViewer(); $phids = array(); foreach ($bindings as $binding) { diff --git a/src/applications/almanac/view/AlmanacInterfaceTableView.php b/src/applications/almanac/view/AlmanacInterfaceTableView.php index 1fdcd0bf35..a657fa6887 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->getUser(); + $viewer = $this->getViewer(); $can_edit = $this->getCanEdit(); diff --git a/src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php b/src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php index 3d79bcfb81..a42827c20f 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setExternalAccount($account) ->setAuthProvider($provider)); diff --git a/src/applications/auth/controller/PhabricatorAuthLoginController.php b/src/applications/auth/controller/PhabricatorAuthLoginController.php index 2a1ecf97c4..43aaa3a681 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()) - ->setUser($viewer) + ->setViewer($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 9b1eafd415..25e0b68723 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()) - ->setUser($request->getUser()) + ->setViewer($request->getUser()) ->addHiddenInput('phase', 2); if (!$is_default) { @@ -519,7 +519,7 @@ final class PhabricatorAuthRegisterController ->setLabel(pht('External Account')) ->setValue( id(new PhabricatorAuthAccountView()) - ->setUser($request->getUser()) + ->setViewer($request->getUser()) ->setExternalAccount($account) ->setAuthProvider($provider))); } diff --git a/src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php b/src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php index 88bbcb5f8e..980c2f9c2c 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()) - ->setUser($viewer) + ->setViewer($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 591b835d62..86dc8e8296 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($ssh_key->getName()) ->setHeaderIcon('fa-key'); @@ -108,7 +108,7 @@ final class PhabricatorAuthSSHKeyViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($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 996795eb94..b3dd707387 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setTitle($title) ->addCancelButton('/', $continue) ->appendChild($content); diff --git a/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php b/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php index 2f15460eac..04d717d8ee 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()) - ->setUser($viewer) + ->setViewer($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 e105a3fd2b..c3f4fcc05a 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($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 cb1c537ca8..ce833e8158 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() - ->setUser($viewer) + ->setViewer($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 a1636396ac..6039de7b25 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setBig(true) ->setFlush(true); diff --git a/src/applications/auth/engine/PhabricatorAuthSessionEngine.php b/src/applications/auth/engine/PhabricatorAuthSessionEngine.php index 0a62103ef7..571039c412 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendRemarkupInstructions(''); $answered = array(); diff --git a/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php b/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php index c0a3b8ce7d..1a4bf0c0fd 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()) - ->setUser($viewer); + ->setViewer($viewer); if ($mode == 'link') { $dialog->setTitle(pht('Link LDAP Account')); @@ -110,7 +110,7 @@ final class PhabricatorLDAPAuthProvider extends PhabricatorAuthProvider { } $form = id(new PHUIFormLayoutView()) - ->setUser($viewer) + ->setViewer($viewer) ->setFullWidth(true) ->appendChild( id(new AphrontFormTextControl()) diff --git a/src/applications/auth/provider/PhabricatorPasswordAuthProvider.php b/src/applications/auth/provider/PhabricatorPasswordAuthProvider.php index 4513787d89..e862be998a 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()) - ->setUser($viewer) + ->setViewer($viewer) ->addHiddenInput('invite', true) ->appendChild( id(new AphrontFormTextControl()) @@ -150,7 +150,7 @@ final class PhabricatorPasswordAuthProvider extends PhabricatorAuthProvider { ->setName('username')); $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($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 f0421d7466..2ea39865a3 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->setUser($viewer); + $list->setViewer($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 b9e3f56e86..a7c8e53418 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()) - ->setUser($viewer) + ->setViewer($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->getUser(); + $viewer = $this->getViewer(); $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 1a31584a51..8ed6e0389e 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()) - ->setUser($viewer) + ->setViewer($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 f25fd93542..24052b5f6f 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 - ->setUser($viewer) + ->setViewer($viewer) ->setFullWidth(true) ->appendControl( id(new AphrontFormTokenizerControl()) @@ -68,7 +68,7 @@ final class PhabricatorBadgesEditRecipientsController ->setDatasource(new PhabricatorPeopleDatasource())); $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + ->setViewer($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 97d4b11b93..77f0160c27 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()) - ->setUser($viewer) + ->setViewer($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 a28a37ac30..9cac1870e2 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) - ->setUser($viewer); + ->setViewer($viewer); $view = id(new PHUITwoColumnView()) ->setHeader($header) diff --git a/src/applications/badges/controller/PhabricatorBadgesRemoveRecipientsController.php b/src/applications/badges/controller/PhabricatorBadgesRemoveRecipientsController.php index 4901bf955d..4117538c31 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()) - ->setUser($viewer) + ->setViewer($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 a5390ea5f4..3173258f6a 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()) - ->setUser($viewer); + ->setViewer($viewer); $description = $badge->getDescription(); if (strlen($description)) { diff --git a/src/applications/calendar/controller/PhabricatorCalendarExportViewController.php b/src/applications/calendar/controller/PhabricatorCalendarExportViewController.php index 1dc2a8d1be..cf17e88fa6 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($export->getName()) ->setStatus($icon, $color, $status) ->setPolicyObject($export); @@ -128,7 +128,7 @@ final class PhabricatorCalendarExportViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($viewer); $mode = $export->getPolicyMode(); diff --git a/src/applications/calendar/controller/PhabricatorCalendarImportEditController.php b/src/applications/calendar/controller/PhabricatorCalendarImportEditController.php index 9acbd0f2d2..1367cb040c 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()) - ->setUser($viewer) + ->setViewer($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 84810a6505..d1da9dbad8 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setObject($event) ->setObjectName($monogram) ->setHeader($event->getName()) @@ -448,7 +448,7 @@ final class PhabricatorCalendarEventSearchEngine $start_day)) ->setQuery($query->getQueryKey()); - $day_view->setUser($viewer); + $day_view->setViewer($viewer); $phids = mpull($events, 'getHostPHID'); diff --git a/src/applications/conduit/controller/PhabricatorConduitConsoleController.php b/src/applications/conduit/controller/PhabricatorConduitConsoleController.php index aa9a8c2796..998d175ea4 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) - ->setUser($request->getUser()) + ->setViewer($request->getUser()) ->appendRemarkupInstructions( pht( 'Enter parameters using **JSON**. For instance, to enter a '. @@ -67,7 +67,7 @@ final class PhabricatorConduitConsoleController } $header = id(new PHUIHeaderView()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($method->getAPIMethodName()) ->setHeaderIcon('fa-tty'); diff --git a/src/applications/conduit/controller/PhabricatorConduitTokenController.php b/src/applications/conduit/controller/PhabricatorConduitTokenController.php index fe6d676b68..66995a9c35 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()) - ->setUser($viewer) + ->setViewer($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 745706d97f..cce9874b0b 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()) - ->setUser($viewer) + ->setViewer($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 aa640502c7..fcac74c64a 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()) - ->setUser($viewer) + ->setViewer($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 40c4cfdf8c..6ae9794169 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()) - ->setUser($this->getRequest()->getUser()); + ->setViewer($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 9f40453fde..060a2d7e08 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()) - ->setUser($viewer); + ->setViewer($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 38c592efca..8fcc27570e 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 - ->setUser($viewer) + ->setViewer($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 3bd0c6b111..123e3f54f7 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()) - ->setUser($user) + ->setViewer($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 008f32f816..76c795ce76 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()) - ->setUser($user) + ->setViewer($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 8458a9d5c4..d2805a666b 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()) - ->setUser($user) + ->setViewer($user) ->setTitle($title) ->setSubtitle($subtitle) ->setHref($uri) diff --git a/src/applications/conpherence/controller/ConpherenceRoomPictureController.php b/src/applications/conpherence/controller/ConpherenceRoomPictureController.php index 47a0576d70..87e9963183 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()) - ->setUser($viewer); + ->setViewer($viewer); $default_image = PhabricatorFile::loadBuiltin($viewer, 'conpherence.png'); @@ -192,7 +192,7 @@ final class ConpherenceRoomPictureController ->setForm($form); $upload_form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($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 c868684389..db95d360cc 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()) - ->setUser($viewer) + ->setViewer($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 9a4643ddf2..e38095731c 100644 --- a/src/applications/conpherence/controller/ConpherenceUpdateController.php +++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php @@ -202,7 +202,7 @@ final class ConpherenceUpdateController return $dialog - ->setUser($user) + ->setViewer($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()) - ->setUser($user) + ->setViewer($user) ->setFullWidth(true) ->appendControl( id(new AphrontFormTokenizerControl()) ->setName('add_person') - ->setUser($user) + ->setViewer($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()) - ->setUser($user) + ->setViewer($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 f716c82ec1..17b187e124 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->setUser($viewer); + $list->setViewer($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()) - ->setUser($viewer) + ->setViewer($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 556754557c..c26b349fff 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->getUser(), + $this->getViewer(), $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->getUser()); + $data = $conpherence->getDisplayData($this->getViewer()); $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->getUser()); + $data = $conpherence->getDisplayData($this->getViewer()); $header = phutil_tag( 'span', array(), @@ -359,7 +359,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { $actions = array(); if ($conpherence) { $can_edit = PhabricatorPolicyFilter::hasCapability( - $this->getUser(), + $this->getViewer(), $conpherence, PhabricatorPolicyCapability::CAN_EDIT); $actions[] = array( @@ -421,7 +421,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { } $data = ConpherenceTransactionRenderer::renderTransactions( - $this->getUser(), + $this->getViewer(), $conpherence); $messages = ConpherenceTransactionRenderer::renderMessagePaneContent( $data['transactions'], @@ -463,7 +463,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { )); $id = $conpherence->getID(); return phabricator_form( - $this->getUser(), + $this->getViewer(), array( 'method' => 'POST', 'action' => '/conpherence/update/'.$id.'/', diff --git a/src/applications/conpherence/view/ConpherenceLayoutView.php b/src/applications/conpherence/view/ConpherenceLayoutView.php index 3382a9ba87..34fe4c4293 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->getUser(), + $this->getViewer(), $this->thread, PhabricatorPolicyCapability::CAN_EDIT); } else { diff --git a/src/applications/conpherence/view/ConpherenceThreadListView.php b/src/applications/conpherence/view/ConpherenceThreadListView.php index f3efc96621..f05ece104d 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->getUser(); + $user = $this->getViewer(); $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 d1d4c1b392..d818221613 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->getUser(); + $viewer = $this->getViewer(); if (!$viewer) { throw new PhutilInvalidStateException('setUser'); } @@ -122,7 +122,7 @@ final class ConpherenceTransactionView extends AphrontView { } private function renderTransactionInfo() { - $viewer = $this->getUser(); + $viewer = $this->getViewer(); $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 db63613df2..74d55d6f5d 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setCountdown($countdown); $id = $countdown->getID(); @@ -44,7 +44,7 @@ final class PhabricatorCountdownViewController $header = id(new PHUIHeaderView()) ->setHeader($title) - ->setUser($viewer) + ->setViewer($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 bf98b41308..1351a92ed0 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->setUser($viewer); + $list->setViewer($viewer); foreach ($countdowns as $countdown) { $id = $countdown->getID(); $ended = false; @@ -113,7 +113,7 @@ final class PhabricatorCountdownSearchEngine } $item = id(new PHUIObjectItemView()) - ->setUser($viewer) + ->setViewer($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 7952ab6d7d..735adf71ce 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) - ->setUser($viewer); + ->setViewer($viewer); } } diff --git a/src/applications/countdown/view/PhabricatorCountdownView.php b/src/applications/countdown/view/PhabricatorCountdownView.php index f88c5a9d9c..eab1b96f1f 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->getUser()); + $launch_date = phabricator_datetime($epoch, $this->getViewer()); $foot = phutil_tag( 'td', array( @@ -53,7 +53,7 @@ final class PhabricatorCountdownView extends AphrontView { $description = $countdown->getDescription(); if (strlen($description)) { - $description = new PHUIRemarkupView($this->getUser(), $description); + $description = new PHUIRemarkupView($this->getViewer(), $description); $description = phutil_tag( 'div', array( diff --git a/src/applications/daemon/controller/PhabricatorDaemonBulkJobViewController.php b/src/applications/daemon/controller/PhabricatorDaemonBulkJobViewController.php index 00fb297fe0..e0caa54a3c 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setObject($job); $view->addProperty( diff --git a/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php b/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php index 8d9a9986e4..ed48c46643 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()) - ->setUser($viewer) + ->setViewer($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 253a3d5190..505088b2fb 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()) - ->setUser($viewer); + ->setViewer($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 dbfc7df465..514790ac4b 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setBig(true); $menu->addItem( diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php index 078df3261c..e8ea22b9b2 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()) - ->setUser($viewer) + ->setViewer($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 c4b30652b9..00d40c672f 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->setUser($viewer); + $list->setViewer($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 a6006c1112..ac4d26076d 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->setUser($viewer); + $list->setViewer($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 c4722e8d37..5ec5bb9f75 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()) - ->setUser($this->getViewer()) + ->setViewer($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 ff6623efe3..1aea5ec12d 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())) - ->setUser($request->getUser()); + ->setViewer($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 d405125c8e..f2b6c04dd9 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()) - ->setUser($viewer) + ->setViewer($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 da96fed069..a6a933e1d1 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeaderIcon('fa-cog') ->addActionLink($button); } diff --git a/src/applications/differential/controller/DifferentialRevisionOperationController.php b/src/applications/differential/controller/DifferentialRevisionOperationController.php index feeb6770b8..298521329c 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()) - ->setUser($viewer) + ->setViewer($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 8a32988bce..e2e2b534bb 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setBoxView($box_view) ->setOperation($operation); } diff --git a/src/applications/differential/customfield/DifferentialProjectReviewersField.php b/src/applications/differential/customfield/DifferentialProjectReviewersField.php index 4e0bb13986..64d0b961c2 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()) - ->setUser($this->getViewer()) + ->setViewer($this->getViewer()) ->setReviewers($reviewers) ->setHandles($handles); diff --git a/src/applications/differential/customfield/DifferentialRevertPlanField.php b/src/applications/differential/customfield/DifferentialRevertPlanField.php index ca13788294..3d9e7d29cc 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()) - ->setUser($this->getViewer()) + ->setViewer($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 684c3e2fec..b701bb56e5 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->getUser(); + $viewer = $this->getViewer(); $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 b3f02c18d3..0a78a0bb2a 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->getUser()); + $age = phabricator_datetime($row['age'], $this->getViewer()); } else { $age = null; } @@ -255,7 +255,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView { )); $content = phabricator_form( - $this->getUser(), + $this->getViewer(), array( 'action' => '/D'.$revision_id.'#toc', ), diff --git a/src/applications/diffusion/controller/DiffusionBranchTableController.php b/src/applications/diffusion/controller/DiffusionBranchTableController.php index 63b1dbc592..b2fe8cdfad 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setBranches($branches) ->setCommits($commits) ->setDiffusionRequest($drequest); diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php index fae8d9f25c..37e5cc76a1 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()) - ->setUser($request->getUser()); + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($viewer) ->setNoDataString(pht('No Owners')); if ($packages) { @@ -810,7 +810,7 @@ final class DiffusionBrowseController extends DiffusionController { $search = $this->renderSearchForm($path); $header = id(new PHUIHeaderView()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($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 0120c978d0..a44d819bf0 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->setUser($viewer); + $changeset_view->setViewer($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) - ->setUser($viewer) + ->setViewer($viewer) ->setPolicyObject($drequest->getRepository()) ->addTag($tag); @@ -159,7 +159,7 @@ final class DiffusionChangeController extends DiffusionController { $viewer = $this->getRequest()->getUser(); $view = id(new PHUIPropertyListView()) - ->setUser($viewer) + ->setViewer($viewer) ->setActionList($actions); $stable_commit = $drequest->getStableCommit(); diff --git a/src/applications/diffusion/controller/DiffusionCloneController.php b/src/applications/diffusion/controller/DiffusionCloneController.php index bf118bcf6d..13afd2c9b6 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()) - ->setUser($viewer); + ->setViewer($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 26493689c4..633f192b8f 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->setUser($viewer); + $change_list->setViewer($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()) - ->setUser($this->getRequest()->getUser()) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($header) ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); diff --git a/src/applications/diffusion/controller/DiffusionController.php b/src/applications/diffusion/controller/DiffusionController.php index 1f77f28d77..82281b0abc 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()) - ->setUser($this->getViewer()) + ->setViewer($this->getViewer()) ->setPath($readme_path) ->setContent($readme_corpus); } @@ -596,7 +596,7 @@ abstract class DiffusionController extends PhabricatorController { )); $form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($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 eeb8f13118..aefce0afeb 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()) - ->setUser($viewer) + ->setViewer($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 1c78ec5992..2b56edde3d 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($identity->getIdentityShortName()) ->setHeaderIcon('fa-globe'); diff --git a/src/applications/diffusion/controller/DiffusionLintController.php b/src/applications/diffusion/controller/DiffusionLintController.php index 704435882d..95bf00f34a 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()) - ->setUser($viewer) + ->setViewer($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'))) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($viewer); $list_uri = $drequest->generateURI( array( @@ -355,7 +355,7 @@ final class DiffusionLintController extends DiffusionController { $viewer = $this->getRequest()->getUser(); $view = id(new PHUIPropertyListView()) - ->setUser($viewer) + ->setViewer($viewer) ->setActionList($actions); $lint_commit = $branch->getLintCommit(); diff --git a/src/applications/diffusion/controller/DiffusionPushEventViewController.php b/src/applications/diffusion/controller/DiffusionPushEventViewController.php index 21718c256d..29e0d46b37 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()) - ->setUser($viewer) + ->setViewer($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 8626721fc4..752a4372e5 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()) - ->setUser($viewer) + ->setViewer($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 d2e7700c98..05b6507744 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()) - ->setUser($viewer); + ->setViewer($viewer); $default_image = PhabricatorFile::loadBuiltin( $viewer, 'repo/code.png'); @@ -210,7 +210,7 @@ final class DiffusionRepositoryProfilePictureController ->setForm($form); $upload_form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($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 ffc6a1a9ef..b941e50a30 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) - ->setUser($viewer) + ->setViewer($viewer) ->setCommits($commits) ->setDiffusionRequest($drequest); diff --git a/src/applications/diffusion/management/DiffusionRepositoryAutomationManagementPanel.php b/src/applications/diffusion/management/DiffusionRepositoryAutomationManagementPanel.php index ac0c1251bb..9b2af12ad2 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setObjectPHID($repository->getPHID()) ->setBlueprintPHIDs($blueprint_phids); } diff --git a/src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php b/src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php index 3b6d0c0f6b..5a6612e88d 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($viewer); if ($vcspassword->getID()) { $remove_form diff --git a/src/applications/diffusion/view/DiffusionBranchListView.php b/src/applications/diffusion/view/DiffusionBranchListView.php index 7df1665fd1..3e4add04f9 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->getUser(); + $viewer = $this->getViewer(); 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 acfcfc0d82..857a33ea7c 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->getUser()); + $this->getViewer()); return $show_builds; } diff --git a/src/applications/diffusion/view/DiffusionReadmeView.php b/src/applications/diffusion/view/DiffusionReadmeView.php index 72b7a94f5b..d8c4aa5ae9 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->getUser()) + ->setViewer($this->getViewer()) ->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 261cc07deb..7e10905923 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->getUser(); + $viewer = $this->getViewer(); $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 4e0ae3524b..63abc75d98 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($user) + ->setViewer($user) ->setObject($book); $action_view->addAction( diff --git a/src/applications/diviner/controller/DivinerBookEditController.php b/src/applications/diviner/controller/DivinerBookEditController.php index b783e96746..2316a6d2f2 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()) - ->setUser($viewer) + ->setViewer($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 072443ed8c..9a10055182 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()) - ->setUser($viewer) + ->setViewer($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 c81660e61a..9d8084b92d 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()) - ->setUser($viewer); + ->setViewer($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 80a0e5d1ef..ef71fa1295 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) - ->setUser($viewer) + ->setViewer($viewer) ->setPolicyObject($authorization); $state = $authorization->getBlueprintAuthorizationState(); diff --git a/src/applications/drydock/controller/DrydockBlueprintEditController.php b/src/applications/drydock/controller/DrydockBlueprintEditController.php index 8f066c708b..63d212080d 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendChild($control) ->appendChild( id(new AphrontFormSubmitControl()) diff --git a/src/applications/drydock/controller/DrydockBlueprintViewController.php b/src/applications/drydock/controller/DrydockBlueprintViewController.php index 2c31e4ae8f..8e0f6ed533 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) - ->setUser($viewer) + ->setViewer($viewer) ->setPolicyObject($blueprint) ->setHeaderIcon('fa-map-o'); @@ -132,7 +132,7 @@ final class DrydockBlueprintViewController extends DrydockBlueprintController { $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($viewer); $view->addProperty( pht('Type'), @@ -156,7 +156,7 @@ final class DrydockBlueprintViewController extends DrydockBlueprintController { ->execute(); $resource_list = id(new DrydockResourceListView()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($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 2d7ccfb8a0..189a1e7980 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setBig(true); $menu->addItem( diff --git a/src/applications/drydock/controller/DrydockController.php b/src/applications/drydock/controller/DrydockController.php index f393f210d7..f584652ef6 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setLogs($logs); return $log_table; diff --git a/src/applications/drydock/controller/DrydockRepositoryOperationStatusController.php b/src/applications/drydock/controller/DrydockRepositoryOperationStatusController.php index 5f35c91bb3..371333129a 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setOperation($operation); if ($request->isAjax()) { diff --git a/src/applications/drydock/controller/DrydockRepositoryOperationViewController.php b/src/applications/drydock/controller/DrydockRepositoryOperationViewController.php index e255c63ec3..80b52cbe2b 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) - ->setUser($viewer) + ->setViewer($viewer) ->setPolicyObject($operation) ->setHeaderIcon('fa-fighter-jet'); @@ -44,7 +44,7 @@ final class DrydockRepositoryOperationViewController $crumbs->setBorder(true); $status_view = id(new DrydockRepositoryOperationStatusView()) - ->setUser($viewer) + ->setViewer($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 ec0dce53e1..fcfc83601a 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($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 81e8c00ba0..fd6d0cfa17 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()) - ->setUser($this->requireViewer()) + ->setViewer($this->requireViewer()) ->setAuthorizations($authorizations); $result = new PhabricatorApplicationSearchResultView(); diff --git a/src/applications/drydock/query/DrydockLeaseSearchEngine.php b/src/applications/drydock/query/DrydockLeaseSearchEngine.php index 4f58b906d0..c5779d2ea1 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()) - ->setUser($this->requireViewer()) + ->setViewer($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 553f4be486..300ce613bd 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()) - ->setUser($this->requireViewer()) + ->setViewer($this->requireViewer()) ->setLogs($logs); $result = new PhabricatorApplicationSearchResultView(); diff --git a/src/applications/drydock/query/DrydockResourceSearchEngine.php b/src/applications/drydock/query/DrydockResourceSearchEngine.php index 349ef422be..0425c35f4f 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()) - ->setUser($this->requireViewer()) + ->setViewer($this->requireViewer()) ->setResources($resources); $result = new PhabricatorApplicationSearchResultView(); diff --git a/src/applications/drydock/view/DrydockAuthorizationListView.php b/src/applications/drydock/view/DrydockAuthorizationListView.php index f0c44c1c7f..42becc232f 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->getUser(); + $viewer = $this->getViewer(); $authorizations = $this->authorizations; diff --git a/src/applications/drydock/view/DrydockLeaseListView.php b/src/applications/drydock/view/DrydockLeaseListView.php index d0d2f9b950..699df97629 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->getUser(); + $viewer = $this->getViewer(); $view = new PHUIObjectItemListView(); foreach ($leases as $lease) { $item = id(new PHUIObjectItemView()) - ->setUser($viewer) + ->setViewer($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 f3a580ffff..5d836e4b32 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->getUser(); + $viewer = $this->getViewer(); $view = new PHUIObjectItemListView(); diff --git a/src/applications/drydock/view/DrydockObjectAuthorizationView.php b/src/applications/drydock/view/DrydockObjectAuthorizationView.php index 25c1d582a3..3de07f8a21 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->getUser(); + $viewer = $this->getViewer(); $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 aa7d1e3873..0551bcd1f4 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->getUser(); + $viewer = $this->getViewer(); $operation = $this->getOperation(); $list = $this->renderUnderwayState(); @@ -57,7 +57,7 @@ final class DrydockRepositoryOperationStatusView } public function renderUnderwayState() { - $viewer = $this->getUser(); + $viewer = $this->getViewer(); $operation = $this->getOperation(); $id = $operation->getID(); diff --git a/src/applications/drydock/view/DrydockResourceListView.php b/src/applications/drydock/view/DrydockResourceListView.php index 01b6d167cb..51281e2827 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->getUser(); + $viewer = $this->getViewer(); $view = new PHUIObjectItemListView(); foreach ($resources as $resource) { diff --git a/src/applications/feed/builder/PhabricatorFeedBuilder.php b/src/applications/feed/builder/PhabricatorFeedBuilder.php index b674d1d837..072d8cb436 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()) - ->setUser($user) + ->setViewer($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 28123d9002..9a48bc9ab7 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setAction($post_uri) ->addSigil('lightbox-comment-form') ->addClass('lightbox-comment-form') ->setWorkflow(true) ->appendChild( id(new PhabricatorRemarkupControl()) - ->setUser($viewer) + ->setViewer($viewer) ->setName('comment') ->setValue($draft->getDraft())) ->appendChild( diff --git a/src/applications/files/controller/PhabricatorFileUICurtainListController.php b/src/applications/files/controller/PhabricatorFileUICurtainListController.php index 3049f4ddeb..fd8897011a 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()) - ->setUser($viewer); + ->setViewer($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 57cb53d869..28361e720f 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()) - ->setUser($viewer) + ->setViewer($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 c565ba9204..7c278fc9c8 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()) - ->setUser($viewer); + ->setViewer($viewer); foreach ($files as $file) { $id = $file->getID(); @@ -196,7 +196,7 @@ final class PhabricatorFileSearchEngine } $list_view->appendChild(id(new PhabricatorGlobalUploadTargetView()) - ->setUser($viewer)); + ->setViewer($viewer)); $result = new PhabricatorApplicationSearchResultView(); diff --git a/src/applications/flag/controller/PhabricatorFlagEditController.php b/src/applications/flag/controller/PhabricatorFlagEditController.php index 5844a3801a..665cace5be 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->setUser($viewer); + $dialog->setViewer($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 d37dfba015..aa72b2a0c8 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()) - ->setUser($viewer); + ->setViewer($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 17ead82ebf..b970c7ea8f 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendChild( id(new AphrontFormSelectControl()) ->setName('accountPHID') diff --git a/src/applications/fund/controller/FundInitiativeViewController.php b/src/applications/fund/controller/FundInitiativeViewController.php index 7c40858082..ef35bc30de 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($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 a17948fc8d..afa35f7dca 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) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeaderIcon('fa-bullseye'); $target_box = id(new PHUIObjectBoxView()) @@ -422,7 +422,7 @@ final class HarbormasterBuildViewController $log->getLogType())) ->addActionLink($prototype_view) ->setSubheader($subheader) - ->setUser($viewer); + ->setViewer($viewer); $log_box = id(new PHUIObjectBoxView()) ->setHeader($header) @@ -566,7 +566,7 @@ final class HarbormasterBuildViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($viewer); $handles = id(new PhabricatorHandleQuery()) ->setViewer($viewer) diff --git a/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php b/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php index d8f6f2f950..fc51101fb0 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) - ->setUser($viewer) + ->setViewer($viewer) ->setPolicyObject($buildable) ->setStatus( $buildable->getStatusIcon(), @@ -128,7 +128,7 @@ final class HarbormasterBuildableViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($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 8fe1edbcaf..3218ffe97e 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()) - ->setUser($viewer) + ->setViewer($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 cfa27fec1d..547cbec2e3 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()) - ->setUser($viewer) + ->setViewer($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 4f2b70fcaf..efb0f4e9fe 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setPolicyObject($plan) ->setHeaderIcon('fa-ship'); @@ -106,7 +106,7 @@ final class HarbormasterPlanViewController extends HarbormasterPlanController { PhabricatorPolicyCapability::CAN_EDIT); $step_list = id(new PHUIObjectItemListView()) - ->setUser($viewer) + ->setViewer($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 a420d02627..82ced9fb71 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()) - ->setUser($viewer); + ->setViewer($viewer); $instructions = $implementation->getEditInstructions(); if (phutil_nonempty_string($instructions)) { @@ -172,7 +172,7 @@ final class HarbormasterStepEditController $form ->appendChild( id(new PhabricatorRemarkupControl()) - ->setUser($viewer) + ->setViewer($viewer) ->setName('description') ->setLabel(pht('Description')) ->setError($e_description) @@ -258,7 +258,7 @@ final class HarbormasterStepEditController $rows = implode("\n", $rows); $form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($viewer) ->appendRemarkupInstructions($rows); return id(new PHUIObjectBoxView()) diff --git a/src/applications/harbormaster/controller/HarbormasterStepViewController.php b/src/applications/harbormaster/controller/HarbormasterStepViewController.php index d4f1592264..9580401cbc 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()) - ->setUser($viewer); + ->setViewer($viewer); try { $implementation = $step->getStepImplementation(); diff --git a/src/applications/harbormaster/controller/HarbormasterUnitMessageViewController.php b/src/applications/harbormaster/controller/HarbormasterUnitMessageViewController.php index 7111db654f..d57e0b57e3 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()) - ->setUser($viewer); + ->setViewer($viewer); $view->addProperty( pht('Run At'), diff --git a/src/applications/help/controller/PhabricatorHelpDocumentationController.php b/src/applications/help/controller/PhabricatorHelpDocumentationController.php index 82a6de6ec5..381c71288e 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()) - ->setUser($viewer); + ->setViewer($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 765237930c..7a80c49e0b 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setTitle($title) ->appendChild($body) ->addSubmitButton($button) diff --git a/src/applications/herald/controller/HeraldNewController.php b/src/applications/herald/controller/HeraldNewController.php index 93d4503754..f7f6da2bdc 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()) - ->setUser($viewer) + ->setViewer($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 431a39b1fc..332cab0135 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()) - ->setUser($viewer) + ->setViewer($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 49e0fd8e32..dba82a39cc 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($viewer); $view->addProperty( pht('Rule Type'), diff --git a/src/applications/herald/controller/HeraldTestConsoleController.php b/src/applications/herald/controller/HeraldTestConsoleController.php index 18c22b4c87..f72e36c56c 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()) - ->setUser($viewer) + ->setViewer($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 7798a2aa9d..a5799aa82d 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) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($viewer) ->addSectionHeader(pht('Preamble')) ->addTextContent($preamble_text); @@ -409,7 +409,7 @@ final class LegalpadDocumentSignController extends LegalpadController { $data = $signature->getSignatureData(); $form = id(new AphrontFormView()) - ->setUser($viewer); + ->setViewer($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 73c9480600..70df17baba 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()) - ->setUser($viewer); + ->setViewer($viewer); if ($is_individual) { $form diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignatureVerificationController.php b/src/applications/legalpad/controller/LegalpadDocumentSignatureVerificationController.php index b50b91e896..390ce97fbd 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()) - ->setUser($viewer) + ->setViewer($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 6f2c447b71..e21bb6e967 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()) - ->setUser($viewer); + ->setViewer($viewer); if ($signature->getExemptionPHID()) { $form diff --git a/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php b/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php index 709441eba2..23ae9c1314 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->setUser($viewer); + $list->setViewer($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 fb6eba8401..fc9b7cbed5 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) - ->setUser($viewer); + ->setViewer($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') - ->setUser($viewer) + ->setViewer($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 6c74e44442..45306cb261 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 - ->setUser($request->getUser()) + ->setViewer($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 5851cc5ad8..acc83f18e4 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendControl( id(new AphrontFormTokenizerControl()) ->setLabel(pht('Macro')) @@ -64,7 +64,7 @@ final class PhabricatorMacroMemeDialogController ->setValue($below)); $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + ->setViewer($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 d5a420920d..2dfd0bd4ae 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($viewer); switch ($macro->getAudioBehavior()) { case PhabricatorFileImageMacro::AUDIO_BEHAVIOR_ONCE: @@ -184,7 +184,7 @@ final class PhabricatorMacroViewController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($viewer); $file = $macro->getFile(); if ($file) { diff --git a/src/applications/macro/query/PhabricatorMacroSearchEngine.php b/src/applications/macro/query/PhabricatorMacroSearchEngine.php index 87559b13b2..af18c8973c 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setObject($macro); if ($file) { diff --git a/src/applications/maniphest/controller/ManiphestReportController.php b/src/applications/maniphest/controller/ManiphestReportController.php index 765bca71e0..74daa726be 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()) - ->setUser($viewer) + ->setViewer($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 3105cf661d..7a757b2778 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setBig(true) ->setFlush(true); diff --git a/src/applications/maniphest/view/ManiphestTaskListView.php b/src/applications/maniphest/view/ManiphestTaskListView.php index 025993de7f..b7a099d8e9 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->getUser()) + ->setViewer($this->getViewer()) ->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->getUser())); + phabricator_datetime($closed_epoch, $this->getViewer())); } else { $item->addIcon( 'none', - phabricator_datetime($task->getDateModified(), $this->getUser())); + phabricator_datetime($task->getDateModified(), $this->getViewer())); } if ($this->showBatchControls) { diff --git a/src/applications/maniphest/view/ManiphestTaskResultListView.php b/src/applications/maniphest/view/ManiphestTaskResultListView.php index 76a0f4ee1a..23cc3c76d4 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->getUser(); + $viewer = $this->getViewer(); $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()) - ->setUser($viewer) + ->setViewer($viewer) ->setNoDataString(pht('No tasks found.')); } @@ -155,7 +155,7 @@ final class ManiphestTaskResultListView extends ManiphestView { } private function renderBatchEditor(PhabricatorSavedQuery $saved_query) { - $user = $this->getUser(); + $user = $this->getViewer(); if (!$this->canBatchEdit) { return null; diff --git a/src/applications/meta/controller/PhabricatorApplicationUninstallController.php b/src/applications/meta/controller/PhabricatorApplicationUninstallController.php index e89976c42c..459c616632 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()) - ->setUser($viewer) + ->setViewer($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 6664ae9d29..c3ebfb065a 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()) - ->setUser($viewer); + ->setViewer($viewer); $crumbs = $controller->buildPanelCrumbs($this); $crumbs->addTextCrumb(pht('Edit Application Emails')); @@ -229,7 +229,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel } $form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($viewer) ->appendChild( id(new AphrontFormTextControl()) ->setLabel(pht('Email')) @@ -272,7 +272,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel } $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + ->setViewer($viewer) ->setWidth(AphrontDialogView::WIDTH_FORM) ->setTitle($title) ->setValidationException($validation_exception) @@ -314,7 +314,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel } $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + ->setViewer($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 3765c1aaf4..fd493a1317 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) - ->setUser($viewer) + ->setViewer($viewer) ->setPolicyObject($mail) ->setHeaderIcon('fa-envelope'); @@ -113,7 +113,7 @@ final class PhabricatorMetaMTAMailViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer) + ->setViewer($viewer) ->setObject($mail); if ($mail->getFrom()) { @@ -185,7 +185,7 @@ final class PhabricatorMetaMTAMailViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer) + ->setViewer($viewer) ->setStacked(true); $headers = $mail->getDeliveredHeaders(); @@ -217,7 +217,7 @@ final class PhabricatorMetaMTAMailViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($viewer); $actors = $mail->getDeliveredActors(); $reasons = null; @@ -416,7 +416,7 @@ final class PhabricatorMetaMTAMailViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($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 ddfec31461..ec0a7f1c85 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()) - ->setUser($viewer) + ->setViewer($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 6712591e12..f5218d52b1 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->setUser($viewer); + $dialog->setViewer($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 5daade874d..49fc36d015 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()) - ->setUser($viewer); + ->setViewer($viewer); $menu->addItem( id(new PHUIObjectItemView()) diff --git a/src/applications/nuance/controller/NuanceItemManageController.php b/src/applications/nuance/controller/NuanceItemManageController.php index 2b6b4c89b8..36367461d4 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()) - ->setUser($viewer); + ->setViewer($viewer); $properties->addProperty( pht('Date Created'), diff --git a/src/applications/nuance/controller/NuanceQueueViewController.php b/src/applications/nuance/controller/NuanceQueueViewController.php index f5284f6bfa..b5a23fc3d2 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($queue->getName()) ->setPolicyObject($queue); diff --git a/src/applications/nuance/controller/NuanceSourceEditController.php b/src/applications/nuance/controller/NuanceSourceEditController.php index 76025b2eb9..94642748f5 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()) - ->setUser($viewer) + ->setViewer($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 93facde3c1..f7f5cbf1e2 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($source->getName()) ->setPolicyObject($source); @@ -66,7 +66,7 @@ final class NuanceSourceViewController $id = $source->getID(); $actions = id(new PhabricatorActionListView()) - ->setUser($viewer); + ->setViewer($viewer); $can_edit = PhabricatorPolicyFilter::hasCapability( $viewer, diff --git a/src/applications/nuance/query/NuanceItemSearchEngine.php b/src/applications/nuance/query/NuanceItemSearchEngine.php index 98f7f2fbb5..d2863f94e4 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->setUser($viewer); + $list->setViewer($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 3250832ba2..10e0d5715d 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->setUser($viewer); + $list->setViewer($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 9a28befb9e..b9dca4bb07 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->setUser($viewer); + $list->setViewer($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 3862cfed92..4c679f8f03 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()) - ->setUser($viewer) + ->setViewer($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 6b10dd60c5..9feae67831 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()) - ->setUser($viewer) + ->setViewer($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')) - ->setUser($viewer); + ->setViewer($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 6492f78f5a..18bb26b439 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($viewer); $view->addProperty( pht('Client PHID'), diff --git a/src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php b/src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php index a43dfa3d69..c33d63cd2c 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($viewer) ->setTitle(pht('Revoke Authorization?')) ->appendParagraph( pht( diff --git a/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php b/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php index 371cffcefe..44f05989de 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()) - ->setUser($viewer); + ->setViewer($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 8512107e75..afb9a5e05a 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($viewer); $owners = $package->getOwners(); if ($owners) { diff --git a/src/applications/owners/controller/PhabricatorOwnersPathsController.php b/src/applications/owners/controller/PhabricatorOwnersPathsController.php index d4d97290f9..66d87a1701 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()) - ->setUser($viewer) + ->setViewer($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 922fd05041..9151028b51 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()) - ->setUser($viewer); + ->setViewer($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 3c95fd8459..4f903bada3 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() - ->setUser($viewer) + ->setViewer($viewer) ->setTitle(pht('Credential Locked')) ->appendChild( pht( diff --git a/src/applications/passphrase/controller/PassphraseCredentialCreateController.php b/src/applications/passphrase/controller/PassphraseCredentialCreateController.php index b237ef378b..86c839bec9 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()) - ->setUser($viewer) + ->setViewer($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 e1f0532f8a..fb1b9c610c 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() - ->setUser($viewer) + ->setViewer($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 99b6711ae6..20eadeef21 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() - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($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() - ->setUser($viewer) + ->setViewer($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 a5147295c8..72d3819e19 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($viewer); $properties->addProperty( pht('Credential Type'), diff --git a/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php b/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php index a561055be2..f46bdef50e 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->setUser($viewer); + $list->setViewer($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 9a9dbfa0be..6d0e54004b 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->setUser($viewer); + $list->setViewer($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 320ed57d3c..b5c328251f 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()) - ->setUser($admin) + ->setViewer($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 d860eb17b6..e6a57fdc99 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setInviteActions($actions) ->setHandles($handles); $confirm_form = null; if ($any_valid) { $confirm_form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($viewer) ->addHiddenInput('message', $message) ->addHiddenInput('emails', $emails) ->addHiddenInput('confirm', true) @@ -175,7 +175,7 @@ final class PhabricatorPeopleInviteSendController } $form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($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 121e464b30..579409757b 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()) - ->setUser($admin); + ->setViewer($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 3af95462a9..ab3dce265f 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()) - ->setUser($viewer); + ->setViewer($viewer); $field_list->appendFieldsToForm($form); $form diff --git a/src/applications/people/controller/PhabricatorPeopleProfileManageController.php b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php index 8d8377887a..745cd41972 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setObject($user); $field_list = PhabricatorCustomField::getObjectFields( diff --git a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php index fb2c5c6a62..50ec082f9f 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()) - ->setUser($viewer); + ->setViewer($viewer); $default_image = $user->getDefaultProfileImagePHID(); if ($default_image) { @@ -254,7 +254,7 @@ final class PhabricatorPeopleProfilePictureController ->setForm($form); $upload_form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($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 aa76948476..abd9f8d106 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()) - ->setUser($viewer) + ->setViewer($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 d8d654c070..f769d41171 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()) - ->setUser($viewer) + ->setViewer($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 222061ad04..446d6f9778 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()) - ->setUser($this->getViewer()) + ->setViewer($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 22384b3097..51d0df478e 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setLogs($logs); if ($viewer->getIsAdmin()) { diff --git a/src/applications/people/view/PhabricatorUserLogView.php b/src/applications/people/view/PhabricatorUserLogView.php index c4ca973d5b..e5bfccb0d8 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->getUser(); + $viewer = $this->getViewer(); $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 8b63bad9ff..bbb38d9ffd 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()) - ->setUser($viewer) + ->setViewer($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 4bec8efecc..c9cb497dc7 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()) - ->setUser($viewer) + ->setViewer($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 a30d036c3f..c7301eb9f7 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($viewer); $full_domain = $blog->getDomainFullURI(); if (!$full_domain) { @@ -162,7 +162,7 @@ final class PhameBlogManageController extends PhameBlogController { $actions = id(new PhabricatorActionListView()) ->setObject($blog) - ->setUser($viewer); + ->setViewer($viewer); $can_edit = PhabricatorPolicyFilter::hasCapability( $viewer, @@ -221,7 +221,7 @@ final class PhameBlogManageController extends PhameBlogController { $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($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 1f0488cce4..f20e5eef4c 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()) - ->setUser($viewer); + ->setViewer($viewer); $default_image = PhabricatorFile::loadBuiltin($viewer, 'blog.png'); @@ -193,7 +193,7 @@ final class PhameBlogProfilePictureController ->setForm($form); $upload_form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($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 d8b61d8352..ee5a6f7590 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') - ->setUser($viewer); + ->setViewer($viewer); if (!$is_external) { if ($blog->isArchived()) { @@ -134,7 +134,7 @@ final class PhameBlogViewController extends PhameLiveController { $actions = id(new PhabricatorActionListView()) ->setObject($blog) - ->setUser($viewer); + ->setViewer($viewer); $can_edit = PhabricatorPolicyFilter::hasCapability( $viewer, @@ -151,7 +151,7 @@ final class PhameBlogViewController extends PhameLiveController { $actions->addAction( id(new PhabricatorActionView()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($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 db8f662c39..1963b82656 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()) - ->setUser($viewer) + ->setViewer($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 d088b260b5..67ee47f660 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()) - ->setUser($viewer) + ->setViewer($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 88423f3c83..3f07dfffb2 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') - ->setUser($viewer); + ->setViewer($viewer); $hero = $this->buildPhamePostHeader($post); @@ -148,7 +148,7 @@ final class PhamePostViewController list($prev, $next) = $this->loadAdjacentPosts($post); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer) + ->setViewer($viewer) ->setObject($post); $is_live = $this->getIsLive(); @@ -202,7 +202,7 @@ final class PhamePostViewController $actions = id(new PhabricatorActionListView()) ->setObject($post) - ->setUser($viewer); + ->setViewer($viewer); $can_edit = PhabricatorPolicyFilter::hasCapability( $viewer, @@ -288,7 +288,7 @@ final class PhamePostViewController if (!$post->isArchived()) { $actions->addAction( id(new PhabricatorActionView()) - ->setUser($viewer) + ->setViewer($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 0642783c37..bf38ae4e71 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->setUser($viewer); + $list->setViewer($viewer); foreach ($blogs as $blog) { $id = $blog->getID(); @@ -93,7 +93,7 @@ final class PhameBlogSearchEngine $domain = pht('Local Blog'); } $item = id(new PHUIObjectItemView()) - ->setUser($viewer) + ->setViewer($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 4d399cb8bd..f5713a4877 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->setUser($viewer); + $list->setViewer($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()) - ->setUser($viewer) + ->setViewer($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 e2bb7719f7..8a2397fc64 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()) - ->setUser($viewer) + ->setViewer($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 6ad0fe22cd..b9023c3b11 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) - ->setUser($viewer) + ->setViewer($viewer) ->setPolicyObject($var) ->setHeaderIcon('fa-copy'); $display_value = json_encode($var->getVariableValue()); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer) + ->setViewer($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 44d7ea7eed..9605dbe162 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setImage($image) ->setReplacesPHID($replaces_phid); diff --git a/src/applications/pholio/controller/PholioInlineController.php b/src/applications/pholio/controller/PholioInlineController.php index 2201e97f74..79fd90e4bd 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()) - ->setUser($viewer); + ->setViewer($viewer); if ($mode == 'new') { $params = array( @@ -153,7 +153,7 @@ final class PholioInlineController extends PholioController { $form ->appendChild( id(new PhabricatorRemarkupControl()) - ->setUser($viewer) + ->setViewer($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 f33be810a1..a50fc5451c 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setMock($object); if (strlen($options)) { diff --git a/src/applications/pholio/view/PholioMockEmbedView.php b/src/applications/pholio/view/PholioMockEmbedView.php index 38b375b68b..6f2963a71a 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()) - ->setUser($this->getUser()) + ->setViewer($this->getViewer()) ->setObject($mock) ->setHeader($header) ->setURI($uri) diff --git a/src/applications/pholio/view/PholioMockImagesView.php b/src/applications/pholio/view/PholioMockImagesView.php index 319daa3169..1e399700b1 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->getUser(); + $viewer = $this->getViewer(); $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->getUser()->isLoggedIn(), + 'loggedIn' => $this->getViewer()->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 9882ccad3c..ed3ca59ea7 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->getUser()) + ->setViewer($this->getViewer()) ->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 73f26bc26d..c1339a1854 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->getUser(), + $this->getViewer(), 'm'); } @@ -28,7 +28,7 @@ final class PhortuneMonthYearExpiryControl extends AphrontFormControl { private function getCurrentYear() { return phabricator_format_local_time( time(), - $this->getUser(), + $this->getViewer(), 'Y'); } @@ -37,7 +37,7 @@ final class PhortuneMonthYearExpiryControl extends AphrontFormControl { } protected function renderInput() { - if (!$this->getUser()) { + if (!$this->getViewer()) { throw new PhutilInvalidStateException('setUser'); } diff --git a/src/applications/phortune/controller/account/PhortuneAccountChargesController.php b/src/applications/phortune/controller/account/PhortuneAccountChargesController.php index ea6105504f..90a8dd7575 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()) - ->setUser($viewer) + ->setViewer($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 e6003c8159..21e858d1e1 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()) - ->setUser($viewer); + ->setViewer($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 a946e02efb..88404ce16d 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()) - ->setUser($viewer) + ->setViewer($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 4e15210890..e3244df79b 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()) - ->setUser($viewer); + ->setViewer($viewer); $access_key = $address->getAccessKey(); diff --git a/src/applications/phortune/controller/account/PhortuneAccountListController.php b/src/applications/phortune/controller/account/PhortuneAccountListController.php index 0ac8cecd8b..1ee7356c54 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($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 538fadeac9..b2845f3a6b 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()) - ->setUser($viewer); + ->setViewer($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 3b8e8497db..2bbf24722f 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) - ->setUser($viewer) + ->setViewer($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 05a2f33d8d..41e1d5b02f 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()) - ->setUser($viewer) + ->setViewer($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 00c7e9798e..9b549d62c0 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()) - ->setUser($viewer); + ->setViewer($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 212dfcd5a7..1116ab4c3e 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($title) ->setHeaderIcon('fa-user-circle'); @@ -120,7 +120,7 @@ abstract class PhortuneAccountProfileController $orders_uri = $account->getOrderListURI(); $table = id(new PhortuneOrderTableView()) - ->setUser($viewer) + ->setViewer($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 779721c4f3..930a72238b 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()) - ->setUser($viewer) + ->setViewer($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 e38c18779b..6df90a691b 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()) - ->setUser($viewer); + ->setViewer($viewer); $next_invoice = $subscription->getTrigger()->getNextEventPrediction(); $properties->addProperty( @@ -93,7 +93,7 @@ final class PhortuneAccountSubscriptionViewController ->execute(); $invoice_table = id(new PhortuneOrderTableView()) - ->setUser($viewer) + ->setViewer($viewer) ->setCarts($invoices) ->setIsInvoices(true); @@ -125,7 +125,7 @@ final class PhortuneAccountSubscriptionViewController ->execute(); $invoice_table = id(new PhortuneOrderTableView()) - ->setUser($viewer) + ->setViewer($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 bad476ea1c..73e0b21c46 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()) - ->setUser($viewer) + ->setViewer($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 cbd434c900..49ac7386e0 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()) - ->setUser($viewer) + ->setViewer($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 9412d11045..1f39893333 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()) - ->setUser($viewer) + ->setViewer($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 0f4bb479e1..0ce603fabe 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()) - ->setUser($viewer) + ->setViewer($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 8b558ac387..06abc292d9 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()) - ->setUser($viewer) + ->setViewer($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 21224e17fc..e4c6174919 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendRemarkupInstructions(pht('Choose a user to invoice.')) ->appendControl( id(new AphrontFormTokenizerControl()) @@ -71,7 +71,7 @@ final class PhortuneMerchantInvoiceCreateController ->execute(); $form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($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 6b3ff568ff..aabbb91094 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()) - ->setUser($viewer); + ->setViewer($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 4f84d0cce7..9d60dff315 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()) - ->setUser($viewer) + ->setViewer($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 2925a7d34b..871bc99512 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()) - ->setUser($viewer) + ->setViewer($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 86268280a0..7d3028b768 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()) - ->setUser($viewer); + ->setViewer($viewer); $default_image = PhabricatorFile::loadBuiltin($viewer, 'merchant.png'); @@ -182,7 +182,7 @@ final class PhortuneMerchantPictureController ->setForm($form); $upload_form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($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 bc54756ffe..41f965d7d9 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) - ->setUser($viewer) + ->setViewer($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 bd577ecfb5..0174743cdc 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()) - ->setUser($viewer) + ->setViewer($viewer) ->addHiddenInput('class', $provider_config->getProviderClass()) ->addHiddenInput('edit', true) ->appendChild( @@ -254,7 +254,7 @@ final class PhortuneMerchantProviderEditController } $form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($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 2c1be9f8af..e9882ab6e9 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()) - ->setUser($viewer); + ->setViewer($viewer); $provider_type = $provider->buildProvider(); diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantSubscriptionsController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantSubscriptionsController.php index c2fe0d429a..6f269a7d07 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()) - ->setUser($viewer) + ->setViewer($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 d32cb70f37..7be071069c 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setBig(true) ->setFlush(true); @@ -428,7 +428,7 @@ final class PhortunePaymentMethodCreateController $viewer = $this->getViewer(); $menu = id(new PHUIObjectItemListView()) - ->setUser($viewer) + ->setViewer($viewer) ->setBig(true) ->setFlush(true); diff --git a/src/applications/phortune/controller/product/PhortuneProductListController.php b/src/applications/phortune/controller/product/PhortuneProductListController.php index ee84581ae1..6d476eaa49 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()) - ->setUser($viewer) + ->setViewer($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 a434a94534..6a90b5d4de 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()) - ->setUser($viewer) + ->setViewer($viewer) ->addProperty( pht('Price'), $product->getPriceAsCurrency()->formatForDisplay()); diff --git a/src/applications/phortune/query/PhortuneChargeSearchEngine.php b/src/applications/phortune/query/PhortuneChargeSearchEngine.php index 568d60fc1a..eb265949a4 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setCharges($charges); $result = new PhabricatorApplicationSearchResultView(); diff --git a/src/applications/phortune/query/PhortuneMerchantSearchEngine.php b/src/applications/phortune/query/PhortuneMerchantSearchEngine.php index 0688fa5344..a1b7b4a2a6 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->setUser($viewer); + $list->setViewer($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 9da6f34c72..1071d8aec9 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setSubscriptions($subscriptions); $merchant = $this->getMerchant(); diff --git a/src/applications/phortune/view/PhortuneCreditCardForm.php b/src/applications/phortune/view/PhortuneCreditCardForm.php index afd64075ea..3416aaf41d 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')) - ->setUser($this->user) + ->setViewer($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 77152b9ff7..051c6a936a 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setCharges($charges) ->setShowOrder(false); diff --git a/src/applications/phortune/view/PhortuneOrderTableView.php b/src/applications/phortune/view/PhortuneOrderTableView.php index d7868f8d49..4770616562 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->getUser(); + $viewer = $this->getViewer(); $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 8a530075ae..9a352c34da 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()) - ->setUser($viewer) + ->setViewer($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 de0b75324c..0ad29dde6b 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()) - ->setUser($viewer) + ->setViewer($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 6b9ef1e90f..9947c07e58 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()) - ->setUser($viewer); + ->setViewer($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 b061e89756..61f6c421cb 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setTitle(pht('Can Not Delete Document!')) ->appendChild($e_text) ->addCancelButton($document_uri); } else { $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + ->setViewer($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 11b0b63174..a080ca6c40 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setPolicyObject($document) ->setHeader($page_title); @@ -393,7 +393,7 @@ final class PhrictionDocumentController $viewer = $this->getViewer(); $view = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($viewer); $view->addProperty( pht('Last Author'), diff --git a/src/applications/phriction/controller/PhrictionEditController.php b/src/applications/phriction/controller/PhrictionEditController.php index c48cac6400..c381139ddc 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()) - ->setUser($viewer) + ->setViewer($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') - ->setUser($viewer)) + ->setViewer($viewer)) ->appendControl( id(new AphrontFormTokenizerControl()) ->setLabel(pht('Tags')) @@ -285,7 +285,7 @@ final class PhrictionEditController ->setLabel(pht('Subscribers')) ->setName('cc') ->setValue($v_cc) - ->setUser($viewer) + ->setViewer($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 b82681f0a7..5a5b7deb93 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()) - ->setUser($viewer) + ->setViewer($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 bcb8e317ab..c81d283d2c 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?')) - ->setUser($viewer) + ->setViewer($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 578e3ed9f8..8aab91917b 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($url->getDisplayName()) ->setStatus($icon, $color, $status) ->setPolicyObject($url) @@ -124,7 +124,7 @@ final class PhabricatorPhurlURLViewController $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()) - ->setUser($viewer); + ->setViewer($viewer); $properties->addProperty( pht('Short URL'), diff --git a/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php b/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php index e68d08565c..e2fa6c9b47 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()) - ->setUser($viewer) + ->setViewer($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 b5ec636ee9..8ec0098edb 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) - ->setUser($viewer) + ->setViewer($viewer) ->setTitle($title) ->appendChild($form) ->addSubmitButton(pht('Save Policy')) @@ -327,7 +327,7 @@ final class PhabricatorPolicyEditController )); $form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($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 496563fc4f..26dc379df3 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()) - ->setUser($viewer) + ->setViewer($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 9c48c7c669..3bbc2161c5 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendChild( id(new AphrontFormStaticControl()) ->setLabel(pht('Question')) @@ -77,7 +77,7 @@ final class PonderAnswerEditController extends PonderController { ->setOptions(PonderAnswerStatus::getAnswerStatusMap())) ->appendChild( id(new PhabricatorRemarkupControl()) - ->setUser($viewer) + ->setViewer($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 53e0f06ea6..44f584346d 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()) - ->setUser($viewer) + ->setViewer($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 ab791b740f..03a79b2752 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendChild($radio); return $this->newDialog() diff --git a/src/applications/ponder/controller/PonderQuestionViewController.php b/src/applications/ponder/controller/PonderQuestionViewController.php index 63fe4e3539..e7a14d1977 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) - ->setUser($viewer) + ->setViewer($viewer) ->setActionURI('/ponder/answer/add/'); $header = new PHUIHeaderView(); $header->setHeader($question->getTitle()); - $header->setUser($viewer); + $header->setViewer($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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($viewer) ->setAnswer($answer) ->setTransactions($xactions) ->setTimeline($timeline) diff --git a/src/applications/ponder/query/PonderQuestionSearchEngine.php b/src/applications/ponder/query/PonderQuestionSearchEngine.php index 0896c82bf8..ecf0795d73 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()) - ->setUser($viewer); + ->setViewer($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 a16e7bfbd4..41e12377c3 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->getUser(); + $viewer = $this->getViewer(); $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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($viewer) ->setObject($answer) ->setShowPreview(false) ->setHeaderText(pht('Answer Comment')) @@ -145,7 +145,7 @@ final class PonderAnswerView extends AphrontTagView { } private function buildAnswerActions() { - $viewer = $this->getUser(); + $viewer = $this->getViewer(); $answer = $this->answer; $id = $answer->getID(); @@ -155,7 +155,7 @@ final class PonderAnswerView extends AphrontTagView { PhabricatorPolicyCapability::CAN_EDIT); $view = id(new PhabricatorActionListView()) - ->setUser($viewer) + ->setViewer($viewer) ->setObject($answer); $view->addAction( diff --git a/src/applications/project/controller/PhabricatorProjectArchiveController.php b/src/applications/project/controller/PhabricatorProjectArchiveController.php index b97d5391ab..83bd955020 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()) - ->setUser($viewer) + ->setViewer($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 7859091de6..96b17ab1f1 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()) - ->setUser($viewer); + ->setViewer($viewer); $group_info = array( 'basic' => array( diff --git a/src/applications/project/controller/PhabricatorProjectBoardFilterController.php b/src/applications/project/controller/PhabricatorProjectBoardFilterController.php index ee69cf3ae1..d318a02e0b 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()) - ->setUser($viewer); + ->setViewer($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 67bddaaa52..f669c8a1a8 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') - ->setUser($viewer) + ->setViewer($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 59953abb87..0b91ef1e78 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())) - ->setUser($viewer); + ->setViewer($viewer); return $header; } diff --git a/src/applications/project/controller/PhabricatorProjectBoardReorderController.php b/src/applications/project/controller/PhabricatorProjectBoardReorderController.php index 8cf75ab2a4..8dd9ba68e4 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()) - ->setUser($viewer) + ->setViewer($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 dd49df3955..d5353ecdde 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()) - ->setUser($viewer) + ->setViewer($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 60a69bd28e..c623f80a08 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())) - ->setUser($viewer); + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($viewer) ->setObject($column); $limit = $column->getPointLimit(); diff --git a/src/applications/project/controller/PhabricatorProjectColumnEditController.php b/src/applications/project/controller/PhabricatorProjectColumnEditController.php index d11c575827..6ce0891929 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()) - ->setUser($request->getUser()); + ->setViewer($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 572e71f51a..f0985fda01 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendControl( id(new AphrontFormTokenizerControl()) ->setName('memberPHIDs') diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php index 5667089997..ed7a18df40 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setProjects($subprojects) ->renderList(); diff --git a/src/applications/project/view/PhabricatorProjectCardView.php b/src/applications/project/view/PhabricatorProjectCardView.php index 01a32c1208..4bb891e362 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)) - ->setUser($viewer) + ->setViewer($viewer) ->setPolicyObject($project) ->setImage($project->getProfileImageURI()); diff --git a/src/applications/project/view/PhabricatorProjectListView.php b/src/applications/project/view/PhabricatorProjectListView.php index aeef3b3aa9..bc33739966 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->getUser(); + $viewer = $this->getViewer(); $viewer_phid = $viewer->getPHID(); $projects = $this->getProjects(); diff --git a/src/applications/search/controller/PhabricatorSearchDeleteController.php b/src/applications/search/controller/PhabricatorSearchDeleteController.php index fe3836017f..5f57e36319 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()) - ->setUser($viewer) + ->setViewer($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 a526091503..31d6fac85d 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()) - ->setUser($viewer); + ->setViewer($viewer); $form->appendChild( id(new AphrontFormTextControl()) diff --git a/src/applications/search/controller/PhabricatorSearchHovercardController.php b/src/applications/search/controller/PhabricatorSearchHovercardController.php index 1a07d426ea..9e35124c90 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setObjectHandle($handle); if ($context_object) { diff --git a/src/applications/search/engine/PhabricatorProfileMenuEngine.php b/src/applications/search/engine/PhabricatorProfileMenuEngine.php index dbd95f2fe8..99d90c5975 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()) - ->setUser($viewer); + ->setViewer($viewer); $modes = array_fuse($modes); diff --git a/src/applications/settings/panel/PhabricatorActivitySettingsPanel.php b/src/applications/settings/panel/PhabricatorActivitySettingsPanel.php index a3654a4388..3f83a96b5d 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()) - ->setUser($viewer) + ->setViewer($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 a23c3fe670..5abcf4fec0 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($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 abe85b64c5..0e8997dea8 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()) - ->setUser($viewer); + ->setViewer($viewer); $form->appendRemarkupInstructions( pht( diff --git a/src/applications/settings/panel/PhabricatorExternalAccountsSettingsPanel.php b/src/applications/settings/panel/PhabricatorExternalAccountsSettingsPanel.php index 1c05adef1c..d785fc75c2 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer) + ->setViewer($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 b9d4beef4d..b6d8adad8a 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendChild( id(new AphrontFormTextControl()) ->setName('name') @@ -396,7 +396,7 @@ final class PhabricatorMultiFactorSettingsPanel ->setError($e_name)); $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + ->setViewer($viewer) ->addHiddenInput('edit', $factor->getID()) ->setTitle(pht('Edit Authentication Factor')) ->setErrors($errors) @@ -441,7 +441,7 @@ final class PhabricatorMultiFactorSettingsPanel } $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + ->setViewer($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 04d5d7ae84..683dfaceee 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendChild( id(new AphrontFormSelectControl()) ->setLabel($title) diff --git a/src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php b/src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php index 131f602974..a12b8bb3cc 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()) - ->setUser($viewer) + ->setViewer($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 c73b9bdc15..580e6c2ce3 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()) - ->setUser($viewer); + ->setViewer($viewer); $phids = mpull($polls, 'getAuthorPHID'); @@ -135,7 +135,7 @@ final class PhabricatorSlowvoteSearchEngine } $item = id(new PHUIObjectItemView()) - ->setUser($viewer) + ->setViewer($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 c93757315b..1c552f0362 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setPoll($object); return $embed; diff --git a/src/applications/slowvote/view/SlowvoteEmbedView.php b/src/applications/slowvote/view/SlowvoteEmbedView.php index 323801de47..d5e4b33279 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->getUser()) + ->setViewer($this->getViewer()) ->withPHIDs($phids) ->execute(); @@ -40,7 +40,7 @@ final class SlowvoteEmbedView extends AphrontView { require_celerity_resource('phabricator-slowvote-css'); - $user_choices = $poll->getViewerChoices($this->getUser()); + $user_choices = $poll->getViewerChoices($this->getViewer()); $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->getUser(), $description); + $description = new PHUIRemarkupView($this->getViewer(), $description); $description = phutil_tag( 'div', array( @@ -119,7 +119,7 @@ final class SlowvoteEmbedView extends AphrontView { } $body = phabricator_form( - $this->getUser(), + $this->getViewer(), 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->getUser()->getPHID(); + $viewer_phid = $this->getViewer()->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 0bb5949b76..f10c6d47e2 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->getUser(); + $viewer = $this->getViewer(); if (!PhabricatorSpacesNamespaceQuery::getViewerSpacesExist($viewer)) { return null; } diff --git a/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php b/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php index 747e4e98f8..6d58820c38 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setTitle($title) ->appendChild($message) ->addCancelButton($uri); diff --git a/src/applications/subscriptions/view/SubscriptionListDialogBuilder.php b/src/applications/subscriptions/view/SubscriptionListDialogBuilder.php index d2867d748d..e5cd1a4f2c 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()) - ->setUser($this->getViewer()) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($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 efbe67882a..7137e85df5 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()) - ->setUser($this->getRequest()->getUser()) + ->setViewer($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 631b6fd8f7..4dea6bc37c 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()) - ->setUser($this->getRequest()->getUser()) + ->setViewer($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 ef8dc75991..2e35c42ecd 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->setUser($viewer); + $dialog->setViewer($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 84fcecfa6f..3235cc8f83 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setFullWidth(true) ->appendControl( id(new PhabricatorRemarkupControl()) diff --git a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentHistoryController.php b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentHistoryController.php index f292c0d9d4..0c63501f3b 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setObjectPHID($obj_phid) ->setTransactions($xactions) ->setShowEditActions(false) ->setHideCommentOptions(true); $dialog = id(new AphrontDialogView()) - ->setUser($viewer) + ->setViewer($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 c341079e9e..6a24f0847a 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()) - ->setUser($viewer) + ->setViewer($viewer) ->addCancelButton($obj_handle->getURI()) ->setTitle($title); diff --git a/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRemoveController.php b/src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRemoveController.php index 4d6570b13d..f6a64b7f30 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()) - ->setUser($viewer); + ->setViewer($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 3d63a4a098..cd317ea8f8 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()) - ->setUser($viewer); + ->setViewer($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 1375124585..fc02d54a30 100644 --- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php +++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php @@ -62,7 +62,7 @@ EOTEXT ); $form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($viewer) ->appendRemarkupInstructions($help); $locks = $config->getFieldLocks(); diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationReorderController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationReorderController.php index 563c3141b2..d74feb8b93 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setID($list_id) ->setFlush(true); diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSortController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSortController.php index 5e8680b651..8f1278c09e 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setID($list_id) ->setFlush(true); diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSubtypeController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationSubtypeController.php index 918782cd81..c9b7776dc7 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()) - ->setUser($viewer) + ->setViewer($viewer) ->appendRemarkupInstructions($help) ->appendControl( id(new AphrontFormSelectControl()) diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php index 80939dd1c8..1f380d2cf9 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()) - ->setUser($viewer) + ->setViewer($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()) - ->setUser($viewer); + ->setViewer($viewer); return $properties; } @@ -237,7 +237,7 @@ final class PhabricatorEditEngineConfigurationViewController $fields = $engine->getFieldsForConfig($config); $form = id(new AphrontFormView()) - ->setUser($viewer) + ->setViewer($viewer) ->setAction(null); foreach ($fields as $field) { diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php index 598f0e1024..1a304e7146 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()) - ->setUser($viewer); + ->setViewer($viewer); foreach ($specs as $spec) { $dropdown->addAction( @@ -1810,11 +1810,11 @@ abstract class PhabricatorEditEngine ->setHeader($header_text); $help_view = id(new PhabricatorApplicationEditHTTPParameterHelpView()) - ->setUser($viewer) + ->setViewer($viewer) ->setFields($fields); $document = id(new PHUIDocumentView()) - ->setUser($viewer) + ->setViewer($viewer) ->setHeader($header) ->appendChild($help_view); diff --git a/src/applications/transactions/query/PhabricatorEditEngineConfigurationSearchEngine.php b/src/applications/transactions/query/PhabricatorEditEngineConfigurationSearchEngine.php index ee3a5da3e6..d966e5c371 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()) - ->setUser($viewer); + ->setViewer($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 dcb512fa7a..2c48d37cd2 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()) - ->setUser($viewer); + ->setViewer($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 c4f6defc21..f69238db2b 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()) - ->setUser($request->getUser()) + ->setViewer($request->getUser()) ->setTitle($title); $dialog->appendChild($head); diff --git a/src/applications/transactions/response/PhabricatorApplicationTransactionValidationResponse.php b/src/applications/transactions/response/PhabricatorApplicationTransactionValidationResponse.php index ec4b77c364..58836896d2 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()) - ->setUser($request->getUser()) + ->setViewer($request->getUser()) ->setTitle($title); $list = array(); diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php index 71e7e29af0..1c209b5c15 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setOldText($old) ->setNewText($new); } diff --git a/src/applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php b/src/applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php index a0ce2ffafd..80e66d066c 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->getUser(); + $viewer = $this->getViewer(); $view = new PHUIRemarkupView($viewer, $corpus); $view->setRemarkupOptions( diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php index 53c09507aa..432d517ac7 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->getUser(); + $user = $this->getViewer(); $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 d591f9e38c..74d6d3b089 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->getUser(); + $user = $this->getViewer(); $xactions = $this->transactions; diff --git a/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php b/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php index e113a6e106..9fe33c677d 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()) - ->setUser($viewer) + ->setViewer($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 2e68976ae0..808534e504 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') - ->setUser($user)); + ->setViewer($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) - ->setUser($user) + ->setViewer($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') - ->setUser($user)); + ->setViewer($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 55b761f4e2..c3d3fbfd29 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()) - ->setUser($user) + ->setViewer($user) ->setFullWidth(true) ->appendChild( id(new AphrontFormTextControl()) @@ -130,7 +130,7 @@ final class PhabricatorMultiColumnUIExample extends PhabricatorUIExample { ->setSigil('postal-input')); $cc = id(new PHUIFormLayoutView()) - ->setUser($user) + ->setViewer($user) ->setFullWidth(true) ->appendChild( id(new AphrontFormTextControl()) @@ -147,7 +147,7 @@ final class PhabricatorMultiColumnUIExample extends PhabricatorUIExample { ->appendChild( id(new PhortuneMonthYearExpiryControl()) ->setLabel(pht('Expiration')) - ->setUser($user) + ->setViewer($user) ->setError('')); $shipping_title = pht('Shipping Address'); diff --git a/src/infrastructure/cluster/exception/PhabricatorClusterExceptionHandler.php b/src/infrastructure/cluster/exception/PhabricatorClusterExceptionHandler.php index ed0e0cc605..c895064d09 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) - ->setUser($viewer) + ->setViewer($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 95c3c1a3e2..23e876a99a 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()) - ->setUser($this->getViewer()) + ->setViewer($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 3b7d05897f..7b53c3e5eb 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()) - ->setUser($viewer); + ->setViewer($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 6f1d3b66c0..07f5e44f05 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()) - ->setUser($viewer) + ->setViewer($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 ed98bf3bf1..e98df0b2cf 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->getUser()->getPHID(); + $viewer_phid = $this->getViewer()->getPHID(); $owner_phid = $this->getObjectOwnerPHID(); if ($viewer_phid) { @@ -497,7 +497,7 @@ final class PHUIDiffInlineCommentDetailView return false; } - $viewer = $this->getUser(); + $viewer = $this->getViewer(); if (!$viewer->isLoggedIn()) { return false; } diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentPreviewListView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentPreviewListView.php index 05cad40539..b41afef9b1 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()) - ->setUser($viewer) + ->setViewer($viewer) ->setInlineComment($inline) ->setMarkupEngine($engine) ->setHandles($handles) diff --git a/src/view/control/PhabricatorObjectSelectorDialog.php b/src/view/control/PhabricatorObjectSelectorDialog.php index 0e003e7571..899d2472d0 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 - ->setUser($this->user) + ->setViewer($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 b7b4c2de1c..a3ba329048 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->getUser(); + $viewer = $this->getViewer(); $out = array(); diff --git a/src/view/form/control/AphrontFormPolicyControl.php b/src/view/form/control/AphrontFormPolicyControl.php index b07c80834a..e24fde3637 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->getUser(); + $viewer = $this->getViewer(); // 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->getUser(); + $viewer = $this->getViewer(); if (!PhabricatorSpacesNamespaceQuery::getViewerSpacesExist($viewer)) { return null; } diff --git a/src/view/form/control/AphrontFormTokenizerControl.php b/src/view/form/control/AphrontFormTokenizerControl.php index 7af8fcae32..c28e9219a0 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->getUser()); + $datasource->setViewer($this->getViewer()); $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->getUser(); + $viewer = $this->getViewer(); if (!$viewer) { throw new Exception( pht( diff --git a/src/view/form/control/PhabricatorRemarkupControl.php b/src/view/form/control/PhabricatorRemarkupControl.php index 158cf3ff77..4b6fbeee32 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->getUser(); + $viewer = $this->getViewer(); if (!$viewer) { throw new PhutilInvalidStateException('setUser'); } diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php index de21ba6fdf..483cae1b6a 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->getUser(); + $viewer = $this->getViewer(); 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 8db2f75ef9..ef34284e8c 100644 --- a/src/view/phui/PHUIHeaderView.php +++ b/src/view/phui/PHUIHeaderView.php @@ -262,7 +262,7 @@ final class PHUIHeaderView extends AphrontTagView { } } - $viewer = $this->getUser(); + $viewer = $this->getViewer(); $left = array(); $right = array(); @@ -440,7 +440,7 @@ final class PHUIHeaderView extends AphrontTagView { } private function renderPolicyProperty(PhabricatorPolicyInterface $object) { - $viewer = $this->getUser(); + $viewer = $this->getViewer(); $policies = PhabricatorPolicyQuery::loadPolicies($viewer, $object); diff --git a/src/view/phui/PHUIHovercardView.php b/src/view/phui/PHUIHovercardView.php index 6b85364ceb..efbb5e6292 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->getUser(); + $viewer = $this->getViewer(); $handle = $this->handle; require_celerity_resource('phui-hovercard-view-css'); @@ -107,7 +107,7 @@ final class PHUIHovercardView extends AphrontTagView { $title = array( id(new PHUISpacesNamespaceContextView()) - ->setUser($viewer) + ->setViewer($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 4be130f62a..205b4a4e54 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->getUser(); + $viewer = $this->getViewer(); 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 b09e517bd4..26173ef671 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->getUser()); + $date = phabricator_dual_datetime($epoch, $this->getViewer()); $this->addIcon('none', $date); return $this; } @@ -403,7 +403,7 @@ final class PHUIObjectItemView extends AphrontTagView { } protected function getTagContent() { - $viewer = $this->getUser(); + $viewer = $this->getViewer(); $content_classes = array(); $content_classes[] = 'phui-oi-content'; diff --git a/src/view/phui/PHUIPinboardItemView.php b/src/view/phui/PHUIPinboardItemView.php index 7e02190884..de9cbf6b7f 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->getUser()) + ->setViewer($this->getViewer()) ->setObject($this->object), phutil_tag( 'a', diff --git a/src/view/phui/PHUIPropertyListView.php b/src/view/phui/PHUIPropertyListView.php index 9c444297c2..6c84d56824 100644 --- a/src/view/phui/PHUIPropertyListView.php +++ b/src/view/phui/PHUIPropertyListView.php @@ -96,14 +96,15 @@ final class PHUIPropertyListView extends AphrontView { } public function invokeWillRenderEvent() { - if ($this->object && $this->getUser() && !$this->invokedWillRenderEvent) { + if ($this->object && $this->getViewer() && + !$this->invokedWillRenderEvent) { $event = new PhabricatorEvent( PhabricatorEventType::TYPE_UI_WILLRENDERPROPERTIES, array( 'object' => $this->object, 'view' => $this, )); - $event->setUser($this->getUser()); + $event->setUser($this->getViewer()); PhutilEventEngine::dispatchEvent($event); } $this->invokedWillRenderEvent = true; diff --git a/src/view/phui/PHUITimelineEventView.php b/src/view/phui/PHUITimelineEventView.php index bd96293e22..efe182a422 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->getUser()); + ->setViewer($this->getViewer()); 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->getUser()); + ->setViewer($this->getViewer()); $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->getUser()); + $this->getViewer()); 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 cfd59b69cd..18f390784e 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->getUser(); + $viewer = $this->getViewer(); $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 1f299d2f46..0ffa5fd51d 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->getUser(); + $viewer = $this->getViewer(); $hours = $this->getHoursOfDay(); $js_hours = array(); diff --git a/src/view/phui/calendar/PHUICalendarListView.php b/src/view/phui/calendar/PHUICalendarListView.php index 89fadee6d4..024287b063 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->getUser()); + $this->getViewer()); } $icon_icon = $event->getIcon(); diff --git a/src/view/phui/calendar/PHUICalendarMonthView.php b/src/view/phui/calendar/PHUICalendarMonthView.php index 0bc2a75c1c..03d2e61670 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->getUser(); + $viewer = $this->getViewer(); $today = new DateTime('@'.time()); $today->setTimezone($viewer->getTimeZone()); $today->setTime(0, 0, 0);