mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-03 03:11:01 +01:00
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
This commit is contained in:
parent
78311f758d
commit
0495eb1586
1 changed files with 2 additions and 1 deletions
|
@ -212,7 +212,7 @@ final class PhamePostView extends AphrontView {
|
||||||
// protip - try some var disqus_developer = 1; action to test locally
|
// protip - try some var disqus_developer = 1; action to test locally
|
||||||
$disqus_js = CelerityStaticResourceResponse::renderInlineScript(
|
$disqus_js = CelerityStaticResourceResponse::renderInlineScript(
|
||||||
jsprintf(
|
jsprintf(
|
||||||
' var disqus_shortname = "phabricator";'.
|
' var disqus_shortname = %s;'.
|
||||||
' var disqus_identifier = %s;'.
|
' var disqus_identifier = %s;'.
|
||||||
' var disqus_url = %s;'.
|
' var disqus_url = %s;'.
|
||||||
' var disqus_title = %s;'.
|
' var disqus_title = %s;'.
|
||||||
|
@ -224,6 +224,7 @@ final class PhamePostView extends AphrontView {
|
||||||
'(document.getElementsByTagName("head")[0] ||'.
|
'(document.getElementsByTagName("head")[0] ||'.
|
||||||
' document.getElementsByTagName("body")[0]).appendChild(dsq);'.
|
' document.getElementsByTagName("body")[0]).appendChild(dsq);'.
|
||||||
'})();',
|
'})();',
|
||||||
|
$disqus_shortname,
|
||||||
$post->getPHID(),
|
$post->getPHID(),
|
||||||
$this->getSkin()->getURI('post/'.$this->getPost()->getPhameTitle()),
|
$this->getSkin()->getURI('post/'.$this->getPost()->getPhameTitle()),
|
||||||
$post->getTitle()));
|
$post->getTitle()));
|
||||||
|
|
Loading…
Reference in a new issue