/[dehs]/trunk/dehs_pg.php
ViewVC logotype

Diff of /trunk/dehs_pg.php

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

revision 129 by atomo64-guest, Sat Apr 12 20:45:40 2008 UTC revision 131 by atomo64-guest, Fri Apr 18 23:47:44 2008 UTC
# Line 443  function db_popcon($initial='') { Line 443  function db_popcon($initial='') {
443  function dl_popcon() {  function dl_popcon() {
444      global $dirs,$dbconn;      global $dirs,$dbconn;
445    
446      $localtempfile=$dirs[popcon_dir] . "/popcon.db.new";      $localtempdir=$dirs[popcon_dir] . "/new";
447        dir_ctrl($localtempdir);
448    
449      $localfile=$dirs[popcon_dir] . "/popcon.db";      $localfile=$dirs[popcon_dir] . "/popcon.db";
450      $remotefile='http://qa.debian.org/data/popcon/popcon.db';      $remotefile='http://qa.debian.org/data/popcon/popcon.db';
451    
452      $return = 0;      $return = 0;
453      $output = null;      $output = null;
454      exec('/usr/bin/wget -qNc -O'.escapeshellarg($localtempfile).' ' . escapeshellarg($remotefile), $output, $return);      exec('cd ' . escapeshellarg($localtempdir) . ' && ' .
455             '/usr/bin/wget -qNc ' . escapeshellarg($remotefile), $output, $return);
456    
457      if ($return != 0) {      if ($return != 0) {
458          echo __FUNCTION__ . "wget exited with status $return!\n";          echo __FUNCTION__ . "wget exited with status $return!\n";
459          return false;          return false;
460      }      }
461    
462      return copy($localtempfile, $localfile);      return copy($localtempdir . '/popcon.db', $localfile);
463  }  }
464  function is_updated ($up_vers,$debian_vers, $dversionAsIs = false) {  function is_updated ($up_vers,$debian_vers, $dversionAsIs = false) {
465      if ($up_vers=='') return 1;      if ($up_vers=='') return 1;

Legend:
Removed from v.129  
changed lines
  Added in v.131

  ViewVC Help
Powered by ViewVC 1.1.5