Skip to content

Commit 570cd87

Browse files
author
Sascha Schumann
committed
Sync PHP_5 with PHP_4's pear
1 parent b336c38 commit 570cd87

File tree

5 files changed

+53
-12
lines changed

5 files changed

+53
-12
lines changed

pear/PEAR/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
if (getenv('PHP_PEAR_EXTENSION_DIR')) {
7474
define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR'));
7575
} else {
76-
if (!ini_get('extension_dir')) {
76+
if (ini_get('extension_dir')) {
7777
define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir'));
7878
} elseif (defined('PEAR_EXTENSION_DIR') && @is_dir(PEAR_EXTENSION_DIR)) {
7979
define('PEAR_CONFIG_DEFAULT_EXT_DIR', PEAR_EXTENSION_DIR);

pear/PEAR/Registry.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,23 @@ function _assertStateDir()
155155
*/
156156
function _packageFileName($package)
157157
{
158-
return "{$this->statedir}/{$package}.reg";
158+
if (is_file("{$this->statedir}/{$package}.reg")) {
159+
return "{$this->statedir}/{$package}.reg";
160+
}
161+
/**
162+
* Iterate through the directory to find the matching
163+
* registry file, even if it has been provided in
164+
* another case (foobar vs. FooBar)
165+
*/
166+
$package = strtolower($package);
167+
if ($handle = opendir($this->statedir)) {
168+
while (false !== ($file = readdir($handle))) {
169+
if (strtolower($file) == $package . ".reg") {
170+
return "{$this->statedir}/{$file}";
171+
}
172+
}
173+
closedir($handle);
174+
}
159175
}
160176

161177
// }}}

pear/package-Archive_Tar.xml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<description>This class provides handling of tar files in PHP.
77
It supports creating, listing, extracting and adding to tar files.
88
Gzip support is available if PHP has the zlib extension built-in or
9-
loaded.
9+
loaded. Bz2 compression is also supported with the bz2 extension loaded.
1010
</description>
1111
<license>PHP License</license>
1212
<maintainers>
@@ -24,11 +24,12 @@ loaded.
2424
</maintainer>
2525
</maintainers>
2626
<release>
27-
<version>0.9</version>
28-
<date>2002-05-27</date>
29-
<notes>
30-
* Auto-detect gzip'ed files
31-
</notes>
27+
<version>1.1</version>
28+
<date>2003-05-28</date>
29+
<notes>* Add support for BZ2 compression
30+
* Add support for add and extract without using temporary files : methods addString() and extractInString()
31+
32+
</notes>
3233
<state>stable</state>
3334
<filelist>
3435
<dir name="Archive">
@@ -38,6 +39,30 @@ loaded.
3839
</filelist>
3940
</release>
4041
<changelog>
42+
<release>
43+
<version>1.0</version>
44+
<date>2003-01-24</date>
45+
<notes>Change status to stable</notes>
46+
<state>stable</state>
47+
<filelist>
48+
<dir name="Archive">
49+
<file role="php" name="Tar.php"/>
50+
</dir>
51+
<file role="doc" name="docs/Archive_Tar.txt" baseinstalldir="/"/>
52+
</filelist>
53+
</release>
54+
<release>
55+
<version>0.10-b1</version>
56+
<date>2003-01-08</date>
57+
<notes>Add support for long filenames (greater than 99 characters)</notes>
58+
<state>beta</state>
59+
</release>
60+
<release>
61+
<version>0.9</version>
62+
<date>2002-05-27</date>
63+
<notes>Auto-detect gzip'ed files</notes>
64+
<state>stable</state>
65+
</release>
4166
<release>
4267
<version>0.4</version>
4368
<date>2002-05-20</date>

pear/package.dtd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Id: package.dtd,v 1.27.4.5 2003-06-17 17:13:17 pajoye Exp $
2+
$Id: package.dtd,v 1.27.4.5.2.1 2003-06-24 01:59:17 sas Exp $
33

44
This is the PEAR package description, version 1.0.
55
It should be used with the informal public identifier:

pear/scripts/pear.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ REM PHP version 4.0
55
REM ----------------------------------------------------------------------
66
REM Copyright (c) 1997-2002 The PHP Group
77
REM ----------------------------------------------------------------------
8-
REM This source file is subject to version 2.02 of the PHP license,
8+
REM This source file is subject to version 3.0 of the PHP license,
99
REM that is bundled with this package in the file LICENSE, and is
1010
REM available at through the world-wide-web at
11-
REM http://www.php.net/license/2_02.txt.
11+
REM http://www.php.net/license/3_0.txt.
1212
REM If you did not receive a copy of the PHP license and are unable to
1313
REM obtain it through the world-wide-web, please send a note to
1414
REM license@php.net so we can mail you a copy immediately.
1515
REM ----------------------------------------------------------------------
1616
REM Authors: Alexander Merz (alexmerz@php.net)
1717
REM ----------------------------------------------------------------------
1818
REM
19-
REM $Id: pear.bat,v 1.14 2003/04/03 23:21:30 ssb Exp $
19+
REM $Id$
2020

2121
REM change this lines to match the paths of your system
2222
REM -------------------

0 commit comments

Comments
 (0)