hide_submit.install in Hide submit button 7
Same filename and directory in other branches
Hide the submit button after clicked to prevent/reduce duplicate postings.
Installation and update procedures are defined in this file
File
hide_submit.installView source
<?php
/**
* @file
* Hide the submit button after clicked to prevent/reduce duplicate postings.
*
* Installation and update procedures are defined in this file
*/
/**
* Implement hook install
*/
function hide_submit_install() {
// TODO update_sql has been removed. Use the database API for any schema or data changes.
// update_sql("UPDATE {system} SET weight = 10 WHERE type = 'module' AND name = 'hide_submit'");
drupal_set_message(st('Hide submit module installed.'));
}
/**
* Implement hook uninstall
*/
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.'));
}
Functions
Name![]() |
Description |
---|---|
hide_submit_install | Implement hook install |
hide_submit_uninstall | Implement hook uninstall |