Page MenuHomePhabricator

D12397.diff
No OneTemporary

D12397.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -356,7 +356,7 @@
'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 @@
'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 @@
'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 @@
'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
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -258,6 +258,7 @@
'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 @@
'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
--- a/src/applications/conpherence/application/PhabricatorConpherenceApplication.php
+++ b/src/applications/conpherence/application/PhabricatorConpherenceApplication.php
@@ -22,6 +22,12 @@
return "\xE2\x9C\x86";
}
+ public function getRemarkupRules() {
+ return array(
+ new ConpherenceThreadRemarkupRule(),
+ );
+ }
+
public function getEventListeners() {
return array(
new ConpherenceHovercardEventListener(),
@@ -30,6 +36,7 @@
public function getRoutes() {
return array(
+ '/Z(?P<id>[1-9]\d*)' => 'ConpherenceViewController',
'/conpherence/' => array(
'' => 'ConpherenceListController',
'thread/(?P<id>[1-9]\d*)/' => 'ConpherenceListController',
@@ -62,6 +69,7 @@
public function getQuicksandURIPatternBlacklist() {
return array(
'/conpherence/.*',
+ '/Z\d+',
);
}
diff --git a/src/applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php b/src/applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php
--- a/src/applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php
+++ b/src/applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php
@@ -31,7 +31,7 @@
$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
--- /dev/null
+++ b/src/applications/conpherence/remarkup/ConpherenceThreadRemarkupRule.php
@@ -0,0 +1,19 @@
+<?php
+
+final class ConpherenceThreadRemarkupRule
+ extends PhabricatorObjectRemarkupRule {
+
+ protected function getObjectNamePrefix() {
+ return 'Z';
+ }
+
+ protected function loadObjects(array $ids) {
+ $viewer = $this->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
--- a/src/applications/conpherence/view/ConpherenceDurableColumnView.php
+++ b/src/applications/conpherence/view/ConpherenceDurableColumnView.php
@@ -408,7 +408,7 @@
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
--- a/src/applications/conpherence/view/ConpherenceThreadListView.php
+++ b/src/applications/conpherence/view/ConpherenceThreadListView.php
@@ -70,7 +70,7 @@
$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
--- a/webroot/rsrc/js/application/conpherence/behavior-menu.js
+++ b/webroot/rsrc/js/application/conpherence/behavior-menu.js
@@ -155,11 +155,8 @@
}
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) {

File Metadata

Mime Type
text/plain
Expires
Fri, May 10, 6:47 PM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6283948
Default Alt Text
D12397.diff (7 KB)

Event Timeline