@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.

Improve some UI/language for Phame posts when viewer doesn't have CAN_INTERACT

Summary: Ref T13661. Fix up some UI and language so it's more clear that this is about disabling blog comments.

Test Plan: Viewed UIs, saw some more usable strings.

Maniphest Tasks: T13661

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

+40
+3
src/__phutil_library_map__.php
··· 5288 5288 'PhamePostEditConduitAPIMethod' => 'applications/phame/conduit/PhamePostEditConduitAPIMethod.php', 5289 5289 'PhamePostEditController' => 'applications/phame/controller/post/PhamePostEditController.php', 5290 5290 'PhamePostEditEngine' => 'applications/phame/editor/PhamePostEditEngine.php', 5291 + 'PhamePostEditEngineLock' => 'applications/phame/editor/PhamePostEditEngineLock.php', 5291 5292 'PhamePostEditor' => 'applications/phame/editor/PhamePostEditor.php', 5292 5293 'PhamePostFerretEngine' => 'applications/phame/search/PhamePostFerretEngine.php', 5293 5294 'PhamePostFulltextEngine' => 'applications/phame/search/PhamePostFulltextEngine.php', ··· 12182 12183 'PhabricatorDestructibleInterface', 12183 12184 'PhabricatorTokenReceiverInterface', 12184 12185 'PhabricatorConduitResultInterface', 12186 + 'PhabricatorEditEngineLockableInterface', 12185 12187 'PhabricatorFulltextInterface', 12186 12188 'PhabricatorFerretInterface', 12187 12189 ), ··· 12192 12194 'PhamePostEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod', 12193 12195 'PhamePostEditController' => 'PhamePostController', 12194 12196 'PhamePostEditEngine' => 'PhabricatorEditEngine', 12197 + 'PhamePostEditEngineLock' => 'PhabricatorEditEngineLock', 12195 12198 'PhamePostEditor' => 'PhabricatorApplicationTransactionEditor', 12196 12199 'PhamePostFerretEngine' => 'PhabricatorFerretEngine', 12197 12200 'PhamePostFulltextEngine' => 'PhabricatorFulltextEngine',
+29
src/applications/phame/editor/PhamePostEditEngineLock.php
··· 1 + <?php 2 + 3 + final class PhamePostEditEngineLock 4 + extends PhabricatorEditEngineLock { 5 + 6 + public function willPromptUserForLockOverrideWithDialog( 7 + AphrontDialogView $dialog) { 8 + 9 + return $dialog 10 + ->setTitle(pht('Edit Locked Post')) 11 + ->appendParagraph( 12 + pht('Comments are disabled for this post. Edit it anyway?')) 13 + ->addSubmitButton(pht('Edit Post')); 14 + } 15 + 16 + public function willBlockUserInteractionWithDialog( 17 + AphrontDialogView $dialog) { 18 + 19 + return $dialog 20 + ->setTitle(pht('Post Locked')) 21 + ->appendParagraph( 22 + pht('You can not interact with this post because it is locked.')); 23 + } 24 + 25 + public function getLockedObjectDisplayText() { 26 + return pht('Comments have been disabled for this post.'); 27 + } 28 + 29 + }
+8
src/applications/phame/storage/PhamePost.php
··· 11 11 PhabricatorDestructibleInterface, 12 12 PhabricatorTokenReceiverInterface, 13 13 PhabricatorConduitResultInterface, 14 + PhabricatorEditEngineLockableInterface, 14 15 PhabricatorFulltextInterface, 15 16 PhabricatorFerretInterface { 16 17 ··· 391 392 392 393 public function newFerretEngine() { 393 394 return new PhamePostFerretEngine(); 395 + } 396 + 397 + 398 + /* -( PhabricatorEditEngineLockableInterface )----------------------------- */ 399 + 400 + public function newEditEngineLock() { 401 + return new PhamePostEditEngineLock(); 394 402 } 395 403 396 404 }