Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r20228: LJSUP-10021: Prevent imguploadrte.bml fr...

Committer: gariev
LJSUP-10021: Prevent imguploadrte.bml from loading all resources
U   trunk/cgi-bin/weblib.pl
U   trunk/htdocs/imguploadrte.bml
Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl	2011-10-05 05:33:48 UTC (rev 20227)
+++ trunk/cgi-bin/weblib.pl	2011-10-05 06:58:15 UTC (rev 20228)
@@ -1282,7 +1282,7 @@
 ## <!--[if IE]><link rel="stylesheet" type="text/css" href="$statprefix/..." /><![endif]-->
 ## Support 'args' option. Example: LJ::need_res( { args => 'media="screen"' }, 'stc/ljtimes/iframe.css' );
 ## Results in: <link rel="stylesheet" type="text/css" href="http://stat.lj-3-32.bulyon.local/ljtimes/iframe.css?v=1285833891" media="screen"/>
-## LJ::need_res( {clean_list} ) will suppress ALL previous resources and do NOTHING more!
+## LJ::need_res( {clean_list => 1} ) will suppress ALL previous resources and do NOTHING more!
 sub need_res {
     my $opts = (ref $_[0]) ? shift : {};
     my @keys = @_;

Modified: trunk/htdocs/imguploadrte.bml
===================================================================
--- trunk/htdocs/imguploadrte.bml	2011-10-05 05:33:48 UTC (rev 20227)
+++ trunk/htdocs/imguploadrte.bml	2011-10-05 06:58:15 UTC (rev 20228)
@@ -10,6 +10,7 @@
     my $body = \$_[0]->{'body'};
     my $u = LJ::User->remote;
 
+    LJ::need_res( {clean_list => 1} );
     LJ::need_res("stc/display_none.css",
                  "js/photobucket_jw.js");
     my $js = "";
@@ -210,7 +211,7 @@
             $div_upload .= "<script>window.parent.InOb.setupIframeHandlers(true);window.parent.InOb.showSelectorPage();</script>";
             ## We no need a html and head tags
             $$body = $div_upload;
-            $$head .= LJ::res_includes();
+            $$head .= LJ::res_includes({ only_needed => 1});
             # BML::finish();
             # return $div_upload;
             return;
@@ -296,7 +297,7 @@
         $$body = $ret;
         $$head .= "<script type='text/javascript'>var seedurl='$LJ::SITEROOT/photobucket_cb.bml';";
         $$head .= "var pb_affsite_id = $LJ::PHOTOBUCKET_JWIDGET_ID;</script>\n";
-        $$head .= LJ::res_includes();
+        $$head .= LJ::res_includes({only_needed => 1});
         return;
 }
 _code?>

Tags: bml, gariev, livejournal, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments