function weight_disable in Weight 5
Same name and namespace in other branches
- 6 weight.admin.inc \weight_disable()
- 7 weight.admin.inc \weight_disable()
This function is not called from the module It is here to show how to set the database back to "normal" when deactivating the weight.module
1 call to weight_disable()
File
- ./
weight.module, line 352
Code
function weight_disable() {
db_query('UPDATE {node} SET sticky = 1 WHERE sticky > 0');
db_query('UPDATE {node} SET sticky = 0 WHERE sticky <= 0');
drupal_set_message(t('All node weights have been removed. Please deactivate weight module now.'));
}