You are here

function css_injector_uninstall in CSS Injector 7

Same name and namespace in other branches
  1. 6 css_injector.install \css_injector_uninstall()
  2. 7.2 css_injector.install \css_injector_uninstall()

Implements hook_uninstall().

File

./css_injector.install, line 96
Install, update and uninstall functions for the css_injector module.

Code

function css_injector_uninstall() {
  cache_clear_all('css_injector:*', 'cache', TRUE);
  $rules = db_query("SELECT * FROM {css_injector_rule}", array(), array(
    'fetch' => PDO::FETCH_ASSOC,
  ))
    ->fetchAllAssoc('crid');
  module_load_include('module', 'css_injector');
  foreach ($rules as $crid => $rule) {
    file_unmanaged_delete(_css_injector_rule_uri($crid));
  }
  db_drop_table('css_injector_rule');
}