Closed (fixed)
Project:
Mailhandler
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2006 at 22:43 UTC
Updated:
17 Dec 2010 at 22:54 UTC
When I send a story via email and include:
status: 0
The story is published.
Similarly, if I set the "Default commands" to:
status: 0
the story is also published.
I would like to have stories not published in some cases.
Comments
Comment #1
jdfrankl commentedI am new to Drupal, and a PHP newb as well, so take my findings with a grain of salt...
I was having the same problem that soxadmin1 reported. I spent a couple of hours working on it and traced it to the node.module node_submit() function called from the mailhandler.module mailhandler_node_submit() function. The user access when node_submit() is called is not 'administer nodes' and that forces node_submit() to apply the defaults for status, etc. which overwrites the values set in mailhandler.module. I hacked mailhandle.module by adding a call to mailhandler_switch_user() before and after the node_submit() call like this:
This solved the problem for me. Of course I'm just a newb so I don't know what unwanted side effects that hack might cause. And perhaps this could have been solved with a configuration change - but I was unable to find anything relevant. I would appreciate a little guidance if I have gone off the rails here. Thanks.
Comment #2
cor3huis commented