[Bio] / Sprout / SearchHelper.pm Repository:
ViewVC logotype

Diff of /Sprout/SearchHelper.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24, Fri Dec 15 03:27:20 2006 UTC revision 1.26, Sun Feb 4 13:07:24 2007 UTC
# Line 272  Line 272 
272      my $session_id = $cgi->param("SessionID");      my $session_id = $cgi->param("SessionID");
273      my $type = "old";      my $type = "old";
274      if (! $session_id) {      if (! $session_id) {
275            Trace("No session ID found.") if T(3);
276          # Here we're starting a new session. We create the session ID and          # Here we're starting a new session. We create the session ID and
277          # store it in the query object.          # store it in the query object.
278          $session_id = NewSessionID();          $session_id = NewSessionID();
279          $type = "new";          $type = "new";
280          $cgi->param(-name => 'SessionID', -value => $session_id);          $cgi->param(-name => 'SessionID', -value => $session_id);
281        } else {
282            Trace("Session ID is $session_id.") if T(3);
283      }      }
284      # Compute the subclass name.      # Compute the subclass name.
285      my $subClass;      my $subClass;
# Line 1117  Line 1120 
1120      # Read in the subsystems.      # Read in the subsystems.
1121      my @subs = $sprout->GetAll(['Subsystem'], "ORDER BY Subsystem(classification), Subsystem(id)", [],      my @subs = $sprout->GetAll(['Subsystem'], "ORDER BY Subsystem(classification), Subsystem(id)", [],
1122                                 ['Subsystem(classification)', 'Subsystem(id)']);                                 ['Subsystem(classification)', 'Subsystem(id)']);
1123        # Put any unclassified subsystems at the end. They will always be at the beginning, so if one
1124        # is at the end, ALL subsystems are unclassified and we don't bother.
1125        if ($#subs >= 0 && $subs[$#subs]->[0] ne '') {
1126            while ($subs[0]->[0] eq '') {
1127                my $classLess = shift @subs;
1128                push @subs, $classLess;
1129            }
1130        }
1131      # Declare the return variable.      # Declare the return variable.
1132      my @retVal = ();      my @retVal = ();
1133      # Each element in @subs represents a leaf node, so as we loop through it we will be      # Each element in @subs represents a leaf node, so as we loop through it we will be
# Line 1522  Line 1533 
1533      my $retVal = $cgi->Tr($cgi->td("Results/Page"),      my $retVal = $cgi->Tr($cgi->td("Results/Page"),
1534                            $cgi->td($cgi->popup_menu(-name => 'PageSize',                            $cgi->td($cgi->popup_menu(-name => 'PageSize',
1535                                                      -values => [10, 25, 50, 100, 1000],                                                      -values => [10, 25, 50, 100, 1000],
1536                                                      -default => $pageSize) . " " .                                                      -default => $pageSize)),
                                    $cgi->checkbox(-name => 'ShowURL',  
                                                   -value => 1,  
                                                   -label => 'Show URL',  
                                                   -checked => 1)),  
1537                            $cgi->td($cgi->submit(-class => 'goButton',                            $cgi->td($cgi->submit(-class => 'goButton',
1538                                                  -name => 'Search',                                                  -name => 'Search',
1539                                                  -value => $realCaption)));                                                  -value => $realCaption)));
# Line 1771  Line 1778 
1778          # a singleton list, but that's okay.          # a singleton list, but that's okay.
1779          my @values = split (/\0/, $parms{$parmKey});          my @values = split (/\0/, $parms{$parmKey});
1780          # Check for special cases.          # Check for special cases.
1781          if (grep { $_ eq $parmKey } qw(SessionID ResultCount Page PageSize Trace TF ShowURL)) {          if (grep { $_ eq $parmKey } qw(SessionID ResultCount Page PageSize Trace TF)) {
1782              # These are bookkeeping parameters we don't need to start a search.              # These are bookkeeping parameters we don't need to start a search.
1783              @values = ();              @values = ();
1784          } elsif ($parmKey =~ /_SearchThing$/) {          } elsif ($parmKey =~ /_SearchThing$/) {

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.26

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3