You are here

function hide_submit_uninstall in Hide submit button 7

Same name and namespace in other branches
  1. 5 hide_submit.install \hide_submit_uninstall()
  2. 6 hide_submit.install \hide_submit_uninstall()
  3. 7.2 hide_submit.install \hide_submit_uninstall()

Implement hook uninstall

File

./hide_submit.install, line 23
Hide the submit button after clicked to prevent/reduce duplicate postings.

Code

function hide_submit_uninstall() {

  // Delete any variables that have been set.
  $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'hide_submit_%'")
    ->fetchAll();
  while ($row = array_pop($result)) {
    variable_del($row->name);
  }
  drupal_set_message(st('Hide submit module variables deleted.<br />To completely remove this module, delete the hide_submit directory from your files directory.'));
}