[otrs-cvs] Advisory/Kernel/Modules AgentAdvisory.pm,1.66,1.67
cvs-log at otrs.org
cvs-log at otrs.org
Sat Mar 1 22:13:21 GMT 2008
Comments:
Update of /home/cvs/Advisory/Kernel/Modules
In directory lancelot:/tmp/cvs-serv11470/Kernel/Modules
Modified Files:
AgentAdvisory.pm
Log Message:
Simplify the advisory search function.
Author: tr
Index: AgentAdvisory.pm
===================================================================
RCS file: /home/cvs/Advisory/Kernel/Modules/AgentAdvisory.pm,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** AgentAdvisory.pm 1 Mar 2008 21:12:55 -0000 1.66
--- AgentAdvisory.pm 1 Mar 2008 22:13:16 -0000 1.67
***************
*** 2224,2231 ****
}
if ( !$Param{OrderBy} ) {
! $Param{OrderBy} = "";
}
if ( !$Param{Direction} ) {
! $Param{Direction} = "";
}
my $SearchAdvisoryShown = $Self->{ConfigObject}->Get('Advisory::SearchAdvisoryShown')
--- 2224,2231 ----
}
if ( !$Param{OrderBy} ) {
! $Param{OrderBy} = '';
}
if ( !$Param{Direction} ) {
! $Param{Direction} = '';
}
my $SearchAdvisoryShown = $Self->{ConfigObject}->Get('Advisory::SearchAdvisoryShown')
***************
*** 2235,2239 ****
StartHit => $Param{StartHit},
PageShown => $SearchAdvisoryShown,
! AllHits => $#SortedSearchResultList + 1,
Action => "Action=AgentAdvisory&",
Link =>
--- 2235,2239 ----
StartHit => $Param{StartHit},
PageShown => $SearchAdvisoryShown,
! AllHits => scalar @SortedSearchResultList,
Action => "Action=AgentAdvisory&",
Link =>
***************
*** 2248,2267 ****
);
my $Counter = 0;
! for my $Key (@SortedSearchResultList) {
$Counter++;
if ( $Counter >= $Param{StartHit}
&& $Counter < ( $Param{StartHit} + $SearchAdvisoryShown ) )
{
! my %Hash = %{$Key};
! if ( $Counter % 2 ) {
! $Hash{css} = 'searchactive';
! }
! else {
! $Hash{css} = 'searchpassive';
! }
$Self->{LayoutObject}->Block(
Name => 'Result',
! Data => \%Hash,
);
}
--- 2248,2262 ----
);
+ # generate each result row
my $Counter = 0;
! for my $TDataRef (@SortedSearchResultList) {
$Counter++;
if ( $Counter >= $Param{StartHit}
&& $Counter < ( $Param{StartHit} + $SearchAdvisoryShown ) )
{
! $TDataRef->{css} = $Counter % 2 ? 'searchactive' : 'searchpassive';
$Self->{LayoutObject}->Block(
Name => 'Result',
! Data => $TDataRef,
);
}
More information about the cvs-log
mailing list