@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix issue where phame "View Live" functionality works by using POST not GET

Summary: Currently you can't refresh the live blog or a blog post after clicking "View Live" due to POST action. I have removed the setRenderAsForm call on the "View Live" actions. I am unsure if this has any unintended consequences but I have tested and not found any.

Test Plan: Click the "View Live" action within a blog post or blog, and observe that the request occurs via GET not POST

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6314

authored by

Cam Spiers and committed by
epriestley
4770437b 5db26c1b

+5 -2
+3 -1
src/applications/phame/controller/blog/PhameBlogViewController.php
··· 156 156 $blog, 157 157 PhabricatorPolicyCapability::CAN_JOIN); 158 158 159 + $must_use_form = $blog->getDomain(); 160 + 159 161 $actions->addAction( 160 162 id(new PhabricatorActionView()) 161 163 ->setIcon('new') ··· 169 171 ->setUser($user) 170 172 ->setIcon('world') 171 173 ->setHref($this->getApplicationURI('live/'.$blog->getID().'/')) 172 - ->setRenderAsForm(true) 174 + ->setRenderAsForm($must_use_form) 173 175 ->setName(pht('View Live'))); 174 176 175 177 $actions->addAction(
+2 -1
src/applications/phame/controller/post/PhamePostViewController.php
··· 137 137 138 138 $blog = $post->getBlog(); 139 139 $can_view_live = $blog && !$post->isDraft(); 140 + $must_use_form = $blog && $blog->getDomain(); 140 141 141 142 if ($can_view_live) { 142 143 $live_uri = 'live/'.$blog->getID().'/post/'.$post->getPhameTitle(); ··· 151 152 ->setIcon('world') 152 153 ->setHref($live_uri) 153 154 ->setName(pht('View Live')) 154 - ->setRenderAsForm(true) 155 + ->setRenderAsForm($must_use_form) 155 156 ->setDisabled(!$can_view_live) 156 157 ->setWorkflow(!$can_view_live)); 157 158