/[BackupPC]/trunk/lib/BackupPC/SearchLib.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/BackupPC/SearchLib.pm

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

revision 185 by dpavlin, Mon Oct 10 14:32:31 2005 UTC revision 186 by dpavlin, Wed Oct 12 12:53:27 2005 UTC
# Line 68  sub dates_from_form($) { Line 68  sub dates_from_form($) {
68                  $mm =~ s/\D//g;                  $mm =~ s/\D//g;
69                  $dd =~ s/\D//g;                  $dd =~ s/\D//g;
70    
71                    my $h = my $m = my $s = 0;
72                    if ($suffix eq 'to') {
73                            $h = 23;
74                            $m = 59;
75                            $s = 59;
76                    }
77    
78                  my $dt = new DateTime(                  my $dt = new DateTime(
79                          year => $yyyy,                          year => $yyyy,
80                          month => $mm,                          month => $mm,
81                          day => $dd                          day => $dd,
82                            hour => $h,
83                            minute => $m,
84                            second => $s,
85                  );                  );
86                  print STDERR "mk_epoch_date($name,$suffix) [$yyyy-$mm-$dd] = " . $dt->ymd . " " . $dt->hms . "\n";                  print STDERR "mk_epoch_date($name,$suffix) [$yyyy-$mm-$dd] = " . $dt->ymd . " " . $dt->hms . "\n";
87                  return $dt->epoch || 'NULL';                  return $dt->epoch || 'NULL';
# Line 100  sub getWhere($) { Line 110  sub getWhere($) {
110          push @conditions, qq{ files.date >= $files_from } if ($files_from);          push @conditions, qq{ files.date >= $files_from } if ($files_from);
111          push @conditions, qq{ files.date <= $files_to } if ($files_to);          push @conditions, qq{ files.date <= $files_to } if ($files_to);
112    
113          print STDERR "backup: $backup_from - $backup_to files: $files_from - $files_to cond:" . join(" | ",@conditions);          print STDERR "backup: $backup_from - $backup_to files: $files_from - $files_to cond:" . join(" and ",@conditions);
114    
115          push( @conditions, ' files.shareid = ' . $param->{'search_share'} ) if ($param->{'search_share'});          push( @conditions, ' files.shareid = ' . $param->{'search_share'} ) if ($param->{'search_share'});
116          push (@conditions, " upper(files.path) LIKE upper('%".$param->{'search_filename'}."%')") if ($param->{'search_filename'});          push (@conditions, " upper(files.path) LIKE upper('%".$param->{'search_filename'}."%')") if ($param->{'search_filename'});

Legend:
Removed from v.185  
changed lines
  Added in v.186

  ViewVC Help
Powered by ViewVC 1.1.26