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

[livejournal] r17863: LJSUP-7453. Minor fix

Committer: gprochaev
LJSUP-7453. Minor fix

U   trunk/cgi-bin/LJ/Browse.pm
U   trunk/cgi-bin/LJ/Vertical.pm
Modified: trunk/cgi-bin/LJ/Browse.pm
===================================================================
--- trunk/cgi-bin/LJ/Browse.pm	2010-12-06 08:10:09 UTC (rev 17862)
+++ trunk/cgi-bin/LJ/Browse.pm	2010-12-06 09:05:27 UTC (rev 17863)
@@ -903,7 +903,7 @@
     my @entries = ();
     my $comm_list = join ",", @$comms;
     my $dbh = LJ::get_db_reader();
-    if (defined $search) {
+    if (bytes::length($search)) {
         my $where = $vertical ? " AND km.vert_id = " . $vertical->vert_id . " AND " : "";
         my @search_words = map { "SELECT '%".$_."%' AS cond" } split /\s+/, $search;
         $search = join " UNION ALL ", @search_words;

Modified: trunk/cgi-bin/LJ/Vertical.pm
===================================================================
--- trunk/cgi-bin/LJ/Vertical.pm	2010-12-06 08:10:09 UTC (rev 17862)
+++ trunk/cgi-bin/LJ/Vertical.pm	2010-12-06 09:05:27 UTC (rev 17863)
@@ -357,7 +357,7 @@
 
     my $comms_search = [];
     my %finded = ();
-    if (defined $search) {
+    if (bytes::length($search)) {
         my @search_words = map { "SELECT '%".$_."%' AS cond" } split /\s+/, $search;
         $search = join " UNION ALL ", @search_words;
         $comms_search = $dbh->selectall_arrayref (

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