thetaphi Fri Apr 15 13:13:55 2005 EDT Modified files: /php-src NEWS /php-src/ext/standard md5.c sha1.c Log: Remove include_path support from md5_file/sha1_file again http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1869&r2=1.1870&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1869 php-src/NEWS:1.1870 --- php-src/NEWS:1.1869 Sun Apr 10 17:45:25 2005 +++ php-src/NEWS Fri Apr 15 13:13:52 2005 @@ -47,6 +47,7 @@ . pg_result_error_field() - highly detailed error information, most importantly the SQLSTATE error code. . pg_set_error_verbosity() - set verbosity of errors. +- Changed sha1_file() / md5_file() to use streams instead of low level IO (Uwe) - Added optional fifth parameter "count" to preg_replace_callback() and preg_replace() to count the number of replacements made. FR #32275. (Andrey) - Added optional third parameter "charlist" to str_word_count() which http://cvs.php.net/diff.php/php-src/ext/standard/md5.c?r1=1.37&r2=1.38&ty=u Index: php-src/ext/standard/md5.c diff -u php-src/ext/standard/md5.c:1.37 php-src/ext/standard/md5.c:1.38 --- php-src/ext/standard/md5.c:1.37 Fri Apr 15 10:29:32 2005 +++ php-src/ext/standard/md5.c Fri Apr 15 13:13:54 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: md5.c,v 1.37 2005/04/15 14:29:32 thetaphi Exp $ */ +/* $Id: md5.c,v 1.38 2005/04/15 17:13:54 thetaphi Exp $ */ /* * md5.c - Copyright 1997 Lachlan Roche @@ -67,14 +67,13 @@ } /* }}} */ -/* {{{ proto string md5_file(string filename [, bool raw_output [, bool use_include_path]]) +/* {{{ proto string md5_file(string filename [, bool raw_output]) Calculate the md5 hash of given filename */ PHP_NAMED_FUNCTION(php_if_md5_file) { char *arg; int arg_len; zend_bool raw_output = 0; - zend_bool use_include_path = 0; char md5str[33]; unsigned char buf[1024]; unsigned char digest[16]; @@ -82,12 +81,11 @@ int n; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|bb", &arg, &arg_len, &raw_output, &use_include_path) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, &raw_output) == FAILURE) { return; } - stream = php_stream_open_wrapper(arg, "rb", - (use_include_path ? USE_PATH : 0) | REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL); + stream = php_stream_open_wrapper(arg, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL); if (!stream) { RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/standard/sha1.c?r1=1.11&r2=1.12&ty=u Index: php-src/ext/standard/sha1.c diff -u php-src/ext/standard/sha1.c:1.11 php-src/ext/standard/sha1.c:1.12 --- php-src/ext/standard/sha1.c:1.11 Fri Apr 15 10:29:32 2005 +++ php-src/ext/standard/sha1.c Fri Apr 15 13:13:54 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sha1.c,v 1.11 2005/04/15 14:29:32 thetaphi Exp $ */ +/* $Id: sha1.c,v 1.12 2005/04/15 17:13:54 thetaphi Exp $ */ #include "php.h" @@ -67,14 +67,13 @@ /* }}} */ -/* {{{ proto string sha1_file(string filename [, bool raw_output [, bool use_include_path]]) +/* {{{ proto string sha1_file(string filename [, bool raw_output]) Calculate the sha1 hash of given filename */ PHP_FUNCTION(sha1_file) { char *arg; int arg_len; zend_bool raw_output = 0; - zend_bool use_include_path = 0; char sha1str[41]; unsigned char buf[1024]; unsigned char digest[20]; @@ -82,12 +81,11 @@ int n; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|bb", &arg, &arg_len, &raw_output, &use_include_path) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, &raw_output) == FAILURE) { return; } - stream = php_stream_open_wrapper(arg, "rb", - (use_include_path ? USE_PATH : 0) | REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL); + stream = php_stream_open_wrapper(arg, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL); if (!stream) { RETURN_FALSE; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php