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

[livejournal] r20254: LJSUP-10085: [internal] Decrease number ...

Committer: gariev
LJSUP-10085: [internal] Decrease number of error log messages
U   trunk/htdocs/multisearch.bml
Modified: trunk/htdocs/multisearch.bml
===================================================================
--- trunk/htdocs/multisearch.bml	2011-10-07 13:59:17 UTC (rev 20253)
+++ trunk/htdocs/multisearch.bml	2011-10-07 14:38:44 UTC (rev 20254)
@@ -141,17 +141,12 @@
             $body = $ad . "<?h1 $ML{'Error'} h1?><?p $ML{'.noaddress.text'} p?>";
             return;
         } else {
-            my $uid = $dbr->selectrow_array("SELECT userid FROM user WHERE journaltype='P' AND statusvis='V' ".
-                                            "AND allow_contactshow='Y' AND email=? LIMIT 1", undef, $email);
-            # try the email table
-            unless ($uid) {
-                $uid = $dbr->selectrow_array(qq{
-                    SELECT e.userid
-                    FROM user u, email e
-                    WHERE e.email=? AND e.userid=u.userid AND u.journaltype='P' AND u.statusvis='V'
-                    AND u.allow_contactshow='Y' LIMIT 1
-                }, undef, $email);
-            }
+            my $uid = $dbr->selectrow_array(qq{
+                SELECT e.userid
+                FROM user u, email e
+                WHERE e.email=? AND e.userid=u.userid AND u.journaltype='P' AND u.statusvis='V'
+                AND u.allow_contactshow='Y' LIMIT 1 }, undef, $email
+            );
             if (my $u = LJ::load_userid($uid)) {
                 LJ::load_user_props($u, "opt_whatemailshow");
                 if ($u->{'opt_whatemailshow'} eq "A" || $u->{'opt_whatemailshow'} eq "B") {

Tags: bml, gariev, livejournal
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