From 98a447ac363d00d856c18f34ffbd4d14cad51eb3 Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Thu, 7 Jan 2010 18:14:28 +0000 Subject: changing the second parameter in directory_map to an integer that controls recursion depth. A depth of 0 is fully recursive to maintain backward compatibility with the boolean values. --- user_guide/changelog.html | 1 + user_guide/helpers/directory_helper.html | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'user_guide') diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 93a7025f0..4758d49bc 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -81,6 +81,7 @@ SVN Revision:

  • Deprecated the dohash() function in favour of do_hash() for naming consistency.
  • Non-backwards compatible change made to get_dir_file_info() in the File Helper. No longer recurses by default so as to encourage responsible use (this function can cause server performance issues when used without caution).
  • +
  • Modified the second parameter of directory_map() in the Directory Helper to accept an integer to specify recursion depth.
  • diff --git a/user_guide/helpers/directory_helper.html b/user_guide/helpers/directory_helper.html index eae2c52ec..3b70799d0 100644 --- a/user_guide/helpers/directory_helper.html +++ b/user_guide/helpers/directory_helper.html @@ -78,10 +78,10 @@ and builds an array representation of it and all its contained files. Example:Note: Paths are almost always relative to your main index.php file.

    -

    Sub-folders contained within the directory will be mapped as well. If you wish to map -only the top level directory set the second parameter to true (boolean):

    +

    Sub-folders contained within the directory will be mapped as well. If you wish to control the recursion depth, +you can do so using the second parameter (integer). A depth of 1 will only map the top level directory:

    -$map = directory_map('./mydirectory/', TRUE); +$map = directory_map('./mydirectory/', 1);

    By default, hidden files will not be included in the returned array. To override this behavior, you may set a third parameter to true (boolean):

    -- cgit v1.2.3-24-g4f1b