Alexander Nicolaysen Sørnes : testData: Fix 'Show All Tests' button
Chris Morgan
cmorgan at winehq.org
Mon Sep 24 19:04:04 CDT 2007
Module: appdb
Branch: master
Commit: c90d271886c0d535e77513be4c97cc33f0d2c27b
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=c90d271886c0d535e77513be4c97cc33f0d2c27b
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Mon Sep 24 13:26:49 2007 +0200
testData: Fix 'Show All Tests' button
---
include/objectManager.php | 1 +
include/testData.php | 24 ++++++++++++++++--------
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/include/objectManager.php b/include/objectManager.php
index 7d749ae..f70c9db 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -963,6 +963,7 @@ class ObjectManager
$sReturn .= "<input type=\"hidden\" name=\"sClass\" value=\"".$this->sClass."\" />\n";
$sReturn .= "<input type=\"hidden\" name=\"sTitle\" value=\"".$this->sTitle."\" />\n";
$sReturn .= "<input type=\"hidden\" name=\"sReturnTo\" value=\"".$this->sReturnTo."\" />\n";
+ $sReturn .= "<input type=\"hidden\" name=\"iId\" value=\"".$this->iId."\" />\n";
if($this->oMultiPage->bEnabled)
{
diff --git a/include/testData.php b/include/testData.php
index dc5d7de..3935b21 100644
--- a/include/testData.php
+++ b/include/testData.php
@@ -480,7 +480,7 @@ class testData{
$link = query_escape_string($link);
$iDisplayLimit = query_escape_string($iDisplayLimit);
- $sShowAll = isset($aClean['sShowAll']) ? $aClean['sShowAll'] : false;
+ $bShowAll = ($aClean['bShowAll'] == "true") ? true : false;
$sQuery = "SELECT *
FROM testResults
@@ -489,7 +489,7 @@ class testData{
queued = '?'
ORDER BY testedDate DESC";
- if(!$sShowAll)
+ if(!$bShowAll)
$sQuery.=" LIMIT 0,".$iDisplayLimit;
$hResult = query_parameters($sQuery, $this->iVersionId, "false");
@@ -603,15 +603,23 @@ class testData{
echo '<br />',"\n"; // put a space after the test results table and the button
- echo '<form method=get action="'.$_SERVER['PHP_SELF'].'">'."\n";
- echo "\t".'<input name="iVersionId" type=hidden value="',$this->iVersionId,'" />'."\n";
- if($rowsUsed >= $iDisplayLimit && !is_string($sShowAll))
- echo "\t".'<input class="button" name="sShowAll" type=submit value="Show All Tests" />'."\n";
+ echo '<form method=get action="objectManager.php">'."\n";
- if(is_string($sShowAll))
+ if($rowsUsed >= $iDisplayLimit && $bShowAll)
{
- echo "\t".'<input class="button" name="sHideAll" type=submit value="Limit to '.$iDisplayLimit.' Tests" />'."\n";
+ $sShowButtonText = "Limit to $iDisplayLimit Tests";
+ } else
+ {
+ $sShowButtonText = "Show All Tests";
+ echo '<input type="hidden" name="bShowAll" value="true" />';
}
+
+ $oManager = new objectManager("version", null, $this->iVersionId);
+
+ echo $oManager->makeUrlFormData();
+
+ echo "\t".'<input class="button" type=submit value="'.$sShowButtonText.'" />'."\n";
+
echo '</form>'."\n";
echo '</div>',"\n"; // end of the 'info_contents' div
More information about the wine-cvs
mailing list