diff options
Diffstat (limited to 'zoom.php')
-rw-r--r-- | zoom.php | 33 |
1 files changed, 15 insertions, 18 deletions
@@ -93,6 +93,8 @@ if ( !isset($name) || !$name ) { try { $db = new PDO ("mysql:dbname=" . MYBASE . ";host=" . MYHOST, MYUSER, MYPASS); + $uptable = new TableUpstream($db); + $sql = "SELECT rpm.*, CONCAT(repo.url,rpm.name,'-',rpm.ver,'-',rpm.rel,'.src.rpm') as rpmurl FROM rpm @@ -102,9 +104,7 @@ if ( !isset($name) || !$name ) { $resrpm = $db->query($sql); $rpm = ($resrpm ? $resrpm->fetchObject() : false); - $sql = "SELECT * FROM upstream WHERE name = '$name'"; - $resup=$db->query($sql); - $up = ($resup ? $resup->fetchObject() : false); + $up = $uptable->find(array('name'=>$name)); $sql = "SELECT * FROM acls WHERE name = '$name'"; $resown=$db->query($sql); @@ -133,28 +133,25 @@ if ( !isset($name) || !$name ) { if ( $rpm->url ) { $summary['URL'] = $rpm->url; } - if ($up && $up->type) { - $summary['Type'] = $up->type; + if ($up && $up['type']) { + $summary['Type'] = $up['type']; } - if ($up && $up->channel) { - $summary['Channel'] = $up->channel; + if ($up && $up['channel']) { + $summary['Channel'] = $up['channel']; } - if ($up && $up->stable) { - $summary['Stabe version'] = $up->stable; + 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 ($up && $up['stable'] && $up['stable']!=$up['unstable']) { + $summary['Unstable version'] = $up['unstable']; + if ($up['state']) { + $summary['Unstable version'] .= ' (' . $up['state'] . ')'; } } if ($owner && $owner->owner) { + $summary['Owner'] = $owner->owner; if ($owner->cc) { - $summary['Owner'] = $owner->owner . ' (' . $owner->cc . ')'; - } else { - $summary['Owner'] = $owner->owner; + $summary['Owner'] .= ' (' . $owner->cc . ')'; } // Only when owner (so we have the exact name) |