nid) {
case 97084: // List branches ever created in contrib.
$extra = branches_body_contrib();
break;
case 93997: // List branches ever created in core.
$extra = branches_body_core();
break;
}
$node->content['body']['#value'] .= $extra;
}
}
/**
* Show branches ever created in contrib based on CVS module data.
*/
function branches_body_contrib() {
$output = '
';
$query= db_query("SELECT DISTINCT tag, COUNT(*) AS total
FROM {cvs_tags}
WHERE nid != 3060 AND nid != 0 AND tag RLIKE 'DRUPAL' AND branch = 1
GROUP BY tag ORDER BY tag DESC");
while($tag = db_fetch_object($query)) {
$output .= ' - ' . check_plain($tag->tag) . ' ('. format_plural($tag->total, '1 project', '@count projects') .')
';
}
$output .= '
';
return $output;
}
/**
* Show branches ever created in core based on CVS module data.
*/
function branches_body_core() {
$output = '';
$query= db_query("SELECT tag
FROM {cvs_tags}
WHERE nid = 3060 AND branch = 1 AND tag != 'DRUPAL-3-00'
ORDER BY tag DESC");
while($tag = db_fetch_object($query)) {
$output .= ' - ' . check_plain($tag->tag) . '
';
}
$output .= '
';
$output .= '';
$output .= 'The tags currently available in Drupal core are:
';
$output .= '';
$query= db_query("SELECT tag
FROM {cvs_tags}
WHERE nid = 3060 AND branch = 0 AND tag RLIKE 'DRUPAL-'
ORDER BY tag DESC");
while($tag = db_fetch_object($query)) {
$output .= ' - ' . check_plain($tag->tag) . '
';
}
$output .= '
';
return $output;
}