Any chance of getting this ported to Drupal 6.x?

Comments

wayland76’s picture

Ditto

Freso’s picture

Title: Drupal 6.x » Drupal 6.x port

I'm working on a port right now, but I won't promise that it'll actually be workable at all. I'll post my results if/when I get stuck - at completion or earlier.

Freso’s picture

Status: Active » Needs work
StatusFileSize
new118.04 KB

This is what I've done today. If someone else would pick it up and give it some love, that would be awesome. It spits out a bunch of notices and stuff when enabling the module and I haven't tested whether anything works. (Huge thanks to chx for helping with the port of the menu system, though I probably ought to give that a second look over. But not now.)

dmartin’s picture

I want to thank you for working on this. I want to upgrade to 6, but this plugin is critical for me. I get hundreds of spam comments a week, and Akismet is the only way I can handle it right now.

Freso’s picture

Status: Needs work » Needs review
StatusFileSize
new118.04 KB

I found the reason for the misbehaviour of my patch: A 'field' should be 'fields'. Now I just need people to actually test this and tell me whether everything works as expected. :)

wayland76’s picture

Isn't that why we release development versions? Maybe the developers could create the necessary branch and commit your patch, so that people can test the development version.

Freso’s picture

That's one of the reasons. But there's no need to make a development version, if the code is known not to work. That is why patches are reviewed (which includes testing) in the first place. Please see the handbook pages on patches for tips on how to work with and review them.

Freso’s picture

StatusFileSize
new116.2 KB

Here's a minor update, re-introducing a is_numeric and removing some comments which were only there to test some ideas I had. Upon revisiting the patch, I also realised that the commenting code in particular needs to be tested thoroughly, as I did some questionable stuff in that area during the port.

drewish’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Needs work

marked http://drupal.org/node/229269 as a duplicate.

wow, epic patch. i tried applying it and it conflicted with some other patches i just committed:

amorton@minivac:~/Sites/d5/sites/all/modules/akismet% patch -i akismet.d6-port_0.patch 
patching file akismet.admin.inc
patching file akismet.info
patching file akismet.install
patching file akismet.module
Hunk #2 FAILED at 26.
Hunk #3 FAILED at 55.
Hunk #4 succeeded at 130 (offset -1 lines).
Hunk #5 succeeded at 383 (offset -1 lines).
Hunk #6 succeeded at 418 (offset -1 lines).
Hunk #7 succeeded at 512 (offset -1 lines).
Hunk #8 succeeded at 549 (offset -1 lines).
Hunk #9 succeeded at 580 (offset -1 lines).
Hunk #10 succeeded at 590 (offset -1 lines).
Hunk #11 succeeded at 603 (offset -1 lines).
Hunk #12 succeeded at 626 (offset -1 lines).
Hunk #13 succeeded at 635 (offset -1 lines).
Hunk #14 succeeded at 647 (offset -1 lines).
Hunk #15 succeeded at 669 (offset -1 lines).
Hunk #16 succeeded at 679 (offset -1 lines).
Hunk #17 succeeded at 744 (offset -1 lines).
Hunk #18 succeeded at 831 (offset -1 lines).
Hunk #19 succeeded at 1017 (offset -1 lines).
Hunk #20 succeeded at 1060 (offset -1 lines).
Hunk #21 succeeded at 1290 (offset -1 lines).
Hunk #22 succeeded at 1390 (offset -1 lines).
Hunk #23 succeeded at 1443 (offset -1 lines).
Hunk #24 succeeded at 1467 (offset -1 lines).
Hunk #25 succeeded at 1490 (offset -1 lines).
Hunk #26 succeeded at 1514 (offset -1 lines).
Hunk #27 succeeded at 1532 (offset -1 lines).
2 out of 27 hunks FAILED -- saving rejects to file akismet.module.rej
patching file akismet_admin.inc

if you re-roll it i'll commit it as is so people can test it out.

Freso’s picture

Status: Needs work » Needs review
StatusFileSize
new118.95 KB

Here's a freshly re-rolled patch. :)

drewish’s picture

Status: Needs review » Needs work

still not working correctly... your patch is adding akismet_admin.inc but it already exists in CVS:

amorton@minivac:~/Sites/d6/sites/all/modules/akismet% cvs up -dP -A
? akismet.d6-port_1.patch
cvs update: Updating .
cvs update: Updating contrib
cvs update: Updating contrib/controlpanel
cvs update: Updating contrib/controlpanel/36x36
cvs update: Updating contrib/controlpanel/48x48
amorton@minivac:~/Sites/d6/sites/all/modules/akismet% patch -p0 -i akismet.d6-port_1.patch 
patching file akismet.admin.inc
patching file akismet.info
patching file akismet.install
patching file akismet.module
patching file akismet_admin.inc
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] y
Hunk #1 FAILED at 1.
File akismet_admin.inc is not empty after patch, as expected
1 out of 1 hunk FAILED -- saving rejects to file akismet_admin.inc.rej
patching file akismet_cron.inc
Freso’s picture

Uh. The patch should remove akismet_admin.inc (diff'ing it against /dev/null). It also works fine here:

freso@nayru /s/h/l/h/d/s/a/m/akismet> cvs up
cvs update: warning: new-born `akismet.admin.inc' has disappeared
cvs update: `akismet_admin.inc' should be removed and is still there
R akismet_admin.inc
freso@nayru /s/h/l/h/d/s/a/m/akismet> ls
akismet_admin.inc  akismet.gif   akismet.install  CHANGELOG.txt  CVS/         README.txt
akismet_cron.inc   akismet.info  akismet.module   contrib/       INSTALL.txt
freso@nayru /s/h/l/h/d/s/a/m/akismet> patch -p0 < ../akismet.d6-port.patch 
patching file akismet.admin.inc
patching file akismet.info
patching file akismet.install
patching file akismet.module
patching file akismet_admin.inc
patching file akismet_cron.inc
freso@nayru /s/h/l/h/d/s/a/m/akismet> ls
akismet.admin.inc  akismet.gif   akismet.install  CHANGELOG.txt  CVS/         README.txt
akismet_cron.inc   akismet.info  akismet.module   contrib/       INSTALL.txt
freso@nayru /s/h/l/h/d/s/a/m/akismet> patch -p0 -R < ../akismet.d6-port.patch 
patching file akismet.admin.inc
patching file akismet.info
patching file akismet.install
patching file akismet.module
patching file akismet_admin.inc
patching file akismet_cron.inc
freso@nayru /s/h/l/h/d/s/a/m/akismet> ls
akismet_admin.inc  akismet.gif   akismet.install  CHANGELOG.txt  CVS/         README.txt
akismet_cron.inc   akismet.info  akismet.module   contrib/       INSTALL.txt
freso@nayru /s/h/l/h/d/s/a/m/akismet>
Freso’s picture

Status: Needs work » Needs review

Oh, and if you keep getting that error message, simply using cvs remove -f akismet_admin.inc should do what the patch does. Setting back to CNR.

drewish’s picture

Status: Needs review » Fixed

thanks, i committed this adding akismet.admin.inc and removing akismet_admin.inc. any additional bug fixes should go into their own issues.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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