? project-list-all-20080411.patch ? release/project-list-all-20080411.patch Index: /Applications/MAMP/htdocs/xml/drupal/sites/all/modules/project/release/project-release-create-history.php =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project/release/project-release-create-history.php,v retrieving revision 1.13 diff -u -p -r1.13 project-release-create-history.php --- release/project-release-create-history.php 11 Jun 2008 03:13:12 -0000 1.13 +++ release/project-release-create-history.php 13 Oct 2008 03:20:44 -0000 @@ -162,15 +162,6 @@ function project_release_history_generat $xml = ''. check_plain($project->title) ."\n"; $xml .= ''. check_plain($project->uri) ."\n"; $xml .= ''. check_plain($project->username) ."\n"; - $term_query = db_query("SELECT v.name AS vocab_name, v.vid, td.name AS term_name, td.tid FROM {term_node} tn INNER JOIN {term_data} td ON tn.tid = td.tid INNER JOIN {vocabulary} v ON td.vid = v.vid WHERE tn.nid = %d", $project->nid); - $xml_terms = ''; - while ($term = db_fetch_object($term_query)) { - $xml_terms .= ' '. check_plain($term->vocab_name) .''; - $xml_terms .= ''. check_plain($term->term_name) ."\n"; - } - if (!empty($xml_terms)) { - $xml .= " \n". $xml_terms ." \n"; - } $xml .= ''. check_plain($api_version) ."\n"; if (!$project->status) { // If it's not published, we can skip the rest of this and bail. @@ -208,6 +199,18 @@ function project_release_history_generat $xml .= ''. $project_status ."\n"; $xml .= ''. url("node/$project->nid", NULL, NULL, TRUE) ."\n"; + // To prevent the update(_status) module from having problems parsing the XML, + // the terms need to be at the end of the information for the project. + $term_query = db_query("SELECT v.name AS vocab_name, v.vid, td.name AS term_name, td.tid FROM {term_node} tn INNER JOIN {term_data} td ON tn.tid = td.tid INNER JOIN {vocabulary} v ON td.vid = v.vid WHERE tn.nid = %d", $project->nid); + $xml_terms = ''; + while ($term = db_fetch_object($term_query)) { + $xml_terms .= ' '. check_plain($term->vocab_name) .''; + $xml_terms .= ''. check_plain($term->term_name) ."\n"; + } + if (!empty($xml_terms)) { + $xml .= " \n". $xml_terms ." \n"; + } + // Now, build the query for all the releases for this project and term. $joins = array(); $where = array();