Fix need_res double print.

        Patch by exor674. 

diffs (18 lines):

diff -r c6748f3b031f -r b80a582e4b06 cgi-bin/LJ/S2.pm
--- a/cgi-bin/LJ/S2.pm  Sat Jan 01 21:49:47 2011 +0800
+++ b/cgi-bin/LJ/S2.pm  Sat Jan 01 21:51:23 2011 +0800
@@ -180,7 +180,13 @@ sub make_journal
     # Include any head stc or js head content
     LJ::Hooks::run_hooks("need_res_for_journals", $u);
     my $extra_js = LJ::statusvis_message_js($u);
-    $page->{head_content} .= LJ::res_includes() . $extra_js;
+
+    # this will cause double-JS and likely cause issues if called during 
siteviews
+    # as this is done once the page is out of S2's control.
+    $page->{head_content} .= LJ::res_includes()
+        unless $ctx->[S2::SCRATCH]->{siteviews_enabled};
+
+    $page->{head_content} .= $extra_js;
 
     # inject the control strip JS, but only after any libraries have been 
injected
     $page->{head_content} .= LJ::control_strip_js_inject( user => $u->user )
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to