appdb/include user.php version.php
WineHQ
wineowner at wine.codeweavers.com
Sat Apr 21 14:50:52 CDT 2007
ChangeSet ID: 31080
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner at winehq.org 2007/04/21 14:50:52
Modified files:
include : user.php version.php
Log message:
Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Use version::mustBeQueued() instead of user function
Patch: http://cvs.winehq.org/patch.py?id=31080
Old revision New revision Changes Path
1.91 1.92 +0 -12 appdb/include/user.php
1.117 1.118 +3 -6 appdb/include/version.php
Index: appdb/include/user.php
diff -u -p appdb/include/user.php:1.91 appdb/include/user.php:1.92
--- appdb/include/user.php:1.91 21 Apr 2007 19:50:52 -0000
+++ appdb/include/user.php 21 Apr 2007 19:50:52 -0000
@@ -760,18 +760,6 @@ class User {
return $this->isLoggedIn();
}
- function versionCreatedMustBeQueued($oVersion)
- {
- if($this->hasPriv("admin"))
- return false;
-
- if($this->isSupermaintainer($oVersion->iAppId))
- return false;
-
- return true;
- }
-
-
/**
* Returns 'true' if the current user has the permission to delete
* this version, 'false' otherwise
Index: appdb/include/version.php
diff -u -p appdb/include/version.php:1.117 appdb/include/version.php:1.118
--- appdb/include/version.php:1.117 21 Apr 2007 19:50:52 -0000
+++ appdb/include/version.php 21 Apr 2007 19:50:52 -0000
@@ -87,10 +87,7 @@ class Version {
if(!$_SESSION['current']->canCreateVersion())
return;
- if($_SESSION['current']->versionCreatedMustBeQueued($this))
- $this->sQueued = 'true';
- else
- $this->sQueued = 'false';
+ $this->sQueued = $this->mustBeQueued() ? "true" : "false";
$hResult = query_parameters("INSERT INTO appVersion
(versionName, description, maintainer_release,
@@ -98,7 +95,7 @@ class Version {
VALUES ('?', '?', '?', '?', '?', '?', '?', '?')",
$this->sName, $this->sDescription, $this->sTestedRelease,
$this->sTestedRating, $this->iAppId,
- $_SESSION['current']->iUserId, $this->sQueued,
+ $_SESSION['current']->iUserId, $this->sQueued,
$this->sLicense);
if($hResult)
@@ -1200,7 +1197,7 @@ class Version {
if($_SESSION['current']->hasPriv("admin"))
return FALSE;
- else if($this->iVersionId)
+ if($this->iVersionId)
{
if(maintainer::isUserMaintainer($_SESSION['current'], $this->iVersionId))
return FALSE;
More information about the wine-cvs
mailing list