Remove all reference to the node moderation flag from all core system SQL statements, per discussion on developers e-mail list: http://lists.drupal.org/archives/development/2006-07/msg00060.html

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

(subscribing...)

pwolanin’s picture

I haven't gotten on the devel list, but I assume this comes out of this issue for 4.7: http://drupal.org/node/71730

A proposal there is to have status have possible values 1,0,-1.

http://drupal.org/node/71730#comment-112943

Though I might prefer to call these states published, unpublished, and hidden. In this case, i'd think nodes with status =0 should (at least) be accessible to their author (unlike the current system).

Chris Johnson’s picture

Status: Active » Needs review
FileSize
17.12 KB

Here's a patch for HEAD core which removes the moderate flag from all code references. It is not removed from the database.

I benchmarked this before and after, and while it was a tiny bit faster after, I don't think the improvement is statistically signficant (about half a second over 1000 requests using ApacheBench at concurrency 10) on my system (500 nodes, 500 comments, 50 users, 15 taxonomies, 50 terms, 20 nodes on front page, benchmark was just hitting front page).

Dries’s picture

Status: Needs review » Needs work

Committed this patch to CVS HEAD. This needs to be documented in the upgrade instructions. Setting this to 'code needs work'. Please set 'fixed' when the handbook has been updated.

Chris Johnson’s picture

Suggested documentation submitted to handbook and issue http://drupal.org/node/73015 opened to indicate need for changes created.

kbahey’s picture

Why keep the moderate column in the database?

moshe weitzman’s picture

Just reading this patch now ... The following line should is a 'publish' action, not approve:

+ 'approve' => array(t('Approve the selected posts'), 'UPDATE {node} SET status = 1 WHERE nid = %d'),

pwolanin’s picture

I think it's useful to keep the moderate column- otherwise you may break people's existing data. Also, it would then be easier for contrib modules to implement a moderation workflow.

dww’s picture

Assigned: Chris Johnson » dww
Category: task » bug
Status: Needs work » Needs review
FileSize
826 bytes

the previous patch (which was committed to HEAD) removed a check for the moderation bit from book.module, but left the underlying message that said "The post has been submitted for moderation and won't be accessible until it has been approved." attached patch removes this (now bogus) message for site admins viewing book nodes.

Dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks.

dww’s picture

Assigned: dww » Unassigned
Category: bug » task

setting the category (and ownership) back for posterity. ;)

Anonymous’s picture

Status: Fixed » Closed (fixed)