assign('name', $name);
$ariane[] = array(
'url' => '#',
'text' => 'Package: ' . $name
);
$ajax_infos = '(wait for ajax or reload with pkgdb)';
$smarty->assign('ajax_infos', $ajax_infos);
$smarty->assign('ariane', $ariane);
$smarty->assign('page_title', 'Package: ' . $name);
function getBranchPeople($params)
{
global $fedpkg;
extract($params);
$ret = null;
if ($branch == 'rawhide' && isset($fedpkg['devel']['owner']) ) {
if ( !$people || $people == '' || $people == 'owner' ) {
$ret = $fedpkg['devel']['owner'];
} else if( $people == 'people') {
$ret_tmp = $fedpkg['devel']['people'];
}
} else if (isset($fedpkg[$branch]['owner'])) {
if ( !$people || $people == '' || $people == 'owner' ) {
$ret = $fedpkg[$branch]['owner'];
} else if( $people == 'people') {
$ret_tmp = $fedpkg[$branch]['people'];
}
}
if( $people == 'people') {
foreach ( $ret_tmp as $r ) {
if ( $ret !== null ) {
$ret .= ', ';
}
$ret .= $r['username'];
}
}
return $ret;
}
$smarty->register_function('getBranchPeople', 'getBranchPeople');
if ( !isset($name) || !$name ) {
?>
Missing package name
query($sql);
$rpm = ($resrpm ? $resrpm->fetchObject() : false);
$sql = "SELECT * FROM upstream WHERE name = '$name'";
$resup=$db->query($sql);
$up = ($resup ? $resup->fetchObject() : false);
$sql = "SELECT * FROM acls WHERE name = '$name'";
$resown=$db->query($sql);
$owner = ($resown ? $resown->fetchObject() : false);
if (!$rpm) {
echo "$name not found
\n";
} else {
if ($rpm->summary) {
$summary['Summary'] = $rpm->summary;
} else if ($owner->summary) {
$summary['Summary'] = $owner->summary;
}
$summary['Description'] = ((isset($fedpkg['devel']['package']['description'])) ? $fedpkg['devel']['package']['description'] : $ajax_infos);
if ( $rpm->url ) {
$summary['URL'] = $rpm->url;
}
if ($up && $up->type) {
$summary['Type'] = $up->type;
}
if ($up && $up->channel) {
$summary['Channel'] = $up->channel;
}
if ($up && $up->stable) {
$summary['Stabe version'] = $up->stable;
}
if ($up && $up->unstable && $up->stable!=$up->unstable) {
if ($up->state) {
$summary['Unstable version'] = $up->unstable . ' (' . $up->state . ')';
} else {
$summary['Unstable version'] = $up->unstable;
}
}
if ($owner && $owner->owner) {
if ($owner->cc) {
$summary['Owner'] = $owner->owner . ' (' . $owner->cc . ')';
} else {
$summary['Owner'] = $owner->owner;
}
}
$summary['ViewVC'] = 'http://cvs.fedoraproject.org/viewvc/rpms/' . $name . '/';
if (isset($_GET['pkgdb'])) {
$fedpkg = $fedcli->getPackageInfo($name);
} else {
$fedpkg = false;
}
$i=0;
$prev=false;
do {
$packages[] = $rpm;
if( $rpm->repo_main != $prev ) {
$prev = $rpm->repo_main;
}
} while ($rpm = $resrpm->fetchObject());
}
}
catch(PDOException $e) {
printf("%s ERREUR : %s\n", date("r"), $e->getMessage());
}
}
$smarty->assign('pkgdb', (isset($_GET['pkgdb']) ? $_GET['pkgdb'] : null));
$smarty->assign('summary', $summary);
$smarty->assign('packages', $packages);
$smarty->assign('fedpkg', $fedpkg);
$page_content = $smarty->fetch('zoom.tpl');
$smarty->assign('page_content', $page_content);
$smarty->display('main.tpl');
?>