ChangeSet ID: 26354 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@winehq.org 2006/07/08 17:10:56
Modified files: . : appview.php include : version.php
Log message: Chris Morgan cmorgan@alum.wpi.edu Pass $iTestingId into Version::display() instead of reading it from $_REQUEST. We don't want classes to depend on $_REQUEST if possible
Patch: http://cvs.winehq.org/patch.py?id=26354
Old revision New revision Changes Path 1.93 1.94 +2 -1 appdb/appview.php 1.70 1.71 +2 -6 appdb/include/version.php
Index: appdb/appview.php diff -u -p appdb/appview.php:1.93 appdb/appview.php:1.94 --- appdb/appview.php:1.93 8 Jul 2006 22:10:56 -0000 +++ appdb/appview.php 8 Jul 2006 22:10:56 -0000 @@ -33,6 +33,7 @@ $aClean['iAppId'] = makeSafe($_REQUEST[' $aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']); $aClean['sSub'] = makeSafe($_REQUEST['sSub']); $aClean['iBuglinkId'] = makeSafe($_REQUEST['iBuglinkId']); +$aClean['iTestingId'] = makeSafe($_REQUEST['iTestingId']);
$oApp = new Application($aClean['iAppId']); $oVersion = new Version($aClean['iVersionId']); @@ -157,7 +158,7 @@ if($aClean['iAppId']) } else if($aClean['iVersionId']) // We want to see a particular version. { $oVersion = new Version($aClean['iVersionId']); - $oVersion->display(); + $oVersion->display($aClean['iTestingId']); } else { // Oops! Called with no params, bad llamah! Index: appdb/include/version.php diff -u -p appdb/include/version.php:1.70 appdb/include/version.php:1.71 --- appdb/include/version.php:1.70 8 Jul 2006 22:10:57 -0000 +++ appdb/include/version.php 8 Jul 2006 22:10:57 -0000 @@ -603,12 +603,8 @@ class Version { $this->sTestedRelease = $aValues['sMaintainerRelease']; }
- function display() + function display($iTestingId) { - $aClean = array(); //array of filtered user input - $aClean['iTestingId'] = makeSafe($_REQUEST['iTestingId']); - - /* is this user supposed to view this version? */ if(!$_SESSION['current']->canViewVersion($this)) util_show_error_page_and_exit("Something went wrong with the application or version id"); @@ -786,7 +782,7 @@ class Version { echo $this->sDescription;
// Show testing data - $oTest = new TestData($aClean['iTestingId']); + $oTest = new TestData($iTestingId); $iCurrentTest = $oTest->ShowTestResult($oTest->iTestingId, $this->iVersionId); if($iCurrentTest) {