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/include/functions.php

    r21070 r21566  
    24572457  }
    24582458}
     2459
     2460/**
     2461 * returns an array contening sub-directories, excluding ".svn"
     2462 *
     2463 * @param string $dir
     2464 * @return array
     2465 */
     2466function get_dirs($directory)
     2467{
     2468  $sub_dirs = array();
     2469  if ($opendir = opendir($directory))
     2470  {
     2471    while ($file = readdir($opendir))
     2472    {
     2473      if ($file != '.'
     2474          and $file != '..'
     2475          and is_dir($directory.'/'.$file)
     2476          and $file != '.svn')
     2477      {
     2478        array_push($sub_dirs, $file);
     2479      }
     2480    }
     2481    closedir($opendir);
     2482  }
     2483  return $sub_dirs;
     2484}
    24592485?>
Note: See TracChangeset for help on using the changeset viewer.