testData class cleanup. Move some test related functions into the class as
static functions. Clean up some variable names.
This commit is contained in:
@@ -18,7 +18,7 @@ function global_admin_menu() {
|
|||||||
$g->add("View Maintainer Queue (".getQueuedMaintainerCount().")", BASE."admin/adminMaintainerQueue.php");
|
$g->add("View Maintainer Queue (".getQueuedMaintainerCount().")", BASE."admin/adminMaintainerQueue.php");
|
||||||
$g->add("View Maintainer Entries (".getMaintainerCount().")", BASE."admin/adminMaintainers.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 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->addmisc(" ");
|
||||||
$g->add("Users Management", BASE."admin/adminUsers.php");
|
$g->add("Users Management", BASE."admin/adminUsers.php");
|
||||||
|
|||||||
@@ -525,11 +525,11 @@ class testData{
|
|||||||
echo '</td></tr>',"\n";
|
echo '</td></tr>',"\n";
|
||||||
// Installs
|
// Installs
|
||||||
echo '<tr><td class=color0><b>Installs?</b></td><td class=color0>',"\n";
|
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";
|
echo '</td></tr>',"\n";
|
||||||
// Runs
|
// Runs
|
||||||
echo '<tr><td class=color1><b>Runs?</b></td><td class=color0>',"\n";
|
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";
|
echo '</td></tr>',"\n";
|
||||||
// Rating
|
// Rating
|
||||||
echo '<tr><td class="color0"><b>Rating</b></td><td class="color0">',"\n";
|
echo '<tr><td class="color0"><b>Rating</b></td><td class="color0">',"\n";
|
||||||
@@ -668,8 +668,6 @@ class testData{
|
|||||||
echo "</table>","\n";
|
echo "</table>","\n";
|
||||||
|
|
||||||
echo html_frame_end();
|
echo html_frame_end();
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the number of TestResults in the database */
|
/* Get the number of TestResults in the database */
|
||||||
@@ -690,17 +688,16 @@ function getNumberOfQueuedTests()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function make_Installs_list($varname, $cvalue)
|
function make_Installs_list($sVarname, $sSelectedValue)
|
||||||
{
|
{
|
||||||
|
echo "<select name='$sVarname'>\n";
|
||||||
echo "<select name='$varname'>\n";
|
|
||||||
echo "<option value=\"\">Choose ...</option>\n";
|
echo "<option value=\"\">Choose ...</option>\n";
|
||||||
$aRating = array("Yes", "No", "N/A");
|
$aRating = array("Yes", "No", "N/A");
|
||||||
$iMax = count($aRating);
|
$iMax = count($aRating);
|
||||||
|
|
||||||
for($i=0; $i < $iMax; $i++)
|
for($i=0; $i < $iMax; $i++)
|
||||||
{
|
{
|
||||||
if($aRating[$i] == $cvalue)
|
if($aRating[$i] == $sSelectedValue)
|
||||||
echo "<option value='".$aRating[$i]."' selected>".$aRating[$i]."\n";
|
echo "<option value='".$aRating[$i]."' selected>".$aRating[$i]."\n";
|
||||||
else
|
else
|
||||||
echo "<option value='".$aRating[$i]."'>".$aRating[$i]."\n";
|
echo "<option value='".$aRating[$i]."'>".$aRating[$i]."\n";
|
||||||
@@ -708,23 +705,22 @@ function make_Installs_list($varname, $cvalue)
|
|||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function make_Runs_list($varname, $cvalue)
|
function make_Runs_list($sVarname, $sSelectedValue)
|
||||||
{
|
{
|
||||||
|
echo "<select name='$sVarname'>\n";
|
||||||
echo "<select name='$varname'>\n";
|
|
||||||
echo "<option value=\"\">Choose ...</option>\n";
|
echo "<option value=\"\">Choose ...</option>\n";
|
||||||
$aRating = array("Yes", "No", "Not Installable");
|
$aRating = array("Yes", "No", "Not Installable");
|
||||||
$iMax = count($aRating);
|
$iMax = count($aRating);
|
||||||
|
|
||||||
for($i=0; $i < $iMax; $i++)
|
for($i=0; $i < $iMax; $i++)
|
||||||
{
|
{
|
||||||
if($aRating[$i] == $cvalue)
|
if($aRating[$i] == $sSelectedValue)
|
||||||
echo "<option value='".$aRating[$i]."' selected>".$aRating[$i]."\n";
|
echo "<option value='".$aRating[$i]."' selected>".$aRating[$i]."\n";
|
||||||
else
|
else
|
||||||
echo "<option value='".$aRating[$i]."'>".$aRating[$i]."\n";
|
echo "<option value='".$aRating[$i]."'>".$aRating[$i]."\n";
|
||||||
}
|
}
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user