- Patch #37798 by Neil: fixed problem with node settings.
parent
247e012c35
commit
c647b39c2c
|
@ -232,8 +232,8 @@ function comment_link($type, $node = 0, $main = 0) {
|
|||
}
|
||||
|
||||
function comment_form_alter($form_id, &$form) {
|
||||
if (substr($form_id, -14) == '_node_settings') {
|
||||
$form['workflow']['comment_'. $node->type] = array('#type' => 'radios', '#title' => t('Default comment setting'), '#default_value' => variable_get('comment_'. $node->type, COMMENT_NODE_READ_WRITE), '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')), '#description' => t('Users with the <em>administer comments</em> permission will be able to override this setting.'));
|
||||
if (isset($form['type']) && $form['type']['#value'] .'_node_settings' == $form_id) {
|
||||
$form['workflow']['comment_'. $form['type']['#value']] = array('#type' => 'radios', '#title' => t('Default comment setting'), '#default_value' => variable_get('comment_'. $form['type']['#value'], COMMENT_NODE_READ_WRITE), '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')), '#description' => t('Users with the <em>administer comments</em> permission will be able to override this setting.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -232,8 +232,8 @@ function comment_link($type, $node = 0, $main = 0) {
|
|||
}
|
||||
|
||||
function comment_form_alter($form_id, &$form) {
|
||||
if (substr($form_id, -14) == '_node_settings') {
|
||||
$form['workflow']['comment_'. $node->type] = array('#type' => 'radios', '#title' => t('Default comment setting'), '#default_value' => variable_get('comment_'. $node->type, COMMENT_NODE_READ_WRITE), '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')), '#description' => t('Users with the <em>administer comments</em> permission will be able to override this setting.'));
|
||||
if (isset($form['type']) && $form['type']['#value'] .'_node_settings' == $form_id) {
|
||||
$form['workflow']['comment_'. $form['type']['#value']] = array('#type' => 'radios', '#title' => t('Default comment setting'), '#default_value' => variable_get('comment_'. $form['type']['#value'], COMMENT_NODE_READ_WRITE), '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')), '#description' => t('Users with the <em>administer comments</em> permission will be able to override this setting.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.'),
|
||||
);
|
||||
|
|
|
@ -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.'),
|
||||
);
|
||||
|
|
|
@ -144,9 +144,9 @@ function upload_file_download($file) {
|
|||
}
|
||||
|
||||
function upload_form_alter($form_id, &$form) {
|
||||
if (substr($form_id, -14) == '_node_settings') {
|
||||
$form['workflow']['upload_'. $node->type] = array(
|
||||
'#type' => 'radios', '#title' => t('Attachments'), '#default_value' => variable_get('upload_'. $node->type, 1),
|
||||
if (isset($form['type']) && $form['type']['#value'] .'_node_settings' == $form_id) {
|
||||
$form['workflow']['upload_'. $form['type']['#value']] = array(
|
||||
'#type' => 'radios', '#title' => t('Attachments'), '#default_value' => variable_get('upload_'. $form['type']['#value'], 1),
|
||||
'#options' => array(t('Disabled'), t('Enabled')),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -144,9 +144,9 @@ function upload_file_download($file) {
|
|||
}
|
||||
|
||||
function upload_form_alter($form_id, &$form) {
|
||||
if (substr($form_id, -14) == '_node_settings') {
|
||||
$form['workflow']['upload_'. $node->type] = array(
|
||||
'#type' => 'radios', '#title' => t('Attachments'), '#default_value' => variable_get('upload_'. $node->type, 1),
|
||||
if (isset($form['type']) && $form['type']['#value'] .'_node_settings' == $form_id) {
|
||||
$form['workflow']['upload_'. $form['type']['#value']] = array(
|
||||
'#type' => 'radios', '#title' => t('Attachments'), '#default_value' => variable_get('upload_'. $form['type']['#value'], 1),
|
||||
'#options' => array(t('Disabled'), t('Enabled')),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue