Great module, just downloaded it and tested it out tonight!
I went to write a hook_update to configure this module's permissions on my live server the same way I'd set them up on my localhost. When I did, I found that because there's whitespace at the start of each 'publish ___' permission, but not the 'unpublish ___' permissions, my hook_update properly enabled the permissions checkboxes for any unpublish perm, but ignored the publish ones.
<?php
$perms = array(
' publish *all* content',
'unpublish *all* content',
);
?>
Should be
<?php
$perms = array(
'publish *all* content',
'unpublish *all* content',
);
?>
without the leading whitespace so that $ret[] = update_sql("UPDATE {permission} SET perm = CONCAT(perm, ', publish *all* content, unpublish *all* content') WHERE rid ="3"; will match both of the strings, and not just the second one. ;)
Comments
Comment #1
syakely commented/**
* Implementation of hook_perm().
*
* @note: the 2 extra spaces is a hack: Drupal 5-6 user permissions page set
* 'publish *all* content' auto-magically when 'unpublish *all* content'
* is set.
*/
SO, what was happening without the two extra spaces, is publish all content would activate, when a user choose unpublish all content.
Comment #2
syakely commentedAfter many many different attempts, the only way I was able to get it to work with out spaces was to change the word publish to publishing. SO, 'publish *all* content' to 'publishing *all* content'. I left unpublish alone, but added 'any' to mimic core node permission display.
Comment #3
syakely commentedA patch for changing all ' publish *' to 'publishing *' and adding 'any' to the permissions that apply, to mimic core node permission display.
Comment #4
YK85 commentedsubscribing
Comment #5
aaronbaumanThis is addressed in #501968: An illegal choice has been detected. Please contact the site administrator.
Comment #6
aaronbaumansee also http://drupal.org/cvs?commit=373960
- "update "*all*" to match drupal convention "any""
- added "any" to individual node_type permissions