summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/taxonomy/taxonomy.module17
1 files changed, 11 insertions, 6 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 9457170bd..08f4f321c 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -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'),