Created
February 16, 2011 01:45
-
-
Save rfay/828693 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Attempt to determine the Drupal core API version. | |
$api = array(); | |
foreach ($branch->taxonomy as $tid => $term) { | |
if (in_array($tid, $api_versions)) { | |
$api['version'] = array_shift(explode('.', $term->name, 2)); | |
$api['tid'] = $term->tid; | |
break; | |
} | |
} | |
// If the API version not found then ignore this branch. | |
if (empty($api)) { | |
watchdog('pift', 'Project release node [@nid] does not have a Drupal core API taxonomy term.', array('@nid' => $branch->nid), WATCHDOG_ERROR); | |
continue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment