Task Description:

This isn't specific to reindex, but to a multitude of modules.

Check that all of the listed modules below have .install files, that they have a hook_uninstall. and that the hook_uninstall deletes all tables and variables (using variable_del). It should delete any tables that are created in hook_install. And it should delete any variables that are created. Variables are usually created through the call to variable_set, but they can also be created through the settings forms (look for the function that defines system_settings_form).

You don't need a local sandbox, but having one would be best. It's always best to run the code before submitting a patch. But since this is a fairly repetitive task, and in most cases you'll be creating a new .install file, the local sandbox isn't a "hard" requirement.

A sample hook_uninstall, taken from phpass, is:

function phpass_uninstall() {
  db_query("DROP TABLE {user_phpass}");
  variable_del('user_hash_method');
  variable_del('user_hash_strength');
  variable_del('user_hash_portable');
}

Before you start on any one module, you should check the modules issue queue to make sure that a patch hasn't been submitted. Please add a comment to this issue when you complete a module. I'll also try to check them off in the module description, as the issues are marked RTBC or Fixed.

See also Task 1 for a separate but related task.

Task 2:

  1. Reindex (done)
  2. Retease (done)
  3. Views Date Range Filter (done)
  4. Views Fast Search
  5. Views Filter Block
  6. Views Tagadelic (done)

Reindex is a 6.x module, so the patch should be against 6.x. All the other modules, except Retease, are related to the Views module. You don't need to inst (that would be slick!)all Views to complete this task, but once again, learning about Views would be a good thing.

Deliverables:

  • create a Drupal issue against each module and submit a patch file for 5.x. If there is already a .install file, then be sure to submit the patch against the latest version on the DRUPAL-5 or DRUPAL-5--2 branches. You'll need to know how to create a patch file that adds a new file. The deliverable is not complete until the issue is reviewed and the status is set to either RTBC or Fixed (i.e., committed).
  • If a module is up-to-date and doesn't need a patch file, add a comment to this issue, saying that you checked the module and that it doesn't need to be patched.

Resources:

Primary Contact: Doug Green

Comments

aclight’s picture

Title: GHOP #xx: Write hook_uninstall for a multitude of modules: Task 2 » GHOP #156: Write hook_uninstall: Task 2

The official GHOP task associated with this issue is at:
http://code.google.com/p/google-highly-open-participation-drupal/issues/...

corsix’s picture

After a quick looking through, only views_fastsearch, views_filterblock and retease need an uninstall function, so I'll set to work on them.

daterange:
* No install file, hence no tables created
* No direct usage of variable_ functions
* No mention of system_settings_form
* No mention of uninstallation in the issue list

views_fastsearch:
* Install file creates no tables, although it does add an index to the search_index table
* Direct calls to variable_get, but none to variable_set
* No mention of system_settings_form
* No mention of uninstallation in the issue list
* Does alter settings forms though, so probably needs work

views_filterblock:
* No install file, hence no tables created
* Calls variable_set
* Calls system_settings_form
* No mention of uninstallation in the issue list
* Needs work

tagadelic_views:
* No install file, hence no tables created
* No direct usage of variable_ functions
* No mention of system_settings_form
* No mention of uninstallation in the issue list

retease:
* No install file, hence no tables created
* Calls variable_set
* Calls system_settings_form
* No mention of uninstallation in the issue list
* Needs work

reindex:
* No install file, hence no tables created
* No direct usage of variable_ functions
* No mention of system_settings_form
* No mention of uninstallation in the issue list

corsix’s picture

Status: Active » Needs review

http://drupal.org/node/211943 for views_filterblock
http://drupal.org/node/211948 for retease
Still working on views_fastsearch

corsix’s picture

http://drupal.org/node/211952 for views_fastsearch

douggreen’s picture

Status: Needs review » Needs work

Great start, VFB and VFS still need some work. See the comments on those issues.

dmitrig01’s picture

Status: Needs work » Fixed

Done!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.