Comments

alcroito’s picture

Status: Active » Needs review
StatusFileSize
new22.29 KB

The patch below is to be applied to the latest HEAD version of modr8.
It's a port to drupal 6.

Cheers, Placinta. ^_^

alcroito’s picture

StatusFileSize
new22.75 KB

A few changes from the previous one.

alcroito’s picture

StatusFileSize
new23.41 KB

There was a error regarding sending mail in the previous patches.
This one fixed it. :)

webchick’s picture

Status: Needs review » Needs work

Gave the code an initial pass-through, and overall looks like very good work! I noticed you even fixed some existing coding standards-compliance issues. :) I had a hard time coming up with things, but I found a few minor stuff...

Code review

-// $Id: modr8.install,v 1.2 2007/01/20 15:26:38 pwolanin Exp $
+// $Id: modr8.install,v 1.1.2.3 2007/01/20 15:25:59 pwolanin Exp $

When diffs do this, it usually indicates you're not completely up to date with what's in cvs. Try "cvs up" to get the latest changes, to ensure that your patch stays up to date.

-function modr8_update_1000() {

I wouldn't remove this function. People need that if they're upgrading from 4.7.x => 6.x

+		

This shows up a couple times; just remove those lines.

+function modr8_theme() {

Let's make sure that function has a comment header.

Some bugs

- When I head to admin/content/modr8 with a post in moderation, I receive:

notice: Undefined variable: note_field in /sites/all/modules/modr8/modr8_admin.inc on line 213.

- The notes field is also missing. Although after I saved the settings form (?) it re-appeared? Strange.. :\ Same problem exists in 5.x. Out of scope.

- In the Content moderation log @ admin/reports/modr8:

notice: Undefined variable: output in /sites/all/modules/modr8/modr8_admin.inc on line 434.

- When saving the settings form, I got:

notice: Array to string conversion in /Users/webchick/Sites/6x/includes/form.inc on line 715.

- After checking off options to receive e-mails on various actions, when submitting the moderation form, I get:

notice: Undefined variable: sendmail_from in /sites/all/modules/modr8/modr8_admin.inc on line 321.

- As an anonymous user, I create a story node that's unpublished and moderated by default. In 5.x, I get "This Story will be submitted for moderation and will not be accessible to other users until it has been approved." and redirected back to the home page. In 6.x, I get an access denied page and no message.

I'm really sorry I didn't get to this until just now -- it's been a crazy day. :(

webchick’s picture

Also note that I wasn't able to actually test the e-mail, as something's borked with my computer atm.

alcroito’s picture

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

1) I'm not sure what should I do with these versions being different, cause I don't have experience with svc.

-// $Id: modr8.install,v 1.2 2007/01/20 15:26:38 pwolanin Exp $
+// $Id: modr8.install,v 1.1.2.3 2007/01/20 15:25:59 pwolanin Exp $

2) I implemented the modr8_update_1000() function.
3) Not sure where you found plain whitespaces.
4) Added a comment header to modr8_theme() functions.

Bugs:
Not sure about the notices errors, cause they don't appear on my server, but I defined the variables with a void string anyhow.
Same goes for the notice: Array to string conversion, I didn't find what's the cause, because I don't see the notice. By the way my error reporting is set to E_ALL.

About the anonymous user, it isn't my fault. That's drupal's 6 main behavior. I tried to create a simple story unpublished, without being added to the moderation queue, by an anonymous user, and it displays Access Denied, whereas in drupal 5 it redirect's to the main page.

Below is the new patch.

catch’s picture

Status: Needs review » Needs work

OK I applied this on 6.x with the latest HEAD tarball from http://drupal.org/node/96672

A few things -
Patch has windows linebreaks - an easy way to remove them is to use a text editor like Notepad++ to change the format of the .patch file.

The .info hunk didn't apply but I added the core compatibility manually.

I also get the notice on saving the settings form:
notice: Array to string conversion in drupal6/includes/form.inc on line 715.
Didnt' recieve e-mails, but that could me my server too.

Overall it looks good! But marking back to needs work for those bits.

pwolanin’s picture

I was away last week - I'll take a look soon. @catch and webcheck - thanks for reviewing already.

alcroito’s picture

Status: Needs work » Needs review
StatusFileSize
new24.36 KB

Here is the new patch where the notice error was solved, something related to the settings_form_validate function, and the patch is also in UNIX format.

catch’s picture

Status: Needs review » Needs work

I reviewed this, and everything I tested seems to be working except drupal_mail() now.

webchick’s picture

Yeah, drupal_mail is an absolute bugger. :( It got changed all around because of the i18n stuff. There is documentation about these changes at http://drupal.org/node/189367 but if that doesn't clear it up, you might try asking on the developer mailing list: http://lists.drupal.org/listinfo/development

alcroito’s picture

Status: Needs work » Needs review
StatusFileSize
new25.51 KB

Okay, I believe this will be the last version of the patch (at least I hope it to be).
I repaired mailing functions in this one, and implemented hook_mail().
I believe the patch is good to go.

alcroito’s picture

StatusFileSize
new25.65 KB

The most final possible version of them all :) Mails aren't sent to anonymous users.

catch’s picture

Status: Needs review » Reviewed & tested by the community

All fine as far as I can see. Nice work!

When you wake up, post the last patch over at google so we can mark it completed.

pwolanin’s picture

A quick read through - generally it looks nice, but it'll need a few more tweaks to be an ideal upgrade.

for example:

require_once drupal_get_path('module', 'modr8') .'/modr8_admin.inc';

should be removed in favor of specifying the file in hook menu.

Also, you define both of these menu paths: admin/reports/modr8 and admin/reports/modr8/%/% which isn't really right. Also you use this to replace the existing admin/logs/modr8path - why?

catch’s picture

pwolanin: admin/logs no longer exists.

pwolanin’s picture

@catch - ah - ok. I guess this is a watchdog -> dblog change. Sorry to be dense.

alcroito’s picture

StatusFileSize
new25.63 KB

Ok. Changed the places of the require_once to be in hook_menu, and also deleted admin/reports/modr8/%/% cause it realy doesn't have to be there (although previously it didn't work to work without it though).

Here is the patch.

wmostrey’s picture

Confirming this to be RTBC. Applies cleanly and works advertised. Good job!

Now go get another one ;)

alcroito’s picture

Roger that! :)

pwolanin’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new29.01 KB

committed the attached patch - largely the same as above with a few more tweaks, especially for notices for undefined, etc.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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