function pm_icon_recache in Drupal PM (Project Management) 7.3
Same name and namespace in other branches
- 8 pm.module \pm_icon_recache()
- 7 pm.module \pm_icon_recache()
- 7.2 pm.module \pm_icon_recache()
Forces a recache of Project Management icons.
File
- includes/
pm.icon.inc, line 152 - Icon handling by Drupal PM.
Code
function pm_icon_recache() {
$available = array();
$dir = variable_get('pm_icons_path', drupal_get_path('module', 'pm') . '/icons');
$files = scandir($dir);
foreach ($files as $file) {
$available[] = $file;
}
cache_set('pm:icons', $available, 'cache', CACHE_TEMPORARY);
$available = cache_get('pm:icons');
return $available;
}