/[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 121 by iklaric, Thu Sep 15 13:54:29 2005 UTC revision 124 by dpavlin, Tue Sep 20 16:23:04 2005 UTC
# Line 15  my $pager_pages = 10; Line 15  my $pager_pages = 10;
15  my $dsn = $Conf{SearchDSN};  my $dsn = $Conf{SearchDSN};
16  my $db_user = $Conf{SearchUser} || '';  my $db_user = $Conf{SearchUser} || '';
17    
18  my $index_path = $Conf{HyperEstraierIndex};  my $hest_index_path = $Conf{HyperEstraierIndex};
 if ($index_path) {  
         $index_path = $TopDir . '/' . $index_path;  
         $index_path =~ s#//#/#g;  
 }  
19    
20  my $dbh;  my $dbh;
21    
# Line 198  sub getFilesHyperEstraier($) { Line 194  sub getFilesHyperEstraier($) {
194          my $offset = $param->{'offset'} || 0;          my $offset = $param->{'offset'} || 0;
195          $offset *= $on_page;          $offset *= $on_page;
196    
197          die "no index_path?" unless ($index_path);          die "no index_path?" unless ($hest_index_path);
198    
199          use HyperEstraier;          use HyperEstraier;
200    
201          my ($index_path, $index_node_url) = getHyperEstraier_url($index_path);          my ($index_path, $index_node_url) = getHyperEstraier_url($hest_index_path);
202    
203          # open the database          # open the database
204          my $db;          my $db;
# Line 301  sub getBackupsNotBurned() { Line 297  sub getBackupsNotBurned() {
297    
298          my $dbh = get_dbh();          my $dbh = get_dbh();
299    
300          my $sql = q{          my $sql = q{
301                  SELECT                  SELECT
302                          backups.hostID AS hostID,                          backups.hostID AS hostID,
303                          hosts.name AS host,                          hosts.name AS host,
# Line 311  sub getBackupsNotBurned() { Line 307  sub getBackupsNotBurned() {
307                          backups.date AS date,                          backups.date AS date,
308                          backups.size AS size                          backups.size AS size
309                  FROM backups                  FROM backups
310                  WHERE id not in( select id from backups,archive_backup where archive_backup.backup_id=backups.id)                  INNER JOIN shares       ON backups.shareID=shares.ID
311                    INNER JOIN hosts        ON backups.hostID = hosts.ID
312                    LEFT OUTER JOIN archive_backup ON archive_backup.backup_id = backups.id AND archive_backup.backup_id IS NULL
313                    WHERE backups.size > 0
314                    GROUP BY
315                            backups.hostID,
316                            hosts.name,
317                            shares.name,
318                            backups.num,
319                            backups.shareid,
320                            backups.id,
321                            backups.type,
322                            backups.date,
323                            backups.size
324                  ORDER BY backups.date                  ORDER BY backups.date
325          };          };
326          my $sth = $dbh->prepare( $sql );          my $sth = $dbh->prepare( $sql );
# Line 365  sub displayBackupsGrid() Line 374  sub displayBackupsGrid()
374                                  if (e.checked)                                  if (e.checked)
375                                  {                                  {
376                                          var ret = e.name.match("fcb(.*)");                                          var ret = e.name.match("fcb(.*)");
377                                          suma += parseInt(eval("document.forma.fss"+ret[1]+".value"));                                          suma += parseInt(eval("document.forma.fss"+ret[1]+".value") || 0);
378                                                                                    
379                                  }                                  }
380                          }                          }

Legend:
Removed from v.121  
changed lines
  Added in v.124

  ViewVC Help
Powered by ViewVC 1.1.26