wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r17170: LJSUP-5987.

Committer: gprochaev
LJSUP-5987.

For compare LJ usernames need to use LJ::u_equals

U   trunk/cgi-bin/Apache/WURFL.pm
Modified: trunk/cgi-bin/Apache/WURFL.pm
===================================================================
--- trunk/cgi-bin/Apache/WURFL.pm	2010-08-20 09:40:19 UTC (rev 17169)
+++ trunk/cgi-bin/Apache/WURFL.pm	2010-08-20 10:15:25 UTC (rev 17170)
@@ -10,10 +10,9 @@
     my $user_agent = shift;
 
     if ($LJ::WURFL{'ua_keys_mobile'}) {
-        foreach my $key (@{$LJ::WURFL{'ua_keys_mobile'}}) {
-            return 1 if $user_agent =~ /\Q$key\E/i;
-        }
-        return 0;
+        grep { $user_agent =~ /\Q$_\E/i } @{$LJ::WURFL{'ua_keys_mobile'}}
+            ? return 1
+            : return 0;
     }
 
     unless ($wurfl) {
@@ -59,8 +58,7 @@
 
     my $remote = LJ::get_remote();
     return '' unless $remote;
-    my $remote_name = $remote->user;
-    return '' if $username ne $remote_name;
+    return '' unless LJ::u_equals($remote, LJ::load_user($username));
 
     if ($args =~ /show=(P|C|Y)/i) { 
         return "$mobile_domain/read/friends/?show=".lc($1);
@@ -105,7 +103,7 @@
 
             } elsif (!$func) { # it's username.livejournal.com and we has var $username.
 
-                if ($uri =~ /^\/friends/) {
+                if ($uri =~ m#^/friends#) {
                     return $self->_process_url_args_for_friends($username, $args);
                 }
 

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