Differential D14642 Diff 35424 src/applications/phame/controller/post/PhamePostUnpublishController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/controller/post/PhamePostUnpublishController.php
Show All 31 Lines | if ($request->isFormPost()) { | ||||
->applyTransactions($post, $xactions); | ->applyTransactions($post, $xactions); | ||||
return id(new AphrontRedirectResponse()) | return id(new AphrontRedirectResponse()) | ||||
->setURI($this->getApplicationURI('/post/view/'.$post->getID().'/')); | ->setURI($this->getApplicationURI('/post/view/'.$post->getID().'/')); | ||||
} | } | ||||
$cancel_uri = $this->getApplicationURI('/post/view/'.$post->getID().'/'); | $cancel_uri = $this->getApplicationURI('/post/view/'.$post->getID().'/'); | ||||
$dialog = id(new AphrontDialogView()) | $dialog = $this->newDialog() | ||||
->setUser($viewer) | |||||
->setTitle(pht('Unpublish Post?')) | ->setTitle(pht('Unpublish Post?')) | ||||
->appendChild( | ->appendChild( | ||||
pht( | pht( | ||||
'The post "%s" will no longer be visible to other users until you '. | 'The post "%s" will no longer be visible to other users until you '. | ||||
'republish it.', | 'republish it.', | ||||
$post->getTitle())) | $post->getTitle())) | ||||
->addSubmitButton(pht('Unpublish')) | ->addSubmitButton(pht('Unpublish')) | ||||
->addCancelButton($cancel_uri); | ->addCancelButton($cancel_uri); | ||||
return id(new AphrontDialogResponse())->setDialog($dialog); | return id(new AphrontDialogResponse())->setDialog($dialog); | ||||
} | } | ||||
} | } |