[development] Change in status

Peter Wolanin pwolanin at gmail.com
Sat Sep 30 23:33:39 UTC 2006


With the caveat that you may have problems under PHP5 (see my previous
message), one possible way to check this would be to call node_load in
your hook_nodeapi to get the cached node object that would have the
pre-edit value for publication status.

However, this (and most possible solutions) are a little hackish.
I'm not sure I know exactly what Moshe has in mind.  For an example
where the moderation status is preserved via the hook_nodeapi
implementation see this module of mine:

http://drupal.org/project/content_moderator

---------------------------
Date: Sat, 30 Sep 2006 15:42:00 -0400
From: "Dan Ziemecki" <dan at ziemecki.com>
Subject: [development] Change in status
To: development at drupal.org
Message-ID:
       <b628f4a80609301242se5a7703jc415d9db758e15dd at mail.gmail.com>


When a node is submitted, it's current status is sent, but not it's previous
status.  As such, I can not perform actions on newly published nodes, since
I can't tell if it's state has changed.  Am I correct in my understanding,
or is there a hook I'm missing.

Thanks,

--
Dan Ziemecki
Philosopher. Curmudgeon. Nerd.


More information about the development mailing list