vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r21151: LJSUP-11209: Preload user props using lo...

Committer: vad
LJSUP-11209: Preload user props using load_user_props_multi
U   trunk/cgi-bin/LJ/User.pm
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2012-02-09 08:18:30 UTC (rev 21150)
+++ trunk/cgi-bin/LJ/User.pm	2012-02-09 13:02:57 UTC (rev 21151)
@@ -435,7 +435,13 @@
 
 sub preload_props {
     my $u = shift;
-    LJ::load_user_props($u, @_);
+
+    ## if called with with options, use LJ::load_user_props
+    if ($_[0] and ref $_[0]){
+        LJ::load_user_props($u, @_);
+    } else {
+        LJ->load_user_props_multi([$u], [@_]);
+    }
 }
 
 sub readonly {

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