diff --git a/resources/celerity/map.php b/resources/celerity/map.php index cea1316f26..e9bfc70d35 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -356,7 +356,7 @@ return array( 'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de', 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '0a5192c4', 'rsrc/js/application/conpherence/behavior-durable-column.js' => '7ffa744f', - 'rsrc/js/application/conpherence/behavior-menu.js' => 'eaf57226', + 'rsrc/js/application/conpherence/behavior-menu.js' => 'e5826953', 'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861', 'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3', 'rsrc/js/application/conpherence/behavior-widget-pane.js' => '31b18ee7', @@ -559,7 +559,7 @@ return array( 'javelin-behavior-boards-dropdown' => '0ec56e1d', 'javelin-behavior-choose-control' => '6153c708', 'javelin-behavior-config-reorder-fields' => '14a827de', - 'javelin-behavior-conpherence-menu' => 'eaf57226', + 'javelin-behavior-conpherence-menu' => 'e5826953', 'javelin-behavior-conpherence-pontificate' => '21ba5861', 'javelin-behavior-conpherence-widget-pane' => '31b18ee7', 'javelin-behavior-countdown-timer' => 'e4cc26b3', @@ -1874,6 +1874,20 @@ return array( 'javelin-workflow', 'javelin-magical-init', ), + 'e5826953' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-util', + 'javelin-stratcom', + 'javelin-workflow', + 'javelin-behavior-device', + 'javelin-history', + 'javelin-vector', + 'javelin-scrollbar', + 'phabricator-title', + 'phabricator-shaped-request', + 'conpherence-thread-manager', + ), 'e58bf807' => array( 'javelin-behavior', 'javelin-util', @@ -1909,20 +1923,6 @@ return array( 'phabricator-phtize', 'javelin-dom', ), - 'eaf57226' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-util', - 'javelin-stratcom', - 'javelin-workflow', - 'javelin-behavior-device', - 'javelin-history', - 'javelin-vector', - 'javelin-scrollbar', - 'phabricator-title', - 'phabricator-shaped-request', - 'conpherence-thread-manager', - ), 'efe49472' => array( 'javelin-install', 'javelin-util', diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 9cca711845..378b96fcdd 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -258,6 +258,7 @@ phutil_register_library_map(array( 'ConpherenceThreadListView' => 'applications/conpherence/view/ConpherenceThreadListView.php', 'ConpherenceThreadMailReceiver' => 'applications/conpherence/mail/ConpherenceThreadMailReceiver.php', 'ConpherenceThreadQuery' => 'applications/conpherence/query/ConpherenceThreadQuery.php', + 'ConpherenceThreadRemarkupRule' => 'applications/conpherence/remarkup/ConpherenceThreadRemarkupRule.php', 'ConpherenceThreadSearchEngine' => 'applications/conpherence/query/ConpherenceThreadSearchEngine.php', 'ConpherenceThreadTestCase' => 'applications/conpherence/__tests__/ConpherenceThreadTestCase.php', 'ConpherenceTransaction' => 'applications/conpherence/storage/ConpherenceTransaction.php', @@ -3451,6 +3452,7 @@ phutil_register_library_map(array( 'ConpherenceThreadListView' => 'AphrontView', 'ConpherenceThreadMailReceiver' => 'PhabricatorObjectMailReceiver', 'ConpherenceThreadQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', + 'ConpherenceThreadRemarkupRule' => 'PhabricatorObjectRemarkupRule', 'ConpherenceThreadSearchEngine' => 'PhabricatorApplicationSearchEngine', 'ConpherenceThreadTestCase' => 'ConpherenceTestCase', 'ConpherenceTransaction' => 'PhabricatorApplicationTransaction', diff --git a/src/applications/conpherence/application/PhabricatorConpherenceApplication.php b/src/applications/conpherence/application/PhabricatorConpherenceApplication.php index 6b1ba89a71..c879d387a2 100644 --- a/src/applications/conpherence/application/PhabricatorConpherenceApplication.php +++ b/src/applications/conpherence/application/PhabricatorConpherenceApplication.php @@ -22,6 +22,12 @@ final class PhabricatorConpherenceApplication extends PhabricatorApplication { return "\xE2\x9C\x86"; } + public function getRemarkupRules() { + return array( + new ConpherenceThreadRemarkupRule(), + ); + } + public function getEventListeners() { return array( new ConpherenceHovercardEventListener(), @@ -30,6 +36,7 @@ final class PhabricatorConpherenceApplication extends PhabricatorApplication { public function getRoutes() { return array( + '/Z(?P[1-9]\d*)' => 'ConpherenceViewController', '/conpherence/' => array( '' => 'ConpherenceListController', 'thread/(?P[1-9]\d*)/' => 'ConpherenceListController', @@ -62,6 +69,7 @@ final class PhabricatorConpherenceApplication extends PhabricatorApplication { public function getQuicksandURIPatternBlacklist() { return array( '/conpherence/.*', + '/Z\d+', ); } diff --git a/src/applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php b/src/applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php index d35a512c5e..6bfbd611a9 100644 --- a/src/applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php +++ b/src/applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php @@ -31,7 +31,7 @@ final class PhabricatorConpherenceThreadPHIDType extends PhabricatorPHIDType { $data = $thread->getDisplayData($query->getViewer()); $handle->setName($data['title']); $handle->setFullName($data['title']); - $handle->setURI('/conpherence/'.$thread->getID().'/'); + $handle->setURI('/'.$thread->getMonogram()); } } diff --git a/src/applications/conpherence/remarkup/ConpherenceThreadRemarkupRule.php b/src/applications/conpherence/remarkup/ConpherenceThreadRemarkupRule.php new file mode 100644 index 0000000000..53263e743b --- /dev/null +++ b/src/applications/conpherence/remarkup/ConpherenceThreadRemarkupRule.php @@ -0,0 +1,19 @@ +getEngine()->getConfig('viewer'); + $threads = id(new ConpherenceThreadQuery()) + ->setViewer($viewer) + ->withIDs($ids) + ->execute(); + return mpull($threads, null, 'getID'); + } + +} diff --git a/src/applications/conpherence/view/ConpherenceDurableColumnView.php b/src/applications/conpherence/view/ConpherenceDurableColumnView.php index fc3a16d798..62a6f3b4da 100644 --- a/src/applications/conpherence/view/ConpherenceDurableColumnView.php +++ b/src/applications/conpherence/view/ConpherenceDurableColumnView.php @@ -408,7 +408,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { array( 'name' => pht('View in Conpherence'), 'disabled' => false, - 'href' => '/conpherence/'.$conpherence->getID().'/', + 'href' => '/'.$conpherence->getMonogram(), 'icon' => 'fa-comments', 'key' => 'go_conpherence', ), diff --git a/src/applications/conpherence/view/ConpherenceThreadListView.php b/src/applications/conpherence/view/ConpherenceThreadListView.php index f675bbec50..532bb799b4 100644 --- a/src/applications/conpherence/view/ConpherenceThreadListView.php +++ b/src/applications/conpherence/view/ConpherenceThreadListView.php @@ -70,7 +70,7 @@ final class ConpherenceThreadListView extends AphrontView { $user = $this->getUser(); - $uri = $this->baseURI.$thread->getID().'/'; + $uri = '/'.$thread->getMonogram(); $data = $thread->getDisplayData($user); $icon = null; if ($thread->getIsRoom()) { diff --git a/webroot/rsrc/js/application/conpherence/behavior-menu.js b/webroot/rsrc/js/application/conpherence/behavior-menu.js index 5b8f82e9d4..1bf8b2d964 100644 --- a/webroot/rsrc/js/application/conpherence/behavior-menu.js +++ b/webroot/rsrc/js/application/conpherence/behavior-menu.js @@ -155,11 +155,8 @@ JX.behavior('conpherence-menu', function(config) { } function updatePageData(data) { - var uri_suffix = _thread.selected + '/'; - if (data.use_base_uri) { - uri_suffix = ''; - } - JX.History.replace(config.baseURI + uri_suffix); + var uri = '/Z' + _thread.selected; + JX.History.replace(uri); if (data.title) { JX.Title.setTitle(data.title); } else if (_thread.node) {