I have marked this as a bug report because some of the things it fixes are incorrect function calls, which are bugs.

This patch is a full code cleanup of this module.
It addresses:
* Brings it up to speed with drupal coding standards - http://drupal.org/coding-standards
* Fixes incorrect call to variable_del() in hook_uninstall
* Fixes incorrect function parameters in hook_help() and hook_nodeapi()
* Changes internal function names to use the autocategorise namespace. This is to avoid function name clashes.

The patch is against 6.x-1.x-dev

Comments

agileware’s picture

StatusFileSize
new14.29 KB

Damn patches haven't been attaching on drupal.org posts lately.

Here is the patch.

agileware’s picture

StatusFileSize
new14.28 KB

Oops I just found another thing.

This version of the patch also fixes the naming of the hook_help function.

agileware’s picture

StatusFileSize
new14.52 KB

Found some more things.

This patch also changes an incorrect use of form_set_error to drupal_set_message.

It also changes the submit function to use $form_state['values'] instead of $form.

agileware’s picture

StatusFileSize
new14.52 KB

Sorry, found a bug in my code.

agileware’s picture

StatusFileSize
new14.51 KB

Last one...

This one capitalises the autocategorise button as well as a couple of other code formatting fixes.

interx’s picture

Works for me.

PS. Contributed module patches should be created from within the module itself.

agileware’s picture

Cool.

Can you elaborate on the patching comment?

Do you mean something like:

diff -rupN ../module ./ > patch.patch

from inside the amended version of the module, instead of

diff -rupN module module_new > patch.patch

from outside the module directory?

If the patch applies with patch -p0 < patch.patch does it matter how it was created?

I know if you are just patching say mymodule.module you should do it in the same
directory but when you are patching multiple files can it even be done that way
and still only give one patch file?

brycesenz’s picture

Status: Needs review » Fixed

This is fixed in the latest -dev release (September 17). The module is now in line with Drupal coding standards.

Status: Fixed » Closed (fixed)

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