| 1 |
<?php
|
| 2 |
/**
|
| 3 |
* @file
|
| 4 |
*
|
| 5 |
* Default thresholds for community-managed taxonomy (cmt.module)
|
| 6 |
*
|
| 7 |
* Used in *first* cmt_save_vocabulary
|
| 8 |
* All later retrieved from the database
|
| 9 |
* Zero means this metric is disabled in community managed taxonomy for this vocabulary.
|
| 10 |
* It cannot be voted on.
|
| 11 |
* One means no threshold, one vote does it. Two means a threshold of two votes for an action to take place.
|
| 12 |
*/
|
| 13 |
|
| 14 |
// 0 = disabled on the admin/content/taxonomy/add page
|
| 15 |
|
| 16 |
$related = 0;
|
| 17 |
switch ($array['cmt_vocabulary']['#value']) {
|
| 18 |
case 1: // no thresholds (aka low)
|
| 19 |
$array['cmt_description_th'] = 1;
|
| 20 |
$array['cmt_weight_th'] = 1;
|
| 21 |
$array['cmt_name_th'] = 1;
|
| 22 |
$array['cmt_hierarchy_th'] = 1;
|
| 23 |
$array['cmt_merge_th'] = 1;
|
| 24 |
$array['cmt_node_th'] = 1;
|
| 25 |
$array['cmt_related_th'] = 0;
|
| 26 |
break;
|
| 27 |
|
| 28 |
case 3: // default with related terms derived
|
| 29 |
$related = 1;
|
| 30 |
case 2: // default
|
| 31 |
$array['cmt_description_th'] = 2;
|
| 32 |
$array['cmt_weight_th'] = 2;
|
| 33 |
$array['cmt_name_th'] = 2;
|
| 34 |
$array['cmt_hierarchy_th'] = 2;
|
| 35 |
$array['cmt_merge_th'] = 2;
|
| 36 |
$array['cmt_node_th'] = 2;
|
| 37 |
$array['cmt_related_th'] = $related;
|
| 38 |
unset($related);
|
| 39 |
break;
|
| 40 |
|
| 41 |
case 4: // high thresholds with related terms derived
|
| 42 |
$array['cmt_description_th'] = 4;
|
| 43 |
$array['cmt_weight_th'] = 4;
|
| 44 |
$array['cmt_name_th'] = 4;
|
| 45 |
$array['cmt_hierarchy_th'] = 3;
|
| 46 |
$array['cmt_merge_th'] = 5;
|
| 47 |
$array['cmt_node_th'] = 5;
|
| 48 |
$array['cmt_related_th'] = 3;
|
| 49 |
break;
|
| 50 |
}
|