[Rt-commit] r7175 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Mon Mar 5 22:59:56 EST 2007


Author: ruz
Date: Mon Mar  5 22:59:56 2007
New Revision: 7175

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/BuildFormatString

Log:
 r4707 at cubic-pc:  cubic | 2007-03-06 06:59:21 +0300
 * add two callbacks: SetFieldsOnce and Default, the first one allows to
   add static fields, while the latter one gives you full power over fields
   and args


Modified: rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/BuildFormatString
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/BuildFormatString	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/BuildFormatString	Mon Mar  5 22:59:56 2007
@@ -44,7 +44,7 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <%ARGS>
-$Format => undef
+$Format => RT->Config->Get('DefaultSearchResultFormat')
 
 %cfqueues => undef
 
@@ -93,8 +93,7 @@
 
 </%ONCE>
 <%init>
-
-$Format ||= RT->Config->Get('DefaultSearchResultFormat');
+$m->callback( CallbackOnce => 1, CallbackName => 'SetFieldsOnce', Fields => \@fields );
 
 my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'});
 foreach my $id (keys %cfqueues) {
@@ -116,6 +115,8 @@
     push @fields, "CustomField.{" . $CustomField->Name . "}";
 }
 
+$m->callback( Fields => \@fields, ARGSRef => \%ARGS );
+
 my ( @seen);
 
 my @format = split( /,\s*/, $Format );


More information about the Rt-commit mailing list