Fix screenshot counting and browsing. Make sure to specify the 'screenshot' tpe and use

appData functions for both counting and listing on the screenshots page, ensuring consistent
results.
This commit is contained in:
Alexander Nicolaysen Sørnes
2007-03-13 00:13:51 +00:00
committed by WineHQ
parent 695e8c32a1
commit 3c3e3a7ca4
4 changed files with 34 additions and 17 deletions

View File

@@ -22,7 +22,7 @@ if($aClean['iPage'])
$currentPage = $aClean['iPage'];
$ItemsPerPage = min($ItemsPerPage,100);
$totalPages = ceil(appData::objectGetEntriesCount(false)/$ItemsPerPage);
$totalPages = ceil(appData::objectGetEntriesCount("false", "screenshot")/$ItemsPerPage);
$currentPage = min($currentPage,$totalPages);
$offset = (($currentPage-1) * $ItemsPerPage);
@@ -57,13 +57,7 @@ echo "</form>";
echo "</center>";
/* query for all of the Screenshots in assending order */
$Ids = query_parameters("SELECT * from appData
WHERE
type = 'screenshot'
AND
queued = 'false'
ORDER BY id ASC LIMIT ?, ?",
$offset, $ItemsPerPage);
$Ids = appData::objectGetEntries(false, $ItemsPerPage, $offset, "screenshot");
$c = 1;
echo "<div align=center><table><tr>\n";
while ($oRow = mysql_fetch_object($Ids))