Ignore:
Timestamp:
Mar 15, 2013, 11:05:15 AM (11 years ago)
Author:
plg
Message:

bug 2867 fixed: move get_dirs function to a function file, so that it can be used in plugin LocalFiles Editor (see r18629)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/admin/extend_for_templates.php

    r19703 r21566  
    114114$flip_templates = array_flip($eligible_templates);
    115115
    116 /**
    117  * returns an array contening sub-directories, excluding ".svn"
    118  *
    119  * @param string $dir
    120  * @return array
    121  */
    122 function get_dirs($directory)
    123 {
    124   $sub_dirs = array();
    125   if ($opendir = opendir($directory))
    126   {
    127     while ($file = readdir($opendir))
    128     {
    129       if ($file != '.'
    130           and $file != '..'
    131           and is_dir($directory.'/'.$file)
    132           and $file != '.svn')
    133       {
    134         array_push($sub_dirs, $file);
    135       }
    136     }
    137     closedir($opendir);
    138   }
    139   return $sub_dirs;
    140 }
    141 
    142116$available_templates = array_merge(
    143117  array('N/A' => '----------'),
Note: See TracChangeset for help on using the changeset viewer.