You are here

function advagg_admin_remove_missing_files_from_db_button in Advanced CSS/JS Aggregation 7.2

Scan for missing files and remove the associated entries in the database.

Related topics

1 string reference to 'advagg_admin_remove_missing_files_from_db_button'
advagg_admin_operations_form in ./advagg.admin.inc
Form builder; Do advagg operations.

File

./advagg.admin.inc, line 1785
Admin page callbacks for the advanced CSS/JS aggregation module.

Code

function advagg_admin_remove_missing_files_from_db_button() {
  module_load_include('inc', 'advagg', 'advagg.cache');

  // Remove aggregates that include missing files.
  $deleted = advagg_remove_missing_files_from_db();
  if (empty($deleted)) {
    drupal_set_message(t('No missing files found or they could not be safely cleared out of the database.'));
  }
  else {
    drupal_set_message(t('Some missing files were found and could be safely cleared out of the database. <pre> @raw </pre>', array(
      '@raw' => print_r($deleted, TRUE),
    )));
  }
}