| 1 |
<?php |
<?php |
| 2 |
// $Id: publishcontent.module,v 1.3.4.8 2009/03/13 01:27:41 malaussene Exp $ |
// $Id: publishcontent.module,v 1.3.4.9 2009/03/18 22:55:50 malaussene Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 143 |
), |
), |
| 144 |
); |
); |
| 145 |
} |
} |
| 146 |
|
|
| 147 |
|
/** |
| 148 |
|
* Implementation of hook_form_alter() |
| 149 |
|
* |
| 150 |
|
* allow to use the 'Publishing options' on the edit/add page |
| 151 |
|
*/ |
| 152 |
|
function publishcontent_form_alter(&$form, $form_state, $form_id) { |
| 153 |
|
if (!user_access('administer nodes') |
| 154 |
|
&& $form['type']['#value'] .'_node_form' == $form_id |
| 155 |
|
&& (_publishcontent_unpublish_access($form['#node']) || |
| 156 |
|
_publishcontent_publish_access($form['#node']))) { |
| 157 |
|
$form['options']['#access'] = TRUE; |
| 158 |
|
unset($form['options']['promote']); |
| 159 |
|
unset($form['options']['sticky']); |
| 160 |
|
unset($form['options']['revision']); |
| 161 |
|
} |
| 162 |
|
} |