aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 957ef086e..4e53d09e6 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -2456,4 +2456,30 @@ function delete_element_derivatives($infos, $type='all')
}
}
}
+
+/**
+ * returns an array contening sub-directories, excluding ".svn"
+ *
+ * @param string $dir
+ * @return array
+ */
+function get_dirs($directory)
+{
+ $sub_dirs = array();
+ if ($opendir = opendir($directory))
+ {
+ while ($file = readdir($opendir))
+ {
+ if ($file != '.'
+ and $file != '..'
+ and is_dir($directory.'/'.$file)
+ and $file != '.svn')
+ {
+ array_push($sub_dirs, $file);
+ }
+ }
+ closedir($opendir);
+ }
+ return $sub_dirs;
+}
?> \ No newline at end of file