From dbd08fead81d8ee2bbbe64b23010bc8eaf3fed31 Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 15 Mar 2013 10:05:15 +0000 Subject: bug 2867 fixed: move get_dirs function to a function file, so that it can be used in plugin LocalFiles Editor (see r18629) git-svn-id: http://piwigo.org/svn/branches/2.5@21566 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/extend_for_templates.php | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'admin/extend_for_templates.php') diff --git a/admin/extend_for_templates.php b/admin/extend_for_templates.php index cb2845adc..0faced402 100644 --- a/admin/extend_for_templates.php +++ b/admin/extend_for_templates.php @@ -113,32 +113,6 @@ $eligible_templates = array( $flip_templates = array_flip($eligible_templates); -/** - * 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; -} - $available_templates = array_merge( array('N/A' => '----------'), get_dirs(PHPWG_ROOT_PATH.'themes')); -- cgit v1.2.3