summaryrefslogtreecommitdiffstats
path: root/rpm.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2010-11-01 08:46:05 +0100
committerRemi Collet <fedora@famillecollet.com>2010-11-01 08:46:05 +0100
commitc28b13eaeca04574994d5a7c2320bbce4c63450f (patch)
treebabb19b528e46b85bbbdc59a78313d422f5bcd5a /rpm.php
parent1421a2207c0130030233e901d6f5055f54417e68 (diff)
add new TableRpmRepo->getMaxStamp() method and use it
Diffstat (limited to 'rpm.php')
-rw-r--r--rpm.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/rpm.php b/rpm.php
index 5b298e8..798cb29 100644
--- a/rpm.php
+++ b/rpm.php
@@ -244,11 +244,8 @@ try {
$smarty->assign('owners', $owners);
}
- $sql='SELECT MAX(stamp) AS stamp FROM repo';
- $res=$db->query($sql);
- if ($res && $row=$res->fetchObject()) {
- $smarty->assign('repositories_update', date("r", $row->stamp));
- }
+ $rpmrepo = new TableRpmRepo($db);
+ $smarty->assign('repositories_update', date("r", $rpmrepo->getMaxStamp()));
$smarty->assign('packages', report($db, $type));
} catch(PDOException $e) {