ChangeSet ID: 31090
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner(a)winehq.org 2007/04/22 21:33:19
Modified files:
. : application.css
include : application.php testData.php version.php
Log message:
Chris Morgan <cmorgan(a)alum.wpi.edu>
Clean up the layout of the version and application pages and add some css classes to define
the formatting
Patch: http://cvs.winehq.org/patch.py?id=31090
Old revision New revision Changes Path
1.6 1.7 +7 -0 appdb/application.css
1.105 1.106 +9 -3 appdb/include/application.php
1.47 1.48 +22 -15 appdb/include/testData.php
1.119 1.120 +105 -69 appdb/include/version.php
ChangeSet ID: 31087
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner(a)winehq.org 2007/04/22 11:15:12
Modified files:
include : testData.php version.php
Log message:
Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com>
Fix testData/version::mustBeQueued()
Patch: http://cvs.winehq.org/patch.py?id=31087
Old revision New revision Changes Path
1.45 1.46 +15 -2 appdb/include/testData.php
1.118 1.119 +18 -4 appdb/include/version.php
Index: appdb/include/testData.php
diff -u -p appdb/include/testData.php:1.45 appdb/include/testData.php:1.46
--- appdb/include/testData.php:1.45 22 Apr 2007 16:15:12 -0000
+++ appdb/include/testData.php 22 Apr 2007 16:15:12 -0000
@@ -922,9 +922,22 @@ class testData{
function mustBeQueued()
{
if($_SESSION['current']->hasPriv("admin"))
+ {
return FALSE;
-
- return TRUE;
+ } else if($this->iVersionId)
+ {
+ // if the user can edit the version and the version isn't queued then
+ // they can also submit test results without them being queued
+ // this is the case where they maintain the version and the version isn't queued
+ $oVersion = new version($this->iVersionId);
+ if($oVersion->canEdit() && $oVersion->sQueued == "false")
+ return FALSE;
+ else
+ return TRUE;
+ } else
+ {
+ return TRUE;
+ }
}
}
Index: appdb/include/version.php
diff -u -p appdb/include/version.php:1.118 appdb/include/version.php:1.119
--- appdb/include/version.php:1.118 22 Apr 2007 16:15:12 -0000
+++ appdb/include/version.php 22 Apr 2007 16:15:12 -0000
@@ -1197,15 +1197,29 @@ class Version {
if($_SESSION['current']->hasPriv("admin"))
return FALSE;
- if($this->iVersionId)
+ // if we have a valid iAppId or iVersionId we should
+ // check the status of these objects to determine whether
+ // we need to queue this version object
+ if($this->iVersionId or $this->iAppId)
{
- if(maintainer::isUserMaintainer($_SESSION['current'], $this->iVersionId))
+ // if the user is the super maintainer of the application then
+ // they are authorized to unqueue versions of this application
+ // so the version doesn't have to be queued
+ if($this->iAppId &&
+ maintainer::isUserSuperMaintainer($_SESSION['current'], $this->iAppId))
+ return FALSE;
+
+ // if the user is a maintainer of this version then
+ // this version doesn't have to be queued
+ if($this->iVersionId &&
+ maintainer::isUserMaintainer($_SESSION['current'], $this->iVersionId))
return FALSE;
return TRUE;
- }
- else
+ } else
+ {
return TRUE;
+ }
}
function objectGetHeader()