From 0495eb15862e9f612a6e6e913cd1fb1a38e2702d Mon Sep 17 00:00:00 2001 From: Cam Spiers Date: Tue, 25 Jun 2013 16:28:44 -0700 Subject: [PATCH] Fix issue where "phabricator" disqus account is used by default and not overridable Summary: Currently setting "disqus.shortname" via config isn't actually used in the instantiation of disqus. This fix uses the shortname configured. Test Plan: Open a phame post with disqus enabled and a shortname other than "phabricator" specified. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D6310 --- src/applications/phame/view/PhamePostView.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/applications/phame/view/PhamePostView.php b/src/applications/phame/view/PhamePostView.php index 0737efb109..a6655a6d53 100644 --- a/src/applications/phame/view/PhamePostView.php +++ b/src/applications/phame/view/PhamePostView.php @@ -212,7 +212,7 @@ final class PhamePostView extends AphrontView { // protip - try some var disqus_developer = 1; action to test locally $disqus_js = CelerityStaticResourceResponse::renderInlineScript( jsprintf( - ' var disqus_shortname = "phabricator";'. + ' var disqus_shortname = %s;'. ' var disqus_identifier = %s;'. ' var disqus_url = %s;'. ' var disqus_title = %s;'. @@ -224,6 +224,7 @@ final class PhamePostView extends AphrontView { '(document.getElementsByTagName("head")[0] ||'. ' document.getElementsByTagName("body")[0]).appendChild(dsq);'. '})();', + $disqus_shortname, $post->getPHID(), $this->getSkin()->getURI('post/'.$this->getPost()->getPhameTitle()), $post->getTitle()));