[Rt-commit] [svn] r825 - in RTx-Atom: . html/Atom/0.3 html/Atom/0.3/Search

autrijus at pallas.eruditorum.org autrijus at pallas.eruditorum.org
Tue May 4 08:49:32 EDT 2004


Author: autrijus
Date: Tue May  4 08:49:31 2004
New Revision: 825

Modified:
   RTx-Atom/   (props changed)
   RTx-Atom/html/Atom/0.3/Search/index
   RTx-Atom/html/Atom/0.3/dhandler
Log:
 ----------------------------------------------------------------------
 r4448 at not:  autrijus | 2004-05-04T12:48:47.906524Z
 
 * revert back to autoflush(0) and properly generate header first.
 
 ----------------------------------------------------------------------


Modified: RTx-Atom/html/Atom/0.3/Search/index
==============================================================================
--- RTx-Atom/html/Atom/0.3/Search/index	(original)
+++ RTx-Atom/html/Atom/0.3/Search/index	Tue May  4 08:49:31 2004
@@ -25,12 +25,9 @@
   <modified><% $Now->W3CDTF %></modified>
   <generator url="http://www.bestpractical.com/rt/" version="<% $RT::VERSION %>">RT</generator>
   <entry>
-% my @ids;
-% while (my $obj = $List->Next) {
-%   push @ids, $obj->Id;
+% foreach my $obj (@$List) {
     <& $ShowEntry, %ARGS, Object => $obj, IsChild => 1 &>
 % }
-% $r->header_out(Location => "$BaseURI/$Path/".join(',', @ids));
   </entry>
   <info></info>
 % if ($page > 1) {
@@ -53,10 +50,16 @@
 $List->RowsPerPage($rows) if $rows > 0;
 $List->GotoPage($page - 1) if $page > 0;
 
-my $TotalFound = $List->CountAll;
+$List = $List->ItemsArrayRef || [];
+
+my $TotalFound = @$List;
 $rows = $TotalFound if $rows <= 0;
 $page = 1 if $page <= 0;
 
+if ($TotalFound) {
+    $r->header_out(Location => "$BaseURI/$Path/".join(',', map $_->Id, @$List));
+}
+
 my %query;
 while (my ($k, $v) = each %ARGS) {
     $query{$k} = $v if $k eq lc($k);

Modified: RTx-Atom/html/Atom/0.3/dhandler
==============================================================================
--- RTx-Atom/html/Atom/0.3/dhandler	(original)
+++ RTx-Atom/html/Atom/0.3/dhandler	Tue May  4 08:49:31 2004
@@ -3,8 +3,6 @@
 require Digest::MD5;
 require MIME::Base64;
 
-$m->autoflush(0);
-
 # needs discussion on using MD5(pass) as Digest token
 @RT::AtomAuthenticationMethods = qw( WSSE Basic )
     unless @RT::AtomAuthenticationMethods;


More information about the Rt-commit mailing list