Project

General

Profile

« Previous | Next » 

Revision 1329

Added by Dietmar over 14 years ago

Validation fix in preference

View differences:

functions.php
57 57
	}
58 58
}
59 59

  
60
// Function to open a directory and add to a dir list
61
function directory_list($directory, $show_hidden = false)
60
/*
61
 * returns a recursive list of all subdirectories from a given directory
62
 * @access  public
63
 * @param   string  $directory: from this dir the recursion will start
64
 * @param   bool    $show_hidden:  if set to TRUE also hidden dirs (.dir) will be shown
65
 * @return  array
66
 * example:
67
 *  /srv/www/httpdocs/wb/media/a/b/c/
68
 *  /srv/www/httpdocs/wb/media/a/b/d/
69
 * directory_list('/srv/www/httpdocs/wb/media/') will return:
70
 *  /a
71
 *  /a/b
72
 *  /a/b/c
73
 *  /a/b/d
74
 */
75
 function directory_list($directory, $show_hidden = false)
62 76
{
63 77
	$result_list = array();
64 78
	if (is_dir($directory))

Also available in: Unified diff