@@ -224,7 +224,7 @@ function forum_nodeapi(&$node, $op, $teaser, $page) {
foreach($node->taxonomyas$term){
if(db_result(db_query('SELECT COUNT(*) FROM {term_data} WHERE tid = %d AND vid = %d',$term,$vocabulary))){
if(in_array($term,$containers)){
$term=taxonomy_get_term($term);
$term=taxonomy_term_load($term);
form_set_error('taxonomy',t('The item %forum is only a container for forums. Please select one of the forums below it.',array('%forum'=>$term->name)));
}
}
...
...
@@ -565,7 +565,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) {
}
}
$term=taxonomy_get_term($tid);
$term=taxonomy_term_load($tid);
$sql=db_rewrite_sql("SELECT n.nid, r.tid, n.title, n.type, n.sticky, u.name, u.uid, n.created AS timestamp, n.comment AS comment_mode, l.last_comment_timestamp, IF(l.last_comment_uid != 0, cu.name, l.last_comment_name) AS last_comment_name, l.last_comment_uid, l.comment_count AS num_comments, f.tid AS forum_tid FROM {node_comment_statistics} l INNER JOIN {node} n ON n.nid = l.nid INNER JOIN {users} cu ON l.last_comment_uid = cu.uid INNER JOIN {term_node} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {forum} f ON n.vid = f.vid WHERE n.status = 1 AND r.tid = %d");
drupal_set_message(t('Created new vocabulary %name.',array('%name'=>$form_state['values']['name'])));
watchdog('taxonomy','Created new vocabulary %name.',array('%name'=>$form_state['values']['name']),WATCHDOG_NOTICE,l(t('edit'),'admin/content/taxonomy/edit/vocabulary/'.$form_state['values']['vid']));
watchdog('taxonomy','Created new vocabulary %name.',array('%name'=>$form_state['values']['name']),WATCHDOG_NOTICE,l(t('edit'),'admin/content/taxonomy/'.$form_state['values']['vid']));
drupal_set_message(t('Created new term %term.',array('%term'=>$form_state['values']['name'])));
watchdog('taxonomy','Created new term %term.',array('%term'=>$form_state['values']['name']),WATCHDOG_NOTICE,l(t('edit'),'admin/content/taxonomy/edit/term/'.$form_state['values']['tid']));
watchdog('taxonomy','Created new term %term.',array('%term'=>$form_state['values']['name']),WATCHDOG_NOTICE,l(t('edit'),'taxonomy/term/'.$form_state['values']['tid'].'/edit'));
break;
caseSAVED_UPDATED:
drupal_set_message(t('Updated term %term.',array('%term'=>$form_state['values']['name'])));
watchdog('taxonomy','Updated term %term.',array('%term'=>$form_state['values']['name']),WATCHDOG_NOTICE,l(t('edit'),'admin/content/taxonomy/edit/term/'.$form_state['values']['tid']));
watchdog('taxonomy','Updated term %term.',array('%term'=>$form_state['values']['name']),WATCHDOG_NOTICE,l(t('edit'),'taxonomy/term/'.$form_state['values']['tid'].'/edit'));
break;
}
...
...
@@ -835,7 +812,7 @@ function taxonomy_term_confirm_parents(&$form_state, $vocabulary) {
@@ -1212,6 +1243,7 @@ function taxonomy_terms_parse_string($str_tids) {
$terms['operator']='and';
$terms['tids']=explode(',',$str_tids);
}
$terms['str_tids']=$str_tids;
return$terms;
}
...
...
@@ -1247,7 +1279,7 @@ function taxonomy_help($path, $arg) {
$output='<p>'.t("The taxonomy module allows you to categorize your content using both tags and administrator defined terms. It is a flexible tool for classifying content with many advanced features. To begin, create a 'Vocabulary' to hold one set of terms or tags. You can create one free-tagging vocabulary for everything, or separate controlled vocabularies to define the various properties of your content, for example 'Countries' or 'Colors'.").'</p>';
$output.='<p>'.t('Use the list below to configure and review the vocabularies defined on your site, or to list and manage the terms (tags) they contain. A vocabulary may (optionally) be tied to specific content types as shown in the <em>Type</em> column and, if so, will be displayed when creating or editing posts of that type. Multiple vocabularies tied to the same content type will be displayed in the order shown below. To change the order of a vocabulary, grab a drag-and-drop handle under the <em>Name</em> column and drag it to a new location in the list. (Grab a handle by clicking and holding the mouse while hovering over a handle icon.) Remember that your changes will not be saved until you click the <em>Save</em> button at the bottom of the page.').'</p>';
return$output;
case'admin/content/taxonomy/%':
case'admin/content/taxonomy/%/list':
$vocabulary=taxonomy_vocabulary_load($arg[3]);
if($vocabulary->tags){
return'<p>'.t('%capital_name is a free-tagging vocabulary. To change the name or description of a term, click the <em>edit</em> link next to the term.',array('%capital_name'=>drupal_ucfirst($vocabulary->name))).'</p>';
...
...
@@ -1260,7 +1292,7 @@ function taxonomy_help($path, $arg) {
case2:
return'<p>'.t('%capital_name is a multiple hierarchy vocabulary. To change the name or description of a term, click the <em>edit</em> link next to the term. Drag and drop of multiple hierarchies is not supported, but you can re-enable drag and drop support by editing each term to include only a single parent.',array('%capital_name'=>drupal_ucfirst($vocabulary->name))).'</p>';
}
case'admin/content/taxonomy/add/vocabulary':
case'admin/content/taxonomy/add':
return'<p>'.t('Define how your vocabulary will be presented to administrators and users, and which content types to categorize with it. Tags allows users to create terms when submitting posts by typing a comma separated list. Otherwise terms are chosen from a select list and can only be created by users with the "administer taxonomy" permission.').'</p>';
$result=db_query(db_rewrite_sql('SELECT t.tid, t.name FROM {term_data} t WHERE t.tid IN ('.db_placeholders($terms['tids']).')','t','tid'),$terms['tids']);