diff options
author | Pierre Joye <pajoye@php.net> | 2002-08-25 18:21:10 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2002-08-25 18:21:10 +0000 |
commit | 19dacf18a1367b1101c314e3e22d55d1c703bc23 (patch) | |
tree | 7e04e311fd003f8d429c96e5ecf109feeb98ab5d /pear | |
parent | 9870f455ffebb25a7245a36351cebff9e1b325c0 (diff) | |
download | php-git-19dacf18a1367b1101c314e3e22d55d1c703bc23.tar.gz |
Remove $_ENV usages
Remove $env arg in all functions and uses getenv instead
Note only 'USER' env var is used
Diffstat (limited to 'pear')
-rw-r--r-- | pear/scripts/pearize.in | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pear/scripts/pearize.in b/pear/scripts/pearize.in index 0a9beec459..490b49d1e8 100644 --- a/pear/scripts/pearize.in +++ b/pear/scripts/pearize.in @@ -1,22 +1,22 @@ #!@prefix@/bin/php -Cq <?php // -*- PHP -*- -main($argc, $argv, $_ENV); +main($argc, $argv); // {{{ main() -function main(&$argc, &$argv, &$env) +function main(&$argc, &$argv) { global $debug; $debug = false; - $file = check_options($argc, $argv, $env); + $file = check_options($argc, $argv); parse_package_file($file); - make_makefile_in($env); + make_makefile_in(); } // }}} // {{{ check_options() -function check_options($argc, $argv, $env) +function check_options($argc, $argv) { global $debug; array_shift($argv); @@ -47,7 +47,7 @@ function check_options($argc, $argv, $env) // }}} // {{{ make_makefile_in() -function make_makefile_in(&$env) +function make_makefile_in() { global $libdata, $debug; if (sizeof($libdata) > 1) { @@ -66,7 +66,7 @@ function make_makefile_in(&$env) die("Could not create Makefile.in in current directory.\n"); } - $who = $env["USER"]; + $who = getenv("USER"); $when = gmdate('Y-m-d h:i'); fwrite($wp, "# This file was generated by `pearize' by $who at $when GMT\n\n"); @@ -95,7 +95,7 @@ function parse_package_file($file) { global $in_file, $curlib, $curelem, $libdata, $cdata; global $currinstalldir, $baseinstalldir; - + $in_file = false; $curlib = ''; $curelem = ''; @@ -103,12 +103,12 @@ function parse_package_file($file) $cdata = array(); $baseinstalldir = array(); $currinstalldir = array(); - + $xp = xml_parser_create(); xml_set_element_handler($xp, "start_handler", "end_handler"); xml_set_character_data_handler($xp, "cdata_handler"); xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false); - + $fp = @fopen($file, "r"); if (!is_resource($fp)) { die("Could not open file `$file'.\n"); |