appdb/include sidebar_admin.php testResults.php
WineHQ
wineowner at wine.codeweavers.com
Mon Jul 10 10:39:21 CDT 2006
ChangeSet ID: 26391
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner at winehq.org 2006/07/10 10:39:21
Modified files:
include : sidebar_admin.php testResults.php
Log message:
Chris Morgan <cmorgan at alum.wpi.edu>
testData class cleanup. Move some test related functions into the class as
static functions. Clean up some variable names.
Patch: http://cvs.winehq.org/patch.py?id=26391
Old revision New revision Changes Path
1.21 1.22 +1 -1 appdb/include/sidebar_admin.php
1.31 1.32 +43 -47 appdb/include/testResults.php
Index: appdb/include/sidebar_admin.php
diff -u -p appdb/include/sidebar_admin.php:1.21 appdb/include/sidebar_admin.php:1.22
--- appdb/include/sidebar_admin.php:1.21 10 Jul 2006 15:39:21 -0000
+++ appdb/include/sidebar_admin.php 10 Jul 2006 15:39:21 -0000
@@ -18,7 +18,7 @@ function global_admin_menu() {
$g->add("View Maintainer Queue (".getQueuedMaintainerCount().")", BASE."admin/adminMaintainerQueue.php");
$g->add("View Maintainer Entries (".getMaintainerCount().")", BASE."admin/adminMaintainers.php");
$g->add("View Bug Links (".getNumberOfQueuedBugLinks()."/".getNumberOfBugLinks().")", BASE."admin/adminBugs.php");
- $g->add("View Test Results Queue (".getNumberOfQueuedTests().")", BASE."admin/adminTestResults.php");
+ $g->add("View Test Results Queue (".testData::getNumberOfQueuedTests().")", BASE."admin/adminTestResults.php");
$g->addmisc(" ");
$g->add("Users Management", BASE."admin/adminUsers.php");
Index: appdb/include/testResults.php
diff -u -p appdb/include/testResults.php:1.31 appdb/include/testResults.php:1.32
--- appdb/include/testResults.php:1.31 10 Jul 2006 15:39:21 -0000
+++ appdb/include/testResults.php 10 Jul 2006 15:39:21 -0000
@@ -525,11 +525,11 @@ class testData{
echo '</td></tr>',"\n";
// Installs
echo '<tr><td class=color0><b>Installs?</b></td><td class=color0>',"\n";
- make_Installs_list("sInstalls", $this->sInstalls);
+ testData::make_Installs_list("sInstalls", $this->sInstalls);
echo '</td></tr>',"\n";
// Runs
echo '<tr><td class=color1><b>Runs?</b></td><td class=color0>',"\n";
- make_Runs_list("sRuns", $this->sRuns);
+ testData::make_Runs_list("sRuns", $this->sRuns);
echo '</td></tr>',"\n";
// Rating
echo '<tr><td class="color0"><b>Rating</b></td><td class="color0">',"\n";
@@ -668,63 +668,59 @@ class testData{
echo "</table>","\n";
echo html_frame_end();
-
}
-}
-/* Get the number of TestResults in the database */
-function getNumberOfQueuedTests()
-{
- $sQuery = "SELECT count(*) as num_tests
+ /* Get the number of TestResults in the database */
+ function getNumberOfQueuedTests()
+ {
+ $sQuery = "SELECT count(*) as num_tests
FROM testResults, appVersion
WHERE appVersion.versionId=testResults.versionId
and appVersion.queued='false'
and testResults.queued='true';";
- $hResult = query_parameters($sQuery);
- if($hResult)
- {
- $oRow = mysql_fetch_object($hResult);
- return $oRow->num_tests;
+ $hResult = query_parameters($sQuery);
+ if($hResult)
+ {
+ $oRow = mysql_fetch_object($hResult);
+ return $oRow->num_tests;
+ }
+ return 0;
}
- return 0;
-}
-function make_Installs_list($varname, $cvalue)
-{
-
- echo "<select name='$varname'>\n";
- echo "<option value=\"\">Choose ...</option>\n";
- $aRating = array("Yes", "No", "N/A");
- $iMax = count($aRating);
-
- for($i=0; $i < $iMax; $i++)
- {
- if($aRating[$i] == $cvalue)
- echo "<option value='".$aRating[$i]."' selected>".$aRating[$i]."\n";
- else
- echo "<option value='".$aRating[$i]."'>".$aRating[$i]."\n";
+ function make_Installs_list($sVarname, $sSelectedValue)
+ {
+ echo "<select name='$sVarname'>\n";
+ echo "<option value=\"\">Choose ...</option>\n";
+ $aRating = array("Yes", "No", "N/A");
+ $iMax = count($aRating);
+
+ for($i=0; $i < $iMax; $i++)
+ {
+ if($aRating[$i] == $sSelectedValue)
+ echo "<option value='".$aRating[$i]."' selected>".$aRating[$i]."\n";
+ else
+ echo "<option value='".$aRating[$i]."'>".$aRating[$i]."\n";
+ }
+ echo "</select>\n";
}
- echo "</select>\n";
-}
-function make_Runs_list($varname, $cvalue)
-{
-
- echo "<select name='$varname'>\n";
- echo "<option value=\"\">Choose ...</option>\n";
- $aRating = array("Yes", "No", "Not Installable");
- $iMax = count($aRating);
-
- for($i=0; $i < $iMax; $i++)
- {
- if($aRating[$i] == $cvalue)
- echo "<option value='".$aRating[$i]."' selected>".$aRating[$i]."\n";
- else
- echo "<option value='".$aRating[$i]."'>".$aRating[$i]."\n";
+ function make_Runs_list($sVarname, $sSelectedValue)
+ {
+ echo "<select name='$sVarname'>\n";
+ echo "<option value=\"\">Choose ...</option>\n";
+ $aRating = array("Yes", "No", "Not Installable");
+ $iMax = count($aRating);
+
+ for($i=0; $i < $iMax; $i++)
+ {
+ if($aRating[$i] == $sSelectedValue)
+ echo "<option value='".$aRating[$i]."' selected>".$aRating[$i]."\n";
+ else
+ echo "<option value='".$aRating[$i]."'>".$aRating[$i]."\n";
+ }
+ echo "</select>\n";
}
- echo "</select>\n";
}
-
?>
More information about the wine-cvs
mailing list