diff --git a/admin/adminTestResults.php b/admin/adminTestResults.php index ff540cc..5792e09 100644 --- a/admin/adminTestResults.php +++ b/admin/adminTestResults.php @@ -143,28 +143,6 @@ else // if ($aClean['sSub']) is not defined, display the Test results queue page $oTest = new TestData(); apidb_header("Test Results"); - // Get queued test results. - - $hResult = $oTest->getTestingQueue("true"); - if(!$hResult) - { - //no apps in queue - echo html_frame_start("Submitted Test Results","90%"); - echo '

The Submitted Test Results Queue is empty.

',"\n"; - echo html_frame_end(" "); - } - else - { - //help - echo "
\n\n"; - echo "

This is the list of test results waiting for submission, rejection or deletion.

\n"; - echo "

To view a submission, click on its name. From that page you can Submit it into \n"; - echo "the AppDB reject it or delete it.
\n"; - echo "

\n\n"; - - $oTest->ShowListofTests($hResult,"Submitted Test Results"); - } - // Get rejected test results. $hResult = $oTest->getTestingQueue("rejected"); if(!$hResult || !mysql_num_rows($hResult)) diff --git a/include/sidebar_admin.php b/include/sidebar_admin.php index 67b233f..fa1810f 100644 --- a/include/sidebar_admin.php +++ b/include/sidebar_admin.php @@ -30,13 +30,16 @@ function global_admin_menu() { BASE."admin/adminMaintainers.php"); $g->add("View Bug Links (".getNumberOfQueuedBugLinks()."/".getNumberOfBugLinks().")", BASE."admin/adminBugs.php"); - $g->add("View Test Results Queue (".testData::getNumberOfQueuedTests().")", - BASE."admin/adminTestResults.php"); + $g->add("View Test Results Queue (".testData::objectGetEntriesCount(true).")", + BASE."objectManager.php?sClass=testData&bIsQueue=true&sTitle=". + "Test%20Results%20Queue"); $g->add("View Distribution Queue (".distribution::objectGetEntriesCount(true).")", BASE."objectManager.php?sClass=distribution&bIsQueue=true&sTitle=". "Distribution%20Queue"); $g->addmisc(" "); + $g->add("View Rejected Test Results", + BASE."admin/adminTestResults.php"); $g->add("Users Management", BASE."admin/adminUsers.php"); $g->add("Comments Management", BASE."admin/adminCommentView.php"); $g->add("Screenshots Management", BASE."admin/adminScreenshots.php"); diff --git a/include/sidebar_maintainer_admin.php b/include/sidebar_maintainer_admin.php index 9e67843..a14d588 100644 --- a/include/sidebar_maintainer_admin.php +++ b/include/sidebar_maintainer_admin.php @@ -13,6 +13,9 @@ function global_maintainer_admin_menu() { "screenshot").")", BASE."objectManager.php?sClass=screenshot&bIsQueue=true&sTitle=". "Screenshot%20Queue"); + $g->add("View Test Results Queue (".testData::objectGetEntriesCount(true).")", + BASE."objectManager.php?sClass=testData&bIsQueue=true&sTitle=". + "Test%20Results%20Queue"); $g->done(); } diff --git a/include/testData.php b/include/testData.php index 53684f4..813124a 100644 --- a/include/testData.php +++ b/include/testData.php @@ -27,36 +27,35 @@ class testData{ function testData($iTestingId = null) { // we are working on an existing test - if(is_numeric($iTestingId)) + if($iTestingId) { // We fetch the data related to this test. - if(!$this->iTestingId) + if(!$oRow) { $sQuery = "SELECT * FROM testResults WHERE testingId = '?'"; if($hResult = query_parameters($sQuery, $iTestingId)) - { $oRow = mysql_fetch_object($hResult); - if($oRow) - { - $this->iTestingId = $oRow->testingId; - $this->iVersionId = $oRow->versionId; - $this->shWhatWorks = $oRow->whatWorks; - $this->shWhatDoesnt = $oRow->whatDoesnt; - $this->shWhatNotTested = $oRow->whatNotTested; - $this->sTestedDate = $oRow->testedDate; - $this->iDistributionId = $oRow->distributionId; - $this->sTestedRelease = $oRow->testedRelease; - $this->sInstalls = $oRow->installs; - $this->sRuns = $oRow->runs; - $this->sTestedRating = $oRow->testedRating; - $this->sComments = $oRow->comments; - $this->sSubmitTime = $oRow->submitTime; - $this->iSubmitterId = $oRow->submitterId; - $this->sQueued = $oRow->queued; - } - } + } + + if($oRow) + { + $this->iTestingId = $oRow->testingId; + $this->iVersionId = $oRow->versionId; + $this->shWhatWorks = $oRow->whatWorks; + $this->shWhatDoesnt = $oRow->whatDoesnt; + $this->shWhatNotTested = $oRow->whatNotTested; + $this->sTestedDate = $oRow->testedDate; + $this->iDistributionId = $oRow->distributionId; + $this->sTestedRelease = $oRow->testedRelease; + $this->sInstalls = $oRow->installs; + $this->sRuns = $oRow->runs; + $this->sTestedRating = $oRow->testedRating; + $this->sComments = $oRow->comments; + $this->sSubmitTime = $oRow->submitTime; + $this->iSubmitterId = $oRow->submitterId; + $this->sQueued = $oRow->queued; } } } @@ -687,24 +686,6 @@ class testData{ echo html_frame_end(); } - /* 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; - } - return 0; - } - function make_Installs_list($sVarname, $sSelectedValue) { echo "