Alexander Nicolaysen Sørnes : Manage Screenshots: Correctly call objectGetEntriesCount(), fix SQL accordingly

Alexander Nicolaysen Sørnes asornes at winehq.org
Thu Aug 13 08:06:02 CDT 2009


Module: appdb
Branch: master
Commit: 3668b29e8e1550958a5379b04a738e51e2fbb8b0
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=3668b29e8e1550958a5379b04a738e51e2fbb8b0

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Thu Aug 13 15:00:34 2009 +0200

Manage Screenshots: Correctly call objectGetEntriesCount(), fix SQL accordingly

---

 admin/adminScreenshots.php |    6 +++---
 1 files 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 "</center>";
 
 /* 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 "<div align=center><table><tr>\n";




More information about the wine-cvs mailing list