summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-11-27 11:11:46 +0000
committerDries Buytaert <dries@buytaert.net>2005-11-27 11:11:46 +0000
commitc647b39c2c67c09ac421e43fedd4cdfa1a29b984 (patch)
tree0f8dd7ae69fa91b443bf6ec883f498024ef3c15a /modules/node/node.module
parent247e012c358a1acbbaa28bb850292ea8935886fb (diff)
downloadbrdo-c647b39c2c67c09ac421e43fedd4cdfa1a29b984.tar.gz
brdo-c647b39c2c67c09ac421e43fedd4cdfa1a29b984.tar.bz2
- Patch #37798 by Neil: fixed problem with node settings.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index dac183dff..d6c66b7c8 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1239,6 +1239,7 @@ function node_types_configure($type = NULL) {
'#description' => t('The minimum number of words a %type must be to be considered valid. This can be useful to rule out submissions that do not meet the site\'s standards, such as short test posts.', array('%type' => node_get_name($type)))
);
$form['workflow'] = array('#type' => 'fieldset', '#title' =>t('Workflow'));
+ $form['type'] = array('#type' => 'value', '#value' => $type);
$form['array_filter'] = array('#type' => 'value', '#value' => TRUE);
return system_settings_form($type .'_node_settings', $form);
@@ -2055,9 +2056,9 @@ function node_update_index() {
}
function node_form_alter($form_id, &$form) {
- if (substr($form_id, -14) == '_node_settings') {
- $form['workflow']['node_options_'. $node->type] = array(
- '#type' => 'checkboxes', '#title' => t('Default options'), '#default_value' => variable_get('node_options_'. $node->type, array('status', 'promote')),
+ if (isset($form['type']) && $form['type']['#value'] .'_node_settings' == $form_id) {
+ $form['workflow']['node_options_'. $form['type']['#value']] = array(
+ '#type' => 'checkboxes', '#title' => t('Default options'), '#default_value' => variable_get('node_options_'. $form['type']['#value'], array('status', 'promote')),
'#options' => array('status' => t('Published'), 'moderate' => t('In moderation queue'), 'promote' => t('Promoted to front page'), 'sticky' => t('Sticky at top of lists'), 'revision' => t('Create new revision')),
'#description' => t('Users with the <em>administer nodes</em> permission will be able to override these options.'),
);