function advagg_admin_delete_orphaned_aggregates_button in Advanced CSS/JS Aggregation 7.2
Scan CSS/JS advagg dir and remove file if there is no associated db record.
Related topics
1 string reference to 'advagg_admin_delete_orphaned_aggregates_button'
- advagg_admin_operations_form in ./
advagg.admin.inc - Form builder; Do advagg operations.
File
- ./
advagg.admin.inc, line 1767 - Admin page callbacks for the advanced CSS/JS aggregation module.
Code
function advagg_admin_delete_orphaned_aggregates_button() {
module_load_include('inc', 'advagg', 'advagg.cache');
// Remove aggregates that include missing files.
$deleted = advagg_delete_orphaned_aggregates();
if (empty($deleted[0]) && empty($deleted[1])) {
drupal_set_message(t('All files have an associated db record; nothing was deleted.'));
}
else {
drupal_set_message(t('Some files had no associated db record and could be safely deleted from the file system. @raw', array(
'@raw' => print_r($deleted[1], TRUE),
)));
}
}