I'm exploring Drupal's multi-site, shared-content functionality and running into a small issue. My plan is to share content through table prefixes and set it up so that nodes (and their revisions) are common among multiple sites. Slowly I'm realizing that many other tables will have to be shared as well. The "node" and "node_revisions" tables have direct references to "users", so that needs to be shared. Similarly, "node_revisions" directly references "filter_formats". Not a huge problem until you see that "filter_formats" has a "roles" column that is a comma-separated list of all roles that can access that format. Left alone, this would mean I need to share roles as well which would I was hoping to avoid or could lead to even more tables needing to be shared, nearly defeating the purpose.

There is talk of making format permissions part of the global permissions system, which would correct my problem, but not until 7.x (if at all):
http://drupal.org/node/110242

My proposal is to break up the "filter_formats" table into two tables. Remove the "roles" column and instead make a table "filter_formats_roles" that has only two columns: "format" and "role". I'm willing to offer a patch but first wanted to check that...

  • This, or a similar solution, hasn't already been proposed
  • My solution would actually address my problem
  • Anyone believes that this would adversely affect modules that use filters (no one touches they tables directly, right?)

I'd appreciate any feedback or insight anyone has on this. I may have to implement this regardless to accomplish what I'm after but would prefer to be using "authorized" core code. Thanks.

CommentFileSizeAuthor
#1 filter-normalize.patch6.41 KBcelstonvml

Comments

celstonvml’s picture

StatusFileSize
new6.41 KB

There hasn't been any response but here's my first attempt at a patch to address the issue I've submitted. I'm not sure how best implement database updates for core modules (in system or the module itself?). Plus, this "tip" only confused the issue:

http://drupal.org/node/150220

I added my new table's definition in the hook_schema function but it's relatively obvious from my description. Any feedback is welcome.

lilou’s picture

Version: 6.2 » 7.x-dev
Status: Active » Needs work

Feature request go to CVS/HEAD.

Patch no longer applied.

dropcube’s picture

Status: Needs work » Closed (duplicate)