This constant is used in various places, as it was in D6. However, it is never defined.

In D6, it used to be near the top of filter.module.

Comments

fgm’s picture

Title: FILTER_FORMAT_DEFAULT used but not defined » FILTER_FORMAT_DEFAULT still used although obsolete

Actually, that constant appears to have been removed with the new text formats in UNSTABLE-10, ad per http://drupal.org/update/modules/6/7#default-text-formats

Its use should therefore be replaced, likely by filter_fallback_format() or filter_default_format() depending on the remaining use cases.

casey’s picture

In current HEAD FILTER_FORMAT_DEFAULT is only being used in system_update_6051().

fgm’s picture

FWIW, that's version 1.422 of system.install, and the comment in hook_update_6051() needs to be changed too. There were quite a bunch removed in just three days...

fgm’s picture

Status: Active » Needs review
StatusFileSize
new1.57 KB

Suggested patch.

sun’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +D7 upgrade path
dries’s picture

This no longer applies for me?

dries’s picture

Status: Reviewed & tested by the community » Needs review
willmoy’s picture

StatusFileSize
new1.46 KB

Straight re-roll, see if we can get this off the list.

sun’s picture

Status: Needs review » Reviewed & tested by the community

Still RTBC if bot passes.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 633974-filter-format-default.patch, failed testing.

David_Rothstein’s picture

-      'default' => FILTER_FORMAT_DEFAULT,
+      'default' => filter_fallback_format(),

I don't think this is right - this won't be consistent with what the D6 update did. Rather, it seems like variable_get('filter_default_format') should be used here too.

Note, by the way, that this is all also being discussed and handled at #520760: SA-CORE-2009-007 user signature format as well. Basically, as far as I can tell, the reason this bug exists at all is that the post-release D6 update functions were mass-copied to D7 without changing them. However, this one was for a security update, so it will need to be taken care of properly in the other issue anyway. It may make sense to close this as a duplicate and merge the work here with that patch.

sun’s picture

Status: Needs work » Closed (duplicate)

Agreed.