comment_insert() and comment_update() plus their associated hooks still take arrays. Now they don't.

Patch also removes comment_invoke_comment().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

catch’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

catch’s picture

Status: Needs work » Needs review
FileSize
14.97 KB

Didn't completely remove comment_invoke_comment()

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Looks like a nice cleanup to me. Much more readable now.

Not introduced by this patch, but why do we need $comment->comment_format = $comment->format;? Also, would be nice to teach comment_save() about drupal_write_record().

webchick’s picture

Wow, nice clean up! :)

Your indentation's off a bit here:

+  foreach ($defaults as $key => $default) {
+     if (!isset($comment->$key)) {
+       $comment->$key = $default;
+     }
+  }

I would really feel a whole lot better if we had some sort of test coverage for the comment API along with this patch. Maybe adding some to the trigger test?

webchick’s picture

Status: Reviewed & tested by the community » Needs work
catch’s picture

Status: Needs work » Needs review
FileSize
14.03 KB

search_comment_$op has test coverage. Here's the same patch with the search hunks removed, and you can watch it fail, just to demonstrate there's coverage.

Not touching trigger module with a long barge pole under any circumstances.

Status: Needs review » Needs work

The last submitted patch failed testing.

catch’s picture

Status: Needs work » Needs review
FileSize
15.13 KB
14.19 KB

These should apply to HEAD, fixed indentation as well.

catch’s picture

FileSize
15.13 KB

Not sure why the other patch didn't get tested, here it is again.

catch’s picture

Status: Needs review » Reviewed & tested by the community

I think this is RTBC again.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

catch’s picture

Status: Fixed » Needs review
FileSize
665 bytes

Introduced a notice in PHP 5.3 per Berdir.

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

I've run the comment tests locally on PHP 5.3 with that change and they pass now.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed to HEAD.

Status: Fixed » Closed (fixed)

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