diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-06-06 15:23:50 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-06-06 15:23:50 +0000 |
commit | d1dd262f831db070ad5c1e6e179d2e3099556383 (patch) | |
tree | f457a8b8498f9c31fd5c9e9dd589c443178425dd /phpBB/includes/functions_admin.php | |
parent | 8a09c0d75f1da62d40b71cb67f74de9ac005d5a7 (diff) | |
download | forums-d1dd262f831db070ad5c1e6e179d2e3099556383.tar forums-d1dd262f831db070ad5c1e6e179d2e3099556383.tar.gz forums-d1dd262f831db070ad5c1e6e179d2e3099556383.tar.bz2 forums-d1dd262f831db070ad5c1e6e179d2e3099556383.tar.xz forums-d1dd262f831db070ad5c1e6e179d2e3099556383.zip |
Various updates and fixes ... no doubt there are new bugs but where would the fun be without them?
git-svn-id: file:///svn/phpbb/trunk@4090 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index fc37f15cd8..8ce0975dc8 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -157,6 +157,33 @@ function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $incl return $rows; } +function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png') +{ + static $matches = array(); + + $dh = opendir($rootdir . $dir); + + while ($fname = readdir($dh)) + { + if (is_file($rootdir . $dir . '/' . $fname) && + preg_match('#\.' . $type . '$#i', $fname) && + filesize($rootdir . $dir . '/' . $fname)) + { + $matches[] = array('path' => $dir, 'file' => $fname); + } + else if ($fname != '.' && $fname != '..' && + !is_file($rootdir . $dir . '/' . $fname) && + !is_link($rootdir . $dir . '/' . $fname)) + { + filelist($rootdir, $dir . '/'. $fname, $type); + } + } + + closedir($dh); + + return $matches; +} + // Posts and topics manipulation function move_topics($topic_ids, $forum_id, $auto_sync = TRUE) { |