summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/taxonomy/taxonomy.module14
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index eaa6503..26ed950 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -253,18 +253,22 @@ function taxonomy_del_vocabulary($vid) {
/**
* Dynamically check and update the hierarachy flag of a vocabulary.
+ * Checks and updates the hierarchy flag of a vocabulary.
*
* Checks the current parents of all terms in a vocabulary and updates the
- * vocabularies hierarchy setting to the lowest possible level. A hierarchy with
- * no parents in any of its terms will be given a hierarchy of 0. If terms
- * contain at most a single parent, the vocabulary will be given a hierarchy of
- * 1. If any term contain multiple parents, the vocabulary will be given a
- * hieararchy of 2.
+ * vocabulary's hierarchy setting to the lowest possible level. If no term
+ * has parent terms then the vocabulary will be given a hierarchy of 0.
+ * If any term has a single parent then the vocabulary will be given a
+ * hierarchy of 1. If any term has multiple parents then the vocabulary
+ * will be given a hierarchy of 2.
*
* @param $vocabulary
* An array of the vocabulary structure.
* @param $changed_term
* An array of the term structure that was updated.
+ *
+ * @return
+ * An integer that represents the level of the vocabulary's hierarchy.
*/
function taxonomy_check_vocabulary_hierarchy($vocabulary, $changed_term) {
$tree = taxonomy_get_tree($vocabulary['vid']);