cvs: php4 /pear/PEAR Installer.php

From: Date: Wed, 02 Jan 2002 17:12:26 +0000
Subject: cvs: php4 /pear/PEAR Installer.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1793@lists.php.net to get a copy of this message
ssb Wed Jan 2 12:12:26 2002 EDT Modified files: /php4/pear/PEAR Installer.php Log: * support "pear-get install XML_RPC" Index: php4/pear/PEAR/Installer.php diff -u php4/pear/PEAR/Installer.php:1.33 php4/pear/PEAR/Installer.php:1.34 --- php4/pear/PEAR/Installer.php:1.33 Tue Dec 25 22:57:47 2001 +++ php4/pear/PEAR/Installer.php Wed Jan 2 12:12:26 2002 @@ -18,7 +18,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Installer.php,v 1.33 2001/12/26 03:57:47 cox Exp $ +// $Id: Installer.php,v 1.34 2002/01/02 17:12:26 ssb Exp $ require_once 'PEAR/Common.php'; require_once 'PEAR/Registry.php'; @@ -167,7 +167,7 @@ * @return bool true if successful, false if not */ - function install($pkgfile, $options = array()) + function install($pkgfile, $options = array(), $config = null) { // recognized options: // - register_only : update registry but don't install files @@ -181,6 +181,16 @@ if (preg_match('#^(http|ftp)://#', $pkgfile)) { $need_download = true; } elseif (!@is_file($pkgfile)) { + if (preg_match('/^[A-Z][A-Za-z0-9_]+$/', $pkgfile)) { + // valid package name + if ($config === null) { + $pkgfile = "http://pear.php.net/get/$pkgfile"; + } else { + $pkgfile = "http://" . $config->get('master_server') . + "/get/$pkgfile"; + } + $need_download = true; + } return $this->raiseError("could not open the package file: $pkgfile"); } @@ -328,6 +338,7 @@ } // }}} + // {{{ checkDeps() function checkDeps(&$pkginfo) { @@ -345,6 +356,8 @@ } return false; } + + // }}} } ?>

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