Skip to content

Commit 10b86c2

Browse files
author
epriestley
committed
Don't show meme Remarkup hint button if Macro application is not usable
Summary: See <https://phabricator.wikimedia.org/T906>. This behavior is a bug; we should remove the button if the user can't use the application. Test Plan: - With Macro uninstalled, did these things verifying the button vanished: - Sent a user a message. - Edited a revision. - Edited repository basic information. - Edited an initiative. - Edited a Harbormaster build step. - Added task comments. - Edited profile blurb. - Edited blog description. - Commented on Pholio mock. - Uploaded Pholio image. - Edited Phortune merchant. - Edited Phriction document. - Edited Ponder answer. - Edited Ponder question. - Edited Slowvote poll. - Edited a comment. - Reinstalled Macro and saw button come back. - Used button to put silly text on a funny picture. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D10900
1 parent e5777cc commit 10b86c2

File tree

20 files changed

+67
-33
lines changed

20 files changed

+67
-33
lines changed

src/applications/conpherence/controller/ConpherenceNewController.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ public function processRequest() {
8787
->setError($e_participants))
8888
->appendChild(
8989
id(new PhabricatorRemarkupControl())
90-
->setName('message')
91-
->setValue($message)
92-
->setLabel(pht('Message'))
93-
->setError($e_message));
90+
->setUser($user)
91+
->setName('message')
92+
->setValue($message)
93+
->setLabel(pht('Message'))
94+
->setError($e_message));
9495

9596
$dialog->appendChild($form);
9697

src/applications/differential/customfield/DifferentialRevertPlanField.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public function readValueFromRequest(AphrontRequest $request) {
8585

8686
public function renderEditControl(array $handles) {
8787
return id(new PhabricatorRemarkupControl())
88+
->setUser($this->getViewer())
8889
->setName($this->getFieldKey())
8990
->setValue($this->getValue())
9091
->setLabel($this->getFieldName());

src/applications/differential/customfield/DifferentialSummaryField.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function readValueFromRequest(AphrontRequest $request) {
3939

4040
public function renderEditControl(array $handles) {
4141
return id(new PhabricatorRemarkupControl())
42+
->setUser($this->getViewer())
4243
->setName($this->getFieldKey())
4344
->setValue($this->getValue())
4445
->setError($this->getFieldError())

src/applications/differential/customfield/DifferentialTestPlanField.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public function readValueFromRequest(AphrontRequest $request) {
5353

5454
public function renderEditControl(array $handles) {
5555
return id(new PhabricatorRemarkupControl())
56+
->setUser($this->getViewer())
5657
->setName($this->getFieldKey())
5758
->setValue($this->getValue())
5859
->setError($this->getFieldError())

src/applications/diffusion/controller/DiffusionRepositoryEditBasicController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public function processRequest() {
120120
$form
121121
->appendChild(
122122
id(new PhabricatorRemarkupControl())
123+
->setUser($user)
123124
->setName('description')
124125
->setLabel(pht('Description'))
125126
->setValue($v_desc))

src/applications/fund/controller/FundInitiativeEditController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,13 @@ public function processRequest() {
200200
->setOptions($merchant_options))
201201
->appendChild(
202202
id(new PhabricatorRemarkupControl())
203+
->setUser($viewer)
203204
->setName('description')
204205
->setLabel(pht('Description'))
205206
->setValue($v_desc))
206207
->appendChild(
207208
id(new PhabricatorRemarkupControl())
209+
->setUser($viewer)
208210
->setName('risks')
209211
->setLabel(pht('Risks/Challenges'))
210212
->setValue($v_risk))

src/applications/harbormaster/controller/HarbormasterStepEditController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ public function processRequest() {
155155
$form
156156
->appendChild(
157157
id(new PhabricatorRemarkupControl())
158+
->setUser($viewer)
158159
->setName('description')
159160
->setLabel(pht('Description'))
160161
->setError($e_description)

src/applications/legalpad/controller/LegalpadDocumentEditController.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,22 @@ public function processRequest() {
143143
$form
144144
->appendChild(
145145
id(new PhabricatorRemarkupControl())
146-
->setID('preamble')
147-
->setLabel(pht('Preamble'))
148-
->setValue($v_preamble)
149-
->setName('preamble')
150-
->setCaption(
151-
pht('Optional help text for users signing this document.')))
146+
->setUser($user)
147+
->setID('preamble')
148+
->setLabel(pht('Preamble'))
149+
->setValue($v_preamble)
150+
->setName('preamble')
151+
->setCaption(
152+
pht('Optional help text for users signing this document.')))
152153
->appendChild(
153154
id(new PhabricatorRemarkupControl())
154-
->setID('document-text')
155-
->setLabel(pht('Document Body'))
156-
->setError($e_text)
157-
->setValue($text)
158-
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL)
159-
->setName('text'));
155+
->setUser($user)
156+
->setID('document-text')
157+
->setLabel(pht('Document Body'))
158+
->setError($e_text)
159+
->setValue($text)
160+
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL)
161+
->setName('text'));
160162

161163
$policies = id(new PhabricatorPolicyQuery())
162164
->setViewer($user)

src/applications/maniphest/controller/ManiphestTaskDetailController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ public function processRequest() {
254254
->setControlStyle('display: none'))
255255
->appendChild(
256256
id(new PhabricatorRemarkupControl())
257+
->setUser($user)
257258
->setLabel(pht('Comments'))
258259
->setName('comments')
259260
->setValue($draft_text)

src/applications/people/customfield/PhabricatorUserBlurbField.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public function readValueFromRequest(AphrontRequest $request) {
5252

5353
public function renderEditControl(array $handles) {
5454
return id(new PhabricatorRemarkupControl())
55+
->setUser($this->getViewer())
5556
->setName($this->getFieldKey())
5657
->setValue($this->value)
5758
->setLabel($this->getFieldName());

0 commit comments

Comments
 (0)