summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@php.net>2004-02-29 15:58:17 +0000
committerAnil Madhavapeddy <avsm@php.net>2004-02-29 15:58:17 +0000
commitb49e8fe865e6333bca1323cf5d9464de4bf540ef (patch)
tree9bc1b367f0ad5f68307e48f5b86fddb05aa6fffd
parentdeba01c64e019bac554fa5c55368eafefd831c2c (diff)
downloadphp-git-b49e8fe865e6333bca1323cf5d9464de4bf540ef.tar.gz
Move the _prependPath function into PEAR_Downloader from PEAR_Installer,
as PEAR_Downloader uses it (and PEAR_Installer inherits PEAR_Downloader). Unbreaks 'pear install -R'
-rw-r--r--pear/PEAR/Downloader.php14
-rw-r--r--pear/PEAR/Installer.php15
2 files changed, 14 insertions, 15 deletions
diff --git a/pear/PEAR/Downloader.php b/pear/PEAR/Downloader.php
index 9bdec76663..56182d2b66 100644
--- a/pear/PEAR/Downloader.php
+++ b/pear/PEAR/Downloader.php
@@ -613,6 +613,20 @@ class PEAR_Downloader extends PEAR_Common
}
// }}}
+ // {{{ _prependPath($path, $prepend)
+
+ function _prependPath($path, $prepend)
+ {
+ if (strlen($prepend) > 0) {
+ if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) {
+ $path = $prepend . substr($path, 2);
+ } else {
+ $path = $prepend . $path;
+ }
+ }
+ return $path;
+ }
+ // }}}
// {{{ pushError($errmsg, $code)
/**
diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php
index e68e634ea8..f998d4c751 100644
--- a/pear/PEAR/Installer.php
+++ b/pear/PEAR/Installer.php
@@ -540,21 +540,6 @@ class PEAR_Installer extends PEAR_Downloader
}
// }}}
- // {{{ _prependPath($path, $prepend)
-
- function _prependPath($path, $prepend)
- {
- if (strlen($prepend) > 0) {
- if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) {
- $path = $prepend . substr($path, 2);
- } else {
- $path = $prepend . $path;
- }
- }
- return $path;
- }
-
- // }}}
// {{{ download()
/**