Ok so I just using this module for D7. And I noticed that we are using a negate to change the status. I proposing to change it into 1 or 0. Since there are modules who save the status with int (like apacheSOLR I'm using right now). Which will generate error when a content unpublished.
So instead of :
$node-status = !$node->status;
I think this would be better :
$node->status==1 ? $node->status=0 : $node->status=1;
Using this module on d7b3. Thanks for the module
Comments
Comment #1
sylv3st3r commentedOh also the title for user permission have typo :
The title should be "Unpublish any content"
Comment #2
aaronbaumanI think you're right that
$node->statusshould be an int.A more graceful way to accomplish this would be with php's xor operator:
I will roll this up into dev when I get a chance.
Comment #3
aaronbaumanVarious changes committed to d7 DEV