From 983c6f9d4bcb4414b07327620a09a593f09b625a Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 1 Apr 2015 12:41:23 -0700 Subject: [PATCH] Fix a tokenizer issue in a rare edge case Summary: Ref T7689. We may not propgate the viewer down to the controls in some rendering pathways. An example is "Create Task..." on workboard columns. Instead, move the propagation a little deeper. Test Plan: "Create Task..." on a workboard column. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T7689 Differential Revision: https://secure.phabricator.com/D12250 --- src/view/form/AphrontFormView.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/view/form/AphrontFormView.php b/src/view/form/AphrontFormView.php index ada943d532..1ef1a59ae2 100644 --- a/src/view/form/AphrontFormView.php +++ b/src/view/form/AphrontFormView.php @@ -92,6 +92,10 @@ final class AphrontFormView extends AphrontView { } public function buildLayoutView() { + foreach ($this->controls as $control) { + $control->setUser($this->getUser()); + } + return id(new PHUIFormLayoutView()) ->setFullWidth($this->getFullWidth()) ->appendChild($this->renderDataInputs()) @@ -118,10 +122,6 @@ final class AphrontFormView extends AphrontView { public function render() { require_celerity_resource('phui-form-view-css'); - foreach ($this->controls as $control) { - $control->setUser($this->getUser()); - } - $layout = $this->buildLayoutView(); if (!$this->user) {