Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F19154259
D16007.id38523.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D16007.id38523.diff
View Options
diff --git a/src/applications/people/markup/PhabricatorMentionRemarkupRule.php b/src/applications/people/markup/PhabricatorMentionRemarkupRule.php
--- a/src/applications/people/markup/PhabricatorMentionRemarkupRule.php
+++ b/src/applications/people/markup/PhabricatorMentionRemarkupRule.php
@@ -136,6 +136,10 @@
),
'@'.$user->getUserName());
} else {
+ if ($engine->getConfig('uri.full')) {
+ $user_href = PhabricatorEnv::getURI($user_href);
+ }
+
$tag = id(new PHUITagView())
->setType(PHUITagView::TYPE_PERSON)
->setPHID($user->getPHID())
diff --git a/src/applications/phame/controller/post/PhamePostViewController.php b/src/applications/phame/controller/post/PhamePostViewController.php
--- a/src/applications/phame/controller/post/PhamePostViewController.php
+++ b/src/applications/phame/controller/post/PhamePostViewController.php
@@ -78,10 +78,14 @@
->executeOne();
$blogger_profile = $blogger->loadUserProfile();
+
+ $author_uri = '/p/'.$blogger->getUsername().'/';
+ $author_uri = PhabricatorEnv::getURI($author_uri);
+
$author = phutil_tag(
'a',
array(
- 'href' => '/p/'.$blogger->getUsername().'/',
+ 'href' => $author_uri,
),
$blogger->getUsername());
@@ -105,7 +109,7 @@
$blogger_profile->getTitle(),
))
->setImage($blogger->getProfileImageURI())
- ->setImageHref('/p/'.$blogger->getUsername());
+ ->setImageHref($author_uri);
$timeline = $this->buildTransactionTimeline(
$post,
@@ -128,10 +132,10 @@
$next_view = new PhameNextPostView();
if ($next) {
- $next_view->setNext($next->getTitle(), $next->getViewURI());
+ $next_view->setNext($next->getTitle(), $next->getLiveURI());
}
if ($prev) {
- $next_view->setPrevious($prev->getTitle(), $prev->getViewURI());
+ $next_view->setPrevious($prev->getTitle(), $prev->getLiveURI());
}
$document->setFoot($next_view);
diff --git a/src/applications/phame/view/PhamePostListView.php b/src/applications/phame/view/PhamePostListView.php
--- a/src/applications/phame/view/PhamePostListView.php
+++ b/src/applications/phame/view/PhamePostListView.php
@@ -62,8 +62,19 @@
$list = array();
foreach ($posts as $post) {
- $blogger = $handles[$post->getBloggerPHID()]->renderLink();
+ $blogger_name = $handles[$post->getBloggerPHID()]->getName();
$blogger_uri = $handles[$post->getBloggerPHID()]->getURI();
+ $blogger_uri = PhabricatorEnv::getURI($blogger_uri);
+
+ // Render a link manually to make sure we point at the correct domain.
+ $blogger = phutil_tag(
+ 'a',
+ array(
+ 'href' => $blogger_uri,
+ ),
+ $blogger_name);
+ $blogger = phutil_tag('strong', array(), $blogger);
+
$blogger_image = $handles[$post->getBloggerPHID()]->getImageURI();
$phame_post = null;
@@ -74,7 +85,6 @@
$phame_post = phutil_tag('em', array(), pht('(Empty Post)'));
}
- $blogger = phutil_tag('strong', array(), $blogger);
$date = phabricator_datetime($post->getDatePublished(), $viewer);
$blog = $post->getBlog();
diff --git a/src/infrastructure/markup/PhabricatorMarkupEngine.php b/src/infrastructure/markup/PhabricatorMarkupEngine.php
--- a/src/infrastructure/markup/PhabricatorMarkupEngine.php
+++ b/src/infrastructure/markup/PhabricatorMarkupEngine.php
@@ -351,10 +351,13 @@
* @task engine
*/
public static function newPhameMarkupEngine() {
- return self::newMarkupEngine(array(
- 'macros' => false,
- 'uri.full' => true,
- ));
+ return self::newMarkupEngine(
+ array(
+ 'macros' => false,
+ 'uri.full' => true,
+ 'uri.same-window' => true,
+ 'uri.base' => PhabricatorEnv::getURI('/'),
+ ));
}
@@ -487,6 +490,14 @@
$engine->setConfig('uri.full', $options['uri.full']);
+ if (isset($options['uri.base'])) {
+ $engine->setConfig('uri.base', $options['uri.base']);
+ }
+
+ if (isset($options['uri.same-window'])) {
+ $engine->setConfig('uri.same-window', $options['uri.same-window']);
+ }
+
$rules = array();
$rules[] = new PhutilRemarkupEscapeRemarkupRule();
$rules[] = new PhutilRemarkupMonospaceRule();
diff --git a/src/infrastructure/markup/view/PHUIRemarkupView.php b/src/infrastructure/markup/view/PHUIRemarkupView.php
--- a/src/infrastructure/markup/view/PHUIRemarkupView.php
+++ b/src/infrastructure/markup/view/PHUIRemarkupView.php
@@ -82,7 +82,7 @@
$engine_key = PhabricatorHash::digestForIndex($engine_key);
$cache = PhabricatorCaches::getRequestCache();
- $cache_key = "remarkup.engine({$viewer}, {$engine_key})";
+ $cache_key = "remarkup.engine({$viewer_key}, {$engine_key})";
$engine = $cache->getKey($cache_key);
if (!$engine) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 12, 2:04 PM (3 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8503546
Default Alt Text
D16007.id38523.diff (4 KB)
Attached To
Mode
D16007: Improve some Phame custom domain remarkup and link behaviors
Attached
Detach File
Event Timeline
Log In to Comment