- Patch #100429 by Zen, RobRoy and kkaefer: remove the content type requirement.
parent
07e6bdcdfe
commit
30bf1d53ae
|
@ -255,11 +255,10 @@ function taxonomy_form_vocabulary($edit = array()) {
|
||||||
'#description' => t('Instructions to present to the user when choosing a term.'),
|
'#description' => t('Instructions to present to the user when choosing a term.'),
|
||||||
);
|
);
|
||||||
$form['nodes'] = array('#type' => 'checkboxes',
|
$form['nodes'] = array('#type' => 'checkboxes',
|
||||||
'#title' => t('Types'),
|
'#title' => t('Content types'),
|
||||||
'#default_value' => $edit['nodes'],
|
'#default_value' => $edit['nodes'],
|
||||||
'#options' => node_get_types('names'),
|
'#options' => node_get_types('names'),
|
||||||
'#description' => t('A list of node types you want to associate with this vocabulary.'),
|
'#description' => t('A list of content types you would like to categorize using this vocabulary.'),
|
||||||
'#required' => TRUE,
|
|
||||||
);
|
);
|
||||||
$form['hierarchy'] = array('#type' => 'radios',
|
$form['hierarchy'] = array('#type' => 'radios',
|
||||||
'#title' => t('Hierarchy'),
|
'#title' => t('Hierarchy'),
|
||||||
|
@ -316,6 +315,7 @@ function taxonomy_form_vocabulary_submit($form_id, $form_values) {
|
||||||
drupal_set_message(t('Updated vocabulary %name.', array('%name' => $form_values['name'])));
|
drupal_set_message(t('Updated vocabulary %name.', array('%name' => $form_values['name'])));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'admin/content/taxonomy';
|
return 'admin/content/taxonomy';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1135,7 +1135,9 @@ function taxonomy_vocabulary_load($vid) {
|
||||||
$result = db_query('SELECT v.*, n.type FROM {vocabulary} v LEFT JOIN {vocabulary_node_types} n ON v.vid = n.vid WHERE v.vid = %d ORDER BY v.weight, v.name', $vid);
|
$result = db_query('SELECT v.*, n.type FROM {vocabulary} v LEFT JOIN {vocabulary_node_types} n ON v.vid = n.vid WHERE v.vid = %d ORDER BY v.weight, v.name', $vid);
|
||||||
$node_types = array();
|
$node_types = array();
|
||||||
while ($voc = db_fetch_object($result)) {
|
while ($voc = db_fetch_object($result)) {
|
||||||
$node_types[] = $voc->type;
|
if (!empty($voc->type)) {
|
||||||
|
$node_types[] = $voc->type;
|
||||||
|
}
|
||||||
unset($voc->type);
|
unset($voc->type);
|
||||||
$voc->nodes = $node_types;
|
$voc->nodes = $node_types;
|
||||||
$vocabularies[$vid] = $voc;
|
$vocabularies[$vid] = $voc;
|
||||||
|
|
Loading…
Reference in New Issue