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

[livejournal] r17832: LJSUP-7485. incorrect working search by ...

Committer: gprochaev
LJSUP-7485. incorrect working search by tags

U   trunk/cgi-bin/LJ/Widget/Browse.pm
U   trunk/cgi-bin/LJ/Widget/Search.pm
U   trunk/templates/Browse/search.tmpl
Modified: trunk/cgi-bin/LJ/Widget/Browse.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Browse.pm	2010-11-30 10:19:38 UTC (rev 17831)
+++ trunk/cgi-bin/LJ/Widget/Browse.pm	2010-12-01 05:25:55 UTC (rev 17832)
@@ -395,13 +395,17 @@
         nav_line                => $nav_line,
         popular_interests_widget=> LJ::Widget::PopularInterests->render(),
         add_community_widget    => LJ::Widget::AddCommunity->render(vertical => $vertical),
-        search_widget           => LJ::Widget::Search->render(type => $vertical ? "tags" : "yandex", view => $view),
+        search_widget           => LJ::Widget::Search->render(
+                                        type        => $vertical ? "tags" : "yandex", 
+                                        view        => $view, 
+                                        search_text => $search_str,
+                                    ),
         top_posts               => \@top_posts,
         top_comms               => \@top_comms,
         view                    => $view,
         poll_of_the_day         => LJ::Widget::PollOfTheDay->render(
                                         vertical_account => $vertical ? $vertical->journal : undef,
-                                        vertical_name => $vertical ? $vertical->name : undef
+                                        vertical_name    => $vertical ? $vertical->name : undef,
                                     ),
         is_vertical_view        => $vertical ? 1 : 0,
     );

Modified: trunk/cgi-bin/LJ/Widget/Search.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Search.pm	2010-11-30 10:19:38 UTC (rev 17831)
+++ trunk/cgi-bin/LJ/Widget/Search.pm	2010-12-01 05:25:55 UTC (rev 17832)
@@ -90,7 +90,6 @@
         $uri .= "/" if $uri !~ m#/$#; ## add end slash if not exist
 
         my $args = BML::get_query_string();
-        $uri .= "?$args" if $args;
         my $tags = $opts{'preview'}
                 ? [ map { { tag => $_ } } @{$opts{'preview'}} ]
                 : [ map { { tag => $_ } } split /\n/m, $stored_words ];
@@ -99,6 +98,7 @@
             search_url      => $uri,
             view            => $opts{'view'},
             tags            => $tags,
+            search_text     => $opts{'search_text'},
         );
 
         return $template->output;

Modified: trunk/templates/Browse/search.tmpl
===================================================================
--- trunk/templates/Browse/search.tmpl	2010-11-30 10:19:38 UTC (rev 17831)
+++ trunk/templates/Browse/search.tmpl	2010-12-01 05:25:55 UTC (rev 17832)
@@ -13,7 +13,7 @@
 			<fieldset>
 				<p>
 					<label for="search_text" id="search_text_label">Find</label>
-					<input class="type-text" id="search_text" name="search_text" type="text" value="" autocomplete="off" />
+					<input class="type-text" id="search_text" name="search_text" type="text" value="<tmpl_var search_text>" autocomplete="off" />
 					<input type="submit" id="do_search" name="do_search" value="Search"/>
 				</p>
 				<ul class="b-search-tags">

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