cvs: pearweb /public_html get

From: Date: Tue, 02 Apr 2002 13:52:15 +0000
Subject: cvs: pearweb /public_html get
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-2992@lists.php.net to get a copy of this message
ssb Tue Apr 2 08:52:15 2002 EDT Modified files: /pearweb/public_html get Log: * support decompression when getting releases by package name too: http://pear.php.net/get/Package?uncompress=on Index: pearweb/public_html/get diff -u pearweb/public_html/get:1.8 pearweb/public_html/get:1.9 --- pearweb/public_html/get:1.8 Tue Apr 2 08:38:21 2002 +++ pearweb/public_html/get Tue Apr 2 08:52:15 2002 @@ -43,23 +43,29 @@ $dbh = DB::connect(PEAR_DATABASE_DSN, array('persistent' => true)); } -if (!isset($PATH_INFO) || $PATH_INFO == '/') { +if (!isset($_SERVER['PATH_INFO']) || $_SERVER['PATH_INFO'] == '/') { PEAR::raiseError('no package selected'); } -$opts = explode('/', $PATH_INFO); +$opts = explode('/', $_SERVER['PATH_INFO']); $ok = false; +if (isset($_GET['uncompress']) && in_array($_GET['uncompress'], array('1', 'yes', 'on'))) { + $uncompress = true; +} else { + $uncompress = false; +} +@error_log("get: uncompress=$_GET[uncompress] PATH_INFO=$_SERVER[PATH_INFO]", 0); switch (sizeof($opts)) { case 2: { if (preg_match('/^([a-zA-Z0-9_]+)-(.*)\.(tar|tgz)$/', $opts[1], $matches)) { list(, $package, $version) = $matches; - $ok = release::HTTPdownload($package, $version, $opts[1]); + $ok = release::HTTPdownload($package, $version, $opts[1], $uncompress); } else { - $ok = release::HTTPdownload($opts[1]); + $ok = release::HTTPdownload($opts[1], null, null, $uncompress); } break; } case 3: { - $ok = release::HTTPdownload($opts[1], $opts[2]); + $ok = release::HTTPdownload($opts[1], $opts[2], null, $uncompress); break; } default: {

« previous php.pear.cvs (#2992) next »