1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Commit Graph

115 Commits

Author SHA1 Message Date
Ilia Alshanetsky 2d0f432490 Added scandir() function, which allows quick retrieval of all files &
directories within the specified path and sort the output in alphabetical
or reverse alphabetical order.
2003-01-28 01:48:57 +00:00
Edin Kadribasic c7441b2379 Fixed bug #21597 (made glob() understand windows paths) 2003-01-27 16:29:47 +00:00
Sebastian Bergmann b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Melvyn Sopacua 0764c3101b Verify if gl_pathv is not NULL, which it is, when GLOB_NOMATCH isn't
supported and there are no matches.

# BSDi/Mac OSX are affected.
2002-12-23 18:33:46 +00:00
foobar dadfd6e94a ws fix 2002-11-15 07:21:33 +00:00
Stig Bakken bdeb45b335 Added PATH_SEPARATOR constant 2002-11-14 22:50:01 +00:00
John Coggeshall 253cecd43a Added GLOB_ONLYDIR and GLOB_BRACE for compatiable systems for the glob()
function.

Modified the layout and some minor logic in the experimental webHarness()
test class

Added Whitespace accidently to array.c :)
2002-11-13 13:31:33 +00:00
Rasmus Lerdorf ef9b51bcb0 readdir() was returning NULL instead of FALSE when used on an invalid
directory handle.  If someone forgot to check (as someone here did) that
the opendir() succeeded, and then followed the documented usage by checking
readdir()!==FALSE things would go awry.  The ZEND_FETCH_RESOURCE macro
explicitly does a RETURN_NULL on failure which is not what we want in this
case, so work around it.  No need to change it for the OO case since the
object is not created if the opendir fails.
2002-10-07 16:46:38 +00:00
Rasmus Lerdorf 5610e348ec Kill a few more warnings 2002-10-04 18:03:29 +00:00
Yasuo Ohgaki ec340e039a It must be GLOB_NOCHECK instead of GLOB_NOMATCH.
GLOB_NOMATCH does not make sense at all.
2002-09-28 09:14:45 +00:00
foobar 08d3ad407c ws 2002-09-27 13:15:56 +00:00
Hartmut Holzgraefe 5797668cc3 /tmp/cvsmLUuXQ 2002-09-27 12:40:31 +00:00
Yasuo Ohgaki 7dae78b7f5 No need to define GLOB_NOMATCH. 2002-09-27 11:44:42 +00:00
Jan Lehnardt 1f227cd2e3 - GLOB_NOMATCH and GLOB_NOESCAPE are only defined in win32/glob.h
- fixes build on FreeBSD 4.6
2002-09-26 11:19:26 +00:00
Yasuo Ohgaki 7d87babada Remove dup 2002-09-26 07:55:59 +00:00
Sebastian Bergmann f5426838f9 Fix ZTS build. Fix warning. 2002-09-26 07:30:16 +00:00
Hartmut Holzgraefe 1a2df34d9d fix windows build 2002-09-26 07:15:33 +00:00
Hartmut Holzgraefe 0d815b5713 glob should now be ZTS/open_basedir/safe_mode aware (finally) 2002-09-26 00:27:52 +00:00
foobar a254506a3c ws fix 2002-09-11 14:21:39 +00:00
Marcus Boerger 149ad05b4f php_error_docref
#New conversion available at: http://docref.txt.marcus-boerger.de
2002-08-24 01:19:28 +00:00
Rasmus Lerdorf b025bb1023 Missing proto 2002-08-13 05:08:47 +00:00
Rasmus Lerdorf d820c177bf dir() returns an instantiated object, not a class. 2002-08-13 04:24:15 +00:00
Edin Kadribasic a55c1228ed Fixed bug #14657 (patch by Steph Fox) 2002-07-29 13:13:50 +00:00
Derick Rethans 728f2de442 Unify error messages 2002-07-08 12:52:22 +00:00
Edin Kadribasic 544694255a Added glob() support for windows. 2002-05-19 14:32:24 +00:00
Markus Fischer 25a616d7aa - Fix portability issues with empty results on Linux and FreeBSD, add safe_mode
check and simplify code.
# Hartmut, what was the VCWD check for ?!
2002-05-18 13:31:31 +00:00
Wez Furlong b10b24d50c Always initialize wrappers, regardless of PG(allow_url_fopen).
Add is_url field to wrapper structure; the stream wrapper openers
will disallow opening is is_url && !PG(allow_url_fopen).
Add infrastructure for stat($url) and opendir($url).
Tidy up/centralize code that locates and instantiates wrappers for the
various operations.
Implement opendir for plain files.
Make the PHP opendir and dir functions use the streams implementations.
Add modelines for syntax highlighting the pear scripts in vim
2002-04-16 22:14:27 +00:00
Hartmut Holzgraefe b00d9a5b2c added fnmatch() and glob() functions
could someone please check if i got the virtual dir stuff right?
2002-03-21 19:18:13 +00:00
James E. Flemer 01505de0b1 (PHP opendir) Changed CHECKUID_ALLOW_ONLY_DIR to CHECKUID_ALLOW_ONLY_FILE
so that relative paths (vs absolute) work correctly.
2002-03-06 18:31:33 +00:00
James E. Flemer 787ce372b9 (PHP opendir) Added safe_mode checks on path.
@- Added safe_mode checks for opendir(). (jflemer)
2002-03-03 20:46:57 +00:00
Sebastian Bergmann 90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Thies C. Arntzen 21cc717bac protos fixes by Wolfgang Drews 2002-01-03 06:57:22 +00:00
Zak Greant f01745896f chdir: corrected proto, converted to zend_parse_parameters 2001-12-30 10:13:08 +00:00
Zak Greant 59a45acca6 chroot: corrected prototype, converted to zend_parse_parameters 2001-12-30 09:50:41 +00:00
Sebastian Bergmann 38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Jeroen van Wolffelaar c033288573 Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know. 2001-09-25 21:58:48 +00:00
foobar 5275b60398 Enable chroot() only if SAPI is CGI. 2001-09-12 02:07:46 +00:00
Derick Rethans 78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Zeev Suraski c0404f4631 Whitespace 2001-08-11 17:03:37 +00:00
Zeev Suraski bc42c37513 More TSRMLS_FETCH work. Got it under 400 now. 2001-07-31 06:28:05 +00:00
Zeev Suraski aa1772ca72 More TSRMLS_FETCH annihilation 2001-07-31 05:44:11 +00:00
Zeev Suraski 1c25b8dd53 Avoid TSRMLS_FETCH()'s, and clean up a bit of stale extern's and layout on the way 2001-07-30 01:56:43 +00:00
Andi Gutmans b99a590be3 - More object macros 2001-07-29 08:14:29 +00:00
Zeev Suraski d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Zeev Suraski fe6f8712a4 - Get rid of ELS_*(), and use TSRMLS_*() instead.
- Move to the new ts_allocate_id() API
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:16:41 +00:00
James E. Flemer 771e3e498f o Fixed Bug #12121: chdir and safe_mode
- [ main/safe_mode.h ] added new checkuid mode:
    CHECKUID_ALLOW_ONLY_FILE: skips directory check if file check
	fails

  - [ ext/standard/dir.c ] changed php_checkuid() to use
    CHECKUID_ALLOW_ONLY_FILE instead of CHECKUID_ALLOW_ONLY_DIR

  - [ main/safe_mode.c ] added code for new checkuid mode

o Fixed Bug #12119: safe mode owner check can be bypassed with symlink
  - [ main/safe_mode.c ] use VCWD_REALPATH to resolve destination
    of symlink before trimming filename

o New Feature: safe_mode_include_dir (php.ini directive)
  - Allows bypassing UID/GID checks when including files
    from the directory in safe_mode_include_dir and its
	subdirectories. (safe_mode must be on, directory must
	also be in include_path or full path must be used when
	including)

o Fixed Feature: safe_mode_gid (php.ini directive)
  - Correctly check (and report) UID/GID bits on directories

o Changed include() fall back to scripts cwd implementation
  - CWD added to the (local) search path in php_fopen_with_path()
    instead of seperate case. [ main/fopen_wrappers.c ]
2001-07-13 18:21:21 +00:00
Thies C. Arntzen 03ae0d775b add PLS_FETCH(); 2001-06-20 15:46:47 +00:00
Rasmus Lerdorf 94897efc36 Fix for #11570 2001-06-20 14:47:26 +00:00
Rasmus Lerdorf 81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf 25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00