Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r17958: do not call res_includes in non-web cont...

Committer: ailyin
do not call res_includes in non-web context
U   trunk/cgi-bin/LJ/HTML/Template.pm
Modified: trunk/cgi-bin/LJ/HTML/Template.pm
===================================================================
--- trunk/cgi-bin/LJ/HTML/Template.pm	2010-12-17 07:21:13 UTC (rev 17957)
+++ trunk/cgi-bin/LJ/HTML/Template.pm	2010-12-17 07:22:05 UTC (rev 17958)
@@ -14,10 +14,19 @@
         'lj_sitename'   => $LJ::SITENAMESHORT,
         'lj_sslroot'    => $LJ::SSLROOT,
         'lj_jsprefix'   => $LJ::JSPREFIX,
-        'lj_res_includes_basic' => LJ::res_includes({ 'only_needed' => 1 }),
-        'lj_res_includes'       => LJ::res_includes(),
     );
 
+    if ( LJ::is_web_context() ) {
+        %common_params = (
+            %common_params,
+
+            'lj_res_includes_basic'
+                => LJ::res_includes({ 'only_needed' => 1 }),
+
+            'lj_res_includes' => LJ::res_includes(),
+        );
+    }
+
     if ($opts->{'use_expr'}) {
         require HTML::Template::Pro; # load module on demand
 

Tags: andy, livejournal, pm
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