foreach ($nm->names as $name) { $tags[] = $name->namestring; } $paths = get_paths($tags); $majority_rule = majority_rule_path($paths); $expanded = expand_path($majority_rule); print_r($expanded); */ return $specimens; } if (0) { $sql = 'SELECT * FROM rdmp_reference WHERE'; $sql .= ' issn="0091-7958" LIMIT 10'; $ids = array(); $ids = array(124); $result = $db->Execute($sql); if ($result == false) { die("failed [" . __FILE__ . ":" . __LINE__ . "]: " . $sql); } while (!$result->EOF) { $ids[] = $result->fields['reference_id']; $result->MoveNext(); } foreach ($ids as $reference_id) { echo $reference_id . "\n"; specimens_from_reference($reference_id); } }
function Retrieve() { if ($this->id != 0) { $this->object = db_retrieve_reference($this->id); $this->in_bhl = db_reference_from_bhl($this->id); } // Geocoding? if ($this->in_bhl) { if (!bhl_has_been_geocoded($this->id)) { bhl_geocode_reference($this->id); } $this->localities = bhl_localities_for_reference($this->id); } // Specimens? if ($this->in_bhl) { if (!specimens_has_been_parsed($this->id)) { specimens_from_reference($this->id); } $this->specimens = specimens_from_db($this->id); } return $this->object; }