<?php echo '<strong>Release date:</strong> ' . format_date(strtotime($info['releasedate'])) . '<br />'; echo '<strong>Release state:</strong> '; echo '<span class="' . htmlspecialchars($info['state']) . '">' . htmlspecialchars($info['state']) . '</span><br /><br />'; echo '<strong>Changelog:</strong><br /><br />' . nl2br(make_ticket_links(htmlspecialchars($info['releasenotes']), '/bugs/')) . '<br /><br />'; if (!empty($info['deps']) && count($info['deps']) > 0) { echo '<strong>Dependencies:</strong>'; $rel_trans = array('lt' => 'older than %s', 'le' => 'version %s or older', 'eq' => 'version %s', 'ne' => 'any version but %s', 'gt' => 'newer than %s', 'ge' => '%s or newer'); $dep_type_desc = array('pkg' => 'PEAR Package', 'ext' => 'PHP Extension', 'php' => 'PHP Version', 'prog' => 'Program', 'ldlib' => 'Development Library', 'rtlib' => 'Runtime Library', 'os' => 'Operating System', 'websrv' => 'Web Server', 'sapi' => 'SAPI Backend'); $dep_text = ''; foreach ($info['deps'] as $dependency) { // Print link if it's a PEAR package and it's in the db if ($dependency['type'] == 'pkg') { $dep_pkg = package::info($dependency['name']); if (!empty($dep_pkg['name']) && ($dep_pkg['package_type'] = 'pear')) { $dependency['name'] = package::makeLink($dependency['name']); } } if (isset($rel_trans[$dependency['relation']])) { $rel = sprintf($rel_trans[$dependency['relation']], $dependency['version']); $dep_text .= sprintf("<li>%s: %s %s", $dep_type_desc[$dependency['type']], $dependency['name'], $rel); } else { $dep_text .= sprintf("<li>%s: %s", $dep_type_desc[$dependency['type']], $dependency['name']); } if ($dependency['optional'] == 1) { $dep_text .= ' (optional)'; } if ($dependency['relation'] == 'not') { $dep_text .= ' (conflicts with some versions)'; } $dep_text .= '</li>';