function mediafront_get_directories in MediaFront 7
Helper function to get the directories for media players.
3 calls to mediafront_get_directories()
- osmplayer_get_skins in players/
osmplayer/ osmplayer.module - osmplayer_get_templates in players/
osmplayer/ osmplayer.module - osmplayer_get_themes in players/
osmplayer/ osmplayer.module
File
- ./
mediafront.module, line 807
Code
function mediafront_get_directories($module, $player_path) {
$directories = array();
$base_directory = getcwd() . '/';
$base_directory .= drupal_get_path('module', $module) . '/';
$base_directory .= $player_path;
if (is_dir($base_directory) && ($handle = opendir($base_directory))) {
while (FALSE !== ($directory = readdir($handle))) {
if (strpos($directory, '.') === FALSE && strtolower($directory) !== 'cvs' && is_dir($base_directory . '/' . $directory)) {
$directories[$directory] = $directory;
}
}
closedir($handle);
}
return $directories;
}