From c28b13eaeca04574994d5a7c2320bbce4c63450f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 1 Nov 2010 08:46:05 +0100 Subject: add new TableRpmRepo->getMaxStamp() method and use it --- all.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'all.php') diff --git a/all.php b/all.php index 4a5a5ab..26283de 100644 --- a/all.php +++ b/all.php @@ -211,11 +211,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)); } catch(PDOException $e) { -- cgit