I like this module a lot so I put some work in to make it produce valid XHTML 1.0 Strict code and have better compliance with Drupal coding standard.

I also added "and n.moderate=1" to the sql querys for "Items in editorial queue, awaiting approval". On my site "not published" alone does not mean the node is in the "editorial queue".

CommentFileSizeAuthor
hof.module.01.patch33.4 KBfrjo

Comments

syscrusher’s picture

Assigned: Unassigned » syscrusher

Hi, and thanks for the patch. I'm only semi-online right now due to travel but will review this in detail when I return. Assuming your code is clean, the patch is very likely to be accepted.

Scott

syscrusher’s picture

{sigh} The patch that is attached to this node doesn't want to download for me without HTML formatting. Could you please send me an email copy of the raw patch for review, now that I'm home from my travel?

Thanks.

Scott
scott at 4th dot com

syscrusher’s picture

Greetings!

Sorry it's taken me so long to get around to this patch. I've been working on it tonight, and am prepared to accept it with one change.

You have this SQL statement:

SELECT count(*) FROM {node} n left join {scheduler} s on n.nid=s.nid where n.status=0 and n.moderate=1 and s.nid is null;

I think we actually need this:

SELECT count(*) FROM node n left join {scheduler} s on n.nid=s.nid where (n.status=0 or n.moderate=1) and s.nid is null;

(and also similar changes for the SQL that is invoked if scheduler module is not present).

The reason for this is that sites that don't use moderation regard unpublished nodes as "awaiting approval", so the condition of a node awaiting action in this context is *either* that it is unpublished *or* that it is flagged for moderation. The and condition relating to the scheduler row being absent goes outside the parentheses because any node that is scheduled is considered (in the context of HOF) to have been "approved" by an editor even though it's not yet visible on the wire.

I'd appreciate your feedback on this proposed change. I'm going to go ahead and commit this as stated above, but I am open to negotiation on further revision to the SQL if this doesn't meet both our needs.

Kind regards,

Scott

syscrusher’s picture

Oops...In the second SQL line I missed the {} around the {node} table. They're present in the actual code.

syscrusher’s picture

I also found a number of other places in the SQL where a conditional on {node}.moderate was needed. These are all updated. I'm going to try to roll in a couple more bugfixes and small features, then will commit the new version.

Scott

frjo’s picture

I guess it depend on your view what "editorial queue" is. For me personally it's "n.status=0 and n.moderate=1" but for you and others it might well be "(n.status=0 or n.moderate=1)".

As far as I can tell a node will always be published if marked "Published" even it it's also set to be "In moderation queue".

Go with what you believe is right for the majority of users.

syscrusher’s picture

Status: Needs review » Fixed

No one has commented or complained about the current behavior since 2005. I'm going to consider this issue resolved, but would reopen it if people feel the current interpretation is flawed. This is a largely subjective issue, as frjo has pointed out.

Status: Fixed » Closed (fixed)

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