Commit c47dfc3f authored by Gábor Hojtsy's avatar Gábor Hojtsy

#163728 follow up comment wrapping to 80 columns by myself

parent 21ce2aa7
......@@ -48,8 +48,9 @@ function taxonomy_link($type, $node = NULL) {
}
if (!empty($node->taxonomy)) {
foreach ($node->taxonomy as $term) {
// During preview the free tagging terms are in an array unlike the other terms which are objects.
// So we have to check if a $term is an object or not.
// During preview the free tagging terms are in an array unlike the
// other terms which are objects. So we have to check if a $term
// is an object or not.
if (is_object($term)) {
$links['taxonomy_term_'. $term->tid] = array(
'title' => $term->name,
......@@ -57,7 +58,8 @@ function taxonomy_link($type, $node = NULL) {
'attributes' => array('rel' => 'tag', 'title' => strip_tags($term->description))
);
}
// Previewing free tagging terms; we don't link them because the term-page might not exist yet.
// Previewing free tagging terms; we don't link them because the
// term-page might not exist yet.
else {
foreach ($term as $free_typed) {
$typed_terms = drupal_explode_tags($free_typed);
......@@ -71,7 +73,8 @@ function taxonomy_link($type, $node = NULL) {
}
}
// We call this hook again because some modules and themes call taxonomy_link('taxonomy terms') directly
// We call this hook again because some modules and themes
// call taxonomy_link('taxonomy terms') directly.
drupal_alter('link', $links, $node);
return $links;
......@@ -446,7 +449,8 @@ function taxonomy_form_alter(&$form, $form_state, $form_id) {
while ($vocabulary = db_fetch_object($c)) {
if ($vocabulary->tags) {
if (isset($form_state['node_preview'])) {
// Typed string can be changed by the user before preview, so we just insert the tags directly as provided in the form.
// Typed string can be changed by the user before preview,
// so we just insert the tags directly as provided in the form.
$typed_string = $node->taxonomy['tags'][$vocabulary->vid];
}
else {
......@@ -483,7 +487,8 @@ function taxonomy_form_alter(&$form, $form_state, $form_id) {
}
}
if (!empty($form['taxonomy']) && is_array($form['taxonomy'])) {
if (count($form['taxonomy']) > 1) { // Add fieldset only if form has more than 1 element.
if (count($form['taxonomy']) > 1) {
// Add fieldset only if form has more than 1 element.
$form['taxonomy'] += array(
'#type' => 'fieldset',
'#title' => t('Categories'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment