Upgrade module to 5.0/HEAD

kkaefer - January 5, 2007 - 15:01
Project:Comment Mail
Version:HEAD
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

The attached patch cleans up the module and updates it to work with current HEAD (Drupal 5).

AttachmentSize
drupal-5_0.patch19.76 KB

#1

kbahey - January 29, 2007 - 19:49

Patch needs to change date_update_1() to commentmail_update_1().

Otherwise, look good.

#2

quicksketch - February 2, 2007 - 19:39

dprint_r($comment_obj); also needs to be removed.

#3

kbahey - February 8, 2007 - 19:44
Status:needs work» needs review

Here is a patch that removes the above two comments.

AttachmentSize
cm.patch 19.83 KB

#4

kvarnelis@drupal.org - February 8, 2007 - 20:30

didn't work.

upon visiting the settings page, i got ..

warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'commentmail_admin_settings' was given in /Library/WebServer/Documents/drupal/includes/form.inc on line 218.

and
in trying to post i got

Fatal error: Call to undefined function: user_mail() in /Library/WebServer/Documents/drupal/modules/commentmail/commentmail.module on line 55

#5

kvarnelis@drupal.org - February 8, 2007 - 20:38

actually it may be that the second patch is malformed... trying to decode it by hand...

#6

kvarnelis@drupal.org - February 8, 2007 - 21:02

i wish i could edit the previous posts, but since i can't...

i have commentmail working, but don't use the second patch. it does not contain the patch for the .install file, which is what gave me the errors.
it also doesn't touch the dprint () which leads to a quick death.

manually changing the two comments did work.

#7

kbahey - February 9, 2007 - 00:47

Here is another patch. It removes the dprint, corrects the name of the function in the .install file, has a .info file, and should work well.

AttachmentSize
cm_0.patch 19.52 KB

#8

kbahey - February 9, 2007 - 01:01
Status:needs review» reviewed & tested by the community

Here is a better patch:

- Version number added to the .info file.
- Description added to the settings.

Marking as RTBC.

AttachmentSize
cm_1.patch 19.61 KB

#9

kbahey - February 10, 2007 - 15:06

I can confirm that the latest patch in #8 works well on a live site.

#10

kkaefer - February 10, 2007 - 17:28
Status:reviewed & tested by the community» fixed

Committed to HEAD.

#11

kbahey - February 10, 2007 - 18:14

Thanks Konstantin.

Do you plan to branch it and release it for 5.x soon?

#12

kkaefer - February 10, 2007 - 21:22

I decided that as long as this module is adapted to a post-5 version, I keep developing it in HEAD. Once it's ported to 6.x(-dev), I'll branch it. Please test the HEAD version. If no errors occur, I'll release a 5.x-1.0 in the next couple of days.

#13

kbahey - February 10, 2007 - 21:35

OK, I switched the 3 sites to the official HEAD from the repository.

One more thing: add this line in the .info file:

version = "$Name: $"

#14

kkaefer - February 10, 2007 - 22:06

AFAIK, the release system automatically adds this line when a user downloads a tarball from the website. Power users using CVS checkouts can figure out the version from the Id string.

#15

kbahey - February 10, 2007 - 22:10

It says here: http://drupal.org/node/101009

version (Optional)
The version string will ordinarily be added by drupal.org when a release is created and a tarball packaged. However, for users getting their modules directly from CVS, they will not have a version string. In order to accomodate them, you may use the following string:

version = "$Name$"

You should not put anything else here. Please note that the quotes are required; some PHP versions are more sensitive to the punctuation than others. It is often suggested to use $Revision$ here. Do Not Do This. It will give the revision of the .info module which is utterly useless.

Also keep in mind that, as a developer, if you use $Name$ you will see $Name$ if your checkout is from HEAD or you only just branched and have not done a new checkout. cvs update from the same branch will not consistently update $Name$, but sometimes it will appear to. If you see $Name$ and you think you should see a tag, do a cvs checkout.

To reiterate: Use of this field and $Name$ is only for the convenience of the author and users checking the module out of CVS.

So it is better to include it.

#16

Anonymous - February 24, 2007 - 22:16
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.