function pm_icon_recache in Drupal PM (Project Management) 7.2
Same name and namespace in other branches
- 8 pm.module \pm_icon_recache()
- 7.3 includes/pm.icon.inc \pm_icon_recache()
- 7 pm.module \pm_icon_recache()
Forces a recache of Project Management icons.
File
- ./
pm.module, line 581 - Main module file for the Project Management module.
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;
}