From 3668b29e8e1550958a5379b04a738e51e2fbb8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Thu, 13 Aug 2009 15:00:34 +0200 Subject: [PATCH] Manage Screenshots: Correctly call objectGetEntriesCount(), fix SQL accordingly --- admin/adminScreenshots.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/adminScreenshots.php b/admin/adminScreenshots.php index 85e6669..96e3759 100644 --- a/admin/adminScreenshots.php +++ b/admin/adminScreenshots.php @@ -59,8 +59,7 @@ $ItemsPerPage = isset($aClean['iItemsPerPage']) ? $aClean['iItemsPerPage'] : 6; $currentPage = isset($aClean['iPage']) ? $aClean['iPage'] : 1; $ItemsPerPage = min($ItemsPerPage,100); -$totalPages = ceil(appData::objectGetEntriesCount("all", false, - "screenshot")/$ItemsPerPage); +$totalPages = ceil(screenshot::objectGetEntriesCount('accepted')/$ItemsPerPage); $currentPage = min($currentPage,$totalPages); $offset = (($currentPage-1) * $ItemsPerPage); @@ -96,7 +95,8 @@ echo ""; /* query for all of the Screenshots in assending order */ $Ids = query_parameters("SELECT * from appData - WHERE type = 'screenshot' + WHERE type = 'screenshot' + AND state = 'accepted' ORDER BY id ASC LIMIT ?, ?", $offset, $ItemsPerPage); $c = 1; echo "
\n";